Skip to content

Conversation

@fonji
Copy link
Contributor

@fonji fonji commented Nov 8, 2019

It is possible to use Contact.update!(id, params) or Company.update!(id, params).
This adds the same functionnality for Deal.

I tried using updatable_resource, sadly Deal seems to be a bit weird…
This is a first step, as it uses the same signatures.

@fonji fonji mentioned this pull request Nov 8, 2019
@properties.merge!(params)
self
end
alias_method :update, :update!
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paving the way to switch to Hubspot::Resource

let(:company_id) { 8954037 }
let(:vid) { 27136 }
let(:amount) { '30' }
let(:deal) { Hubspot::Deal.create!(portal_id, [company_id], [vid], { amount: amount}) }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this allowed a little clean up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant