Sha256: 4799f8d4ce50fdb99a50c7d679cbd14283863453411fe0a9bf695900e955a4ad

Contents?: true

Size: 565 Bytes

Versions: 28

Compression:

Stored size: 565 Bytes

Contents

module Services
  module Hubspot
    module Contacts
      class Update
        def initialize(id, properties)
          @id = id
          @properties = properties
        end

        def call
          basic_api = ::Hubspot::Crm::Contacts::BasicApi.new
          params = { auth_names: 'oauth2', body: contact_input }
          basic_api.update(@id, params)
        end

        private

        def contact_input
          @contact_input ||= ::Hubspot::Crm::Contacts::SimplePublicObjectInput.new(properties: @properties)
        end
      end
    end
  end
end

Version data entries

28 entries across 14 versions & 1 rubygems

Version Path
hubspot-api-client-7.1.0 sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-7.1.0 sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-7.0.0 sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-7.0.0 sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-6.0.0 sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-6.0.0 sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-5.0.0 sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-5.0.0 sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-4.0.0 sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-4.0.0 sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-3.3.0 sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-3.3.0 sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-3.2.0 sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-3.2.0 sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-3.1.1 sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-3.1.1 sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-3.1.0.pre.beta sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-3.1.0.pre.beta sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-3.0.0.pre.beta sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb
hubspot-api-client-3.0.0.pre.beta sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb