diff --git a/lib/hubspot/company.rb b/lib/hubspot/company.rb index 9b57b2d9..b3ece6f3 100644 --- a/lib/hubspot/company.rb +++ b/lib/hubspot/company.rb @@ -151,7 +151,7 @@ def batch_update!(companies) end Hubspot::Connection.post_json(BATCH_UPDATE_PATH, params: {}, body: query) end - + # Adds contact to a company # {http://developers.hubspot.com/docs/methods/companies/add_contact_to_company} # @param company_vid [Integer] The ID of a company to add a contact to @@ -165,6 +165,18 @@ def add_contact!(company_vid, contact_vid) }, body: nil) end + + # Updates the properties of a company + # {http://developers.hubspot.com/docs/methods/companies/update_company} + # @param vid [Integer] hubspot company vid + # @param params [Hash] hash of properties to update + # @return [Hubspot::Company] Company record + def update!(vid, params) + params.stringify_keys! + query = {"properties" => Hubspot::Utils.hash_to_properties(params, key_name: "name")} + response = Hubspot::Connection.put_json(UPDATE_COMPANY_PATH, params: { company_id: vid }, body: query) + new(response) + end end attr_reader :properties @@ -185,8 +197,7 @@ def [](property) # @param params [Hash] hash of properties to update # @return [Hubspot::Company] self def update!(params) - query = {"properties" => Hubspot::Utils.hash_to_properties(params.stringify_keys!, key_name: "name")} - Hubspot::Connection.put_json(UPDATE_COMPANY_PATH, params: { company_id: vid }, body: query) + self.class.update!(vid, params) @properties.merge!(params) self end diff --git a/lib/hubspot/contact.rb b/lib/hubspot/contact.rb index 4a8ea825..994a4c87 100644 --- a/lib/hubspot/contact.rb +++ b/lib/hubspot/contact.rb @@ -163,6 +163,14 @@ def merge!(primary_contact_vid, secondary_contact_vid) body: { vidToMerge: secondary_contact_vid } ) end + + # Updates the properties of a contact + # {https://developers.hubspot.com/docs/methods/contacts/update_contact} + # @param params [Hash] hash of properties to update + def update!(vid, params = {}) + query = {"properties" => Hubspot::Utils.hash_to_properties(params.stringify_keys!)} + Hubspot::Connection.post_json(UPDATE_CONTACT_PATH, params: { contact_id: vid }, body: query) + end end attr_reader :properties, :vid, :is_new @@ -197,8 +205,7 @@ def is_new=(val) # @param params [Hash] hash of properties to update # @return [Hubspot::Contact] self def update!(params) - query = {"properties" => Hubspot::Utils.hash_to_properties(params.stringify_keys!)} - Hubspot::Connection.post_json(UPDATE_CONTACT_PATH, params: { contact_id: vid }, body: query) + self.class.update!(vid, params) @properties.merge!(params) self end diff --git a/lib/hubspot/deal.rb b/lib/hubspot/deal.rb index a7c26a60..5d5be3d1 100644 --- a/lib/hubspot/deal.rb +++ b/lib/hubspot/deal.rb @@ -109,6 +109,18 @@ def find_by_association(object) response = Hubspot::Connection.get_json(path, params) response["results"].map { |deal_id| find(deal_id) } end + + # Updates the properties of a deal + # {http://developers.hubspot.com/docs/methods/deals/update_deal} + # @param deal_id [Integer] hubspot deal_id + # @param params [Hash] hash of properties to update + # @return [Hubspot::Deal] Deal record + def update!(deal_id, params) + params.stringify_keys! + query = {"properties" => Hubspot::Utils.hash_to_properties(params, key_name: "name")} + response = Hubspot::Connection.put_json(UPDATE_DEAL_PATH, params: { deal_id: deal_id }, body: query) + new(response) + end end # Archives the contact in hubspot @@ -132,8 +144,7 @@ def [](property) # @param params [Hash] hash of properties to update # @return [Hubspot::Deal] self def update!(params) - query = {"properties" => Hubspot::Utils.hash_to_properties(params.stringify_keys!, key_name: 'name')} - Hubspot::Connection.put_json(UPDATE_DEAL_PATH, params: { deal_id: deal_id }, body: query) + self.class.update!(deal_id, params) @properties.merge!(params) self end diff --git a/spec/fixtures/vcr_cassettes/company_update.yml b/spec/fixtures/vcr_cassettes/company_update.yml deleted file mode 100644 index 3ed089e9..00000000 --- a/spec/fixtures/vcr_cassettes/company_update.yml +++ /dev/null @@ -1,429 +0,0 @@ ---- -http_interactions: -- request: - method: put - uri: https://api.hubapi.com/companies/v2/companies/?hapikey=demo - body: - encoding: UTF-8 - string: '{"properties":[{"name":"name","value":"Acme Cogs"},{"name":"domain","value":"abccogs.com"}]}' - headers: - Content-Type: - - application/json - response: - status: - code: 405 - message: Method Not Allowed - headers: - Access-Control-Allow-Credentials: - - 'false' - Allow: - - HEAD,POST,GET,OPTIONS - Date: - - Tue, 16 Jun 2015 13:19:11 GMT - Content-Length: - - '0' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '' - http_version: - recorded_at: Tue, 16 Jun 2015 13:19:11 GMT -- request: - method: put - uri: https://api.hubapi.com/companies/v2/companies/42839742?hapikey=demo - body: - encoding: UTF-8 - string: '{"properties":[{"name":"name","value":"Acme Cogs"},{"name":"domain","value":"abccogs.com"}]}' - headers: - Content-Type: - - application/json - response: - status: - code: 404 - message: Not Found - headers: - Access-Control-Allow-Credentials: - - 'false' - Content-Type: - - application/json; charset=UTF-8 - Date: - - Tue, 16 Jun 2015 13:19:19 GMT - Content-Length: - - '146' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status":"error","message":"Couldn''t find a company with the ID ''42839742'' - in portal ''62515''","requestId":"93eabfa4-afe9-4918-80f9-a5f606155a39"}' - http_version: - recorded_at: Tue, 16 Jun 2015 13:19:19 GMT -- request: - method: put - uri: https://api.hubapi.com/companies/v2/companies/21827084?hapikey=demo - body: - encoding: UTF-8 - string: '{"properties":[{"name":"name","value":"Acme Cogs"},{"name":"domain","value":"abccogs.com"}]}' - headers: - Content-Type: - - application/json - response: - status: - code: 200 - message: OK - headers: - Access-Control-Allow-Credentials: - - 'false' - Content-Type: - - application/json; charset=UTF-8 - Date: - - Tue, 16 Jun 2015 13:22:03 GMT - Content-Length: - - '15184' - Connection: - - keep-alive - body: - encoding: ASCII-8BIT - string: !binary |- - eyJwb3J0YWxJZCI6NjI1MTUsImNvbXBhbnlJZCI6MjE4MjcwODQsImlzRGVs - ZXRlZCI6ZmFsc2UsInByb3BlcnRpZXMiOnsiY291bnRyeSI6eyJ2YWx1ZSI6 - IlVuaXRlZCBTdGF0ZXMiLCJ0aW1lc3RhbXAiOjE0MjMyMDU2MDg3OTAsInNv - dXJjZSI6IkJJREVOIiwic291cmNlSWQiOm51bGwsInZlcnNpb25zIjpbeyJu - YW1lIjoiY291bnRyeSIsInZhbHVlIjoiVW5pdGVkIFN0YXRlcyIsIn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3RhbXAiOjE0Mjg1ODcwMzE1 - ODQsInNvdXJjZSI6IkVOR0FHRU1FTlRTIiwic291cmNlSWQiOm51bGwsInZl - cnNpb25zIjpbeyJuYW1lIjoibnVtX25vdGVzIiwidmFsdWUiOiIyIiwidGlt - ZXN0YW1wIjoxNDI4NTg3MDMxNTg0LCJzb3VyY2UiOiJFTkdBR0VNRU5UUyIs - InNvdXJjZVZpZCI6W119XX19fQ== - http_version: - recorded_at: Tue, 16 Jun 2015 13:22:03 GMT -recorded_with: VCR 2.4.0 diff --git a/spec/fixtures/vcr_cassettes/company_update_class.yml b/spec/fixtures/vcr_cassettes/company_update_class.yml new file mode 100644 index 00000000..6b77b44c --- /dev/null +++ b/spec/fixtures/vcr_cassettes/company_update_class.yml @@ -0,0 +1,136 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.hubapi.com/companies/v2/companies/?hapikey=demo + body: + encoding: UTF-8 + string: '{"properties":[{"name":"name","value":"New Company 1531234621"}]}' + headers: + Content-Type: + - application/json + response: + status: + code: 200 + message: OK + headers: + Date: + - Tue, 10 Jul 2018 14:57:01 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '820' + Connection: + - keep-alive + Set-Cookie: + - __cfduid=d747f46d492efce9bfad2d9229b45dc771531234621; expires=Wed, 10-Jul-19 + 14:57:01 GMT; path=/; domain=.hubapi.com; HttpOnly + Access-Control-Allow-Credentials: + - 'false' + X-Trace: + - 2BCC35CC9F6288AB2C80CDEE1A17A0C86356B73020000000000000000000 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + Expect-Ct: + - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" + Server: + - cloudflare + Cf-Ray: + - 4383e15e5fb7b7d1-CDG + body: + encoding: UTF-8 + string: '{"portalId":62515,"companyId":856953039,"isDeleted":false,"properties":{"hs_lastmodifieddate":{"value":"1531234621266","timestamp":1531234621266,"source":"CALCULATED","sourceId":null,"versions":[{"name":"hs_lastmodifieddate","value":"1531234621266","timestamp":1531234621266,"source":"CALCULATED","sourceVid":[]}]},"name":{"value":"New + Company 1531234621","timestamp":1531234621266,"source":"API","sourceId":null,"versions":[{"name":"name","value":"New + Company 1531234621","timestamp":1531234621266,"source":"API","sourceVid":[]}]},"createdate":{"value":"1531234621266","timestamp":1531234621266,"source":"API","sourceId":"API","versions":[{"name":"createdate","value":"1531234621266","timestamp":1531234621266,"sourceId":"API","source":"API","sourceVid":[]}]}},"additionalDomains":[],"stateChanges":[],"mergeAudits":[]}' + http_version: + recorded_at: Tue, 10 Jul 2018 14:57:01 GMT +- request: + method: put + uri: https://api.hubapi.com/companies/v2/companies/856953039?hapikey=demo + body: + encoding: UTF-8 + string: '{"properties":[{"name":"name","value":"Acme Flask"},{"name":"domain","value":"abcflasks.com"}]}' + headers: + Content-Type: + - application/json + response: + status: + code: 200 + message: OK + headers: + Date: + - Tue, 10 Jul 2018 14:57:01 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1380' + Connection: + - keep-alive + Set-Cookie: + - __cfduid=d38c377bbc96cf20bdef4a5f2a03bdaf11531234621; expires=Wed, 10-Jul-19 + 14:57:01 GMT; path=/; domain=.hubapi.com; HttpOnly + Access-Control-Allow-Credentials: + - 'false' + X-Trace: + - 2B7DCAC069E745FFFB260BA658AC2B0AD889933138000000000000000000 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + Expect-Ct: + - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" + Server: + - cloudflare + Cf-Ray: + - 4383e1605adea86f-CDG + body: + encoding: UTF-8 + string: '{"portalId":62515,"companyId":856953039,"isDeleted":false,"properties":{"website":{"value":"abcflasks.com","timestamp":1531234621583,"source":"CALCULATED","sourceId":null,"versions":[{"name":"website","value":"abcflasks.com","timestamp":1531234621583,"source":"CALCULATED","sourceVid":[]}]},"hs_lastmodifieddate":{"value":"1531234621583","timestamp":1531234621583,"source":"CALCULATED","sourceId":null,"versions":[{"name":"hs_lastmodifieddate","value":"1531234621583","timestamp":1531234621583,"source":"CALCULATED","sourceVid":[]},{"name":"hs_lastmodifieddate","value":"1531234621266","timestamp":1531234621266,"source":"CALCULATED","sourceVid":[]}]},"domain":{"value":"abcflasks.com","timestamp":1531234621583,"source":"API","sourceId":"79ce0155-b260-4faa-b01c-3c640d1733f3","versions":[{"name":"domain","value":"abcflasks.com","timestamp":1531234621583,"sourceId":"79ce0155-b260-4faa-b01c-3c640d1733f3","source":"API","sourceVid":[]}]},"name":{"value":"Acme + Flask","timestamp":1531234621583,"source":"API","sourceId":"79ce0155-b260-4faa-b01c-3c640d1733f3","versions":[{"name":"name","value":"Acme + Flask","timestamp":1531234621583,"sourceId":"79ce0155-b260-4faa-b01c-3c640d1733f3","source":"API","sourceVid":[]},{"name":"name","value":"New + Company 1531234621","timestamp":1531234621266,"source":"API","sourceVid":[]}]}},"additionalDomains":[],"stateChanges":[],"mergeAudits":[]}' + http_version: + recorded_at: Tue, 10 Jul 2018 14:57:01 GMT +- request: + method: put + uri: https://api.hubapi.com/companies/v2/companies/?hapikey=demo + body: + encoding: UTF-8 + string: '{"properties":[{"name":"name","value":"Acme Flask"},{"name":"domain","value":"abcflasks.com"}]}' + headers: + Content-Type: + - application/json + response: + status: + code: 405 + message: Method Not Allowed + headers: + Date: + - Tue, 10 Jul 2018 14:57:01 GMT + Content-Type: + - text/html + Content-Length: + - '0' + Connection: + - keep-alive + Set-Cookie: + - __cfduid=d26f49d4cd28c7c0cae45ec3d9b2cf4f41531234621; expires=Wed, 10-Jul-19 + 14:57:01 GMT; path=/; domain=.hubapi.com; HttpOnly + Access-Control-Allow-Credentials: + - 'false' + Allow: + - HEAD,POST,GET,OPTIONS + X-Trace: + - 2B1497F4AEE26E84FBDFD42EE75E2FE70AA32ABBE0000000000000000000 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + Expect-Ct: + - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" + Server: + - cloudflare + Cf-Ray: + - 4383e16208bea887-CDG + body: + encoding: UTF-8 + string: '' + http_version: + recorded_at: Tue, 10 Jul 2018 14:57:01 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/vcr_cassettes/company_update_instance.yml b/spec/fixtures/vcr_cassettes/company_update_instance.yml new file mode 100644 index 00000000..c60c368c --- /dev/null +++ b/spec/fixtures/vcr_cassettes/company_update_instance.yml @@ -0,0 +1,136 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.hubapi.com/companies/v2/companies/?hapikey=demo + body: + encoding: UTF-8 + string: '{"properties":[{"name":"name","value":"New Company 1531234622"}]}' + headers: + Content-Type: + - application/json + response: + status: + code: 200 + message: OK + headers: + Date: + - Tue, 10 Jul 2018 14:57:02 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '820' + Connection: + - keep-alive + Set-Cookie: + - __cfduid=d027d1cd243dd0ddd74efc88ec03daa411531234622; expires=Wed, 10-Jul-19 + 14:57:02 GMT; path=/; domain=.hubapi.com; HttpOnly + Access-Control-Allow-Credentials: + - 'false' + X-Trace: + - 2BFD75EDFC0EC316192E4B1FBD87BB710055A0B6EC000000000000000000 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + Expect-Ct: + - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" + Server: + - cloudflare + Cf-Ray: + - 4383e165a849b7bf-CDG + body: + encoding: UTF-8 + string: '{"portalId":62515,"companyId":856818818,"isDeleted":false,"properties":{"hs_lastmodifieddate":{"value":"1531234622682","timestamp":1531234622682,"source":"CALCULATED","sourceId":null,"versions":[{"name":"hs_lastmodifieddate","value":"1531234622682","timestamp":1531234622682,"source":"CALCULATED","sourceVid":[]}]},"name":{"value":"New + Company 1531234622","timestamp":1531234622682,"source":"API","sourceId":null,"versions":[{"name":"name","value":"New + Company 1531234622","timestamp":1531234622682,"source":"API","sourceVid":[]}]},"createdate":{"value":"1531234622682","timestamp":1531234622682,"source":"API","sourceId":"API","versions":[{"name":"createdate","value":"1531234622682","timestamp":1531234622682,"sourceId":"API","source":"API","sourceVid":[]}]}},"additionalDomains":[],"stateChanges":[],"mergeAudits":[]}' + http_version: + recorded_at: Tue, 10 Jul 2018 14:57:02 GMT +- request: + method: put + uri: https://api.hubapi.com/companies/v2/companies/856818818?hapikey=demo + body: + encoding: UTF-8 + string: '{"properties":[{"name":"name","value":"Acme Cogs"},{"name":"domain","value":"abccogs.com"}]}' + headers: + Content-Type: + - application/json + response: + status: + code: 200 + message: OK + headers: + Date: + - Tue, 10 Jul 2018 14:57:03 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1370' + Connection: + - keep-alive + Set-Cookie: + - __cfduid=de4fc4d1bb00a3648bfa20266018470b61531234622; expires=Wed, 10-Jul-19 + 14:57:02 GMT; path=/; domain=.hubapi.com; HttpOnly + Access-Control-Allow-Credentials: + - 'false' + X-Trace: + - 2B04DC3BF7F0AC46E3E1D75351B0C4D48324C0F565000000000000000000 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + Expect-Ct: + - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" + Server: + - cloudflare + Cf-Ray: + - 4383e168ca6469b2-CDG + body: + encoding: UTF-8 + string: '{"portalId":62515,"companyId":856818818,"isDeleted":false,"properties":{"website":{"value":"abccogs.com","timestamp":1531234623200,"source":"CALCULATED","sourceId":null,"versions":[{"name":"website","value":"abccogs.com","timestamp":1531234623200,"source":"CALCULATED","sourceVid":[]}]},"hs_lastmodifieddate":{"value":"1531234623200","timestamp":1531234623200,"source":"CALCULATED","sourceId":null,"versions":[{"name":"hs_lastmodifieddate","value":"1531234623200","timestamp":1531234623200,"source":"CALCULATED","sourceVid":[]},{"name":"hs_lastmodifieddate","value":"1531234622682","timestamp":1531234622682,"source":"CALCULATED","sourceVid":[]}]},"domain":{"value":"abccogs.com","timestamp":1531234623200,"source":"API","sourceId":"9c180937-4a5e-4b69-995d-5c8e723d67fc","versions":[{"name":"domain","value":"abccogs.com","timestamp":1531234623200,"sourceId":"9c180937-4a5e-4b69-995d-5c8e723d67fc","source":"API","sourceVid":[]}]},"name":{"value":"Acme + Cogs","timestamp":1531234623200,"source":"API","sourceId":"9c180937-4a5e-4b69-995d-5c8e723d67fc","versions":[{"name":"name","value":"Acme + Cogs","timestamp":1531234623200,"sourceId":"9c180937-4a5e-4b69-995d-5c8e723d67fc","source":"API","sourceVid":[]},{"name":"name","value":"New + Company 1531234622","timestamp":1531234622682,"source":"API","sourceVid":[]}]}},"additionalDomains":[],"stateChanges":[],"mergeAudits":[]}' + http_version: + recorded_at: Tue, 10 Jul 2018 14:57:03 GMT +- request: + method: put + uri: https://api.hubapi.com/companies/v2/companies/?hapikey=demo + body: + encoding: UTF-8 + string: '{"properties":[{"name":"name","value":"Acme Cogs"},{"name":"domain","value":"abccogs.com"}]}' + headers: + Content-Type: + - application/json + response: + status: + code: 405 + message: Method Not Allowed + headers: + Date: + - Tue, 10 Jul 2018 14:57:03 GMT + Content-Type: + - text/html + Content-Length: + - '0' + Connection: + - keep-alive + Set-Cookie: + - __cfduid=de339db906cdbd8809e95e2288e0639151531234623; expires=Wed, 10-Jul-19 + 14:57:03 GMT; path=/; domain=.hubapi.com; HttpOnly + Access-Control-Allow-Credentials: + - 'false' + Allow: + - HEAD,POST,GET,OPTIONS + X-Trace: + - 2B6106CE17C91AB5BE3DA6C623F3AFBDA73090FB82000000000000000000 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + Expect-Ct: + - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" + Server: + - cloudflare + Cf-Ray: + - 4383e16c4c12bd56-CDG + body: + encoding: UTF-8 + string: '' + http_version: + recorded_at: Tue, 10 Jul 2018 14:57:03 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/vcr_cassettes/contact_update.yml b/spec/fixtures/vcr_cassettes/contact_update.yml deleted file mode 100644 index 55ab629e..00000000 --- a/spec/fixtures/vcr_cassettes/contact_update.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: https://api.hubapi.com/contacts/v1/contact/vid/invalid/profile?hapikey=demo - body: - encoding: US-ASCII - string: ! '{"properties":[{"property":"firstname","value":"Steve"},{"property":"lastname","value":"Cunningham"}]}' - headers: {} - response: - status: - code: 404 - message: Not Found - headers: - Content-Type: - - text/html;charset=utf-8 - Date: - - Fri, 22 Feb 2013 20:29:45 GMT - Server: - - Apache-Coyote/1.1 - Content-Length: - - '979' - Connection: - - keep-alive - body: - encoding: US-ASCII - string: ! '
type Status - report
message Not Found
description The - requested resource (Not Found) is not available.