Sha256: d1d7bc27ade990e0452ffb7ab2381eac536ee2254b0722bfec68b26d6aaa9c6e
Contents?: true
Size: 709 Bytes
Versions: 15
Compression:
Stored size: 709 Bytes
Contents
module Services module Hubspot module Properties class Update def initialize(name, params) @name = name @params = params end def call core_api = ::Hubspot::Crm::Properties::CoreApi.new params = { auth_names: 'oauth2', body: property_update } core_api.update('contact', @name, params) end private def property_update @params.filter! do |(key, value)| ::Hubspot::Crm::Properties::PropertyUpdate.attribute_map.keys.include?(key.to_sym) end @property_update ||= ::Hubspot::Crm::Properties::PropertyUpdate.new(@params) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems