Sha256: 9623f1dcbc270246c8488fc8e9aa566f87f0ce84f776e224a764474d301fb214

Contents?: true

Size: 561 Bytes

Versions: 15

Compression:

Stored size: 561 Bytes

Contents

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

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

        private

        def company
          ::Hubspot::Crm::Companies::SimplePublicObjectInput.new(
            properties: @properties
          )
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hubspot-api-client-7.1.0 sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb
hubspot-api-client-7.0.0 sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb
hubspot-api-client-6.0.0 sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb
hubspot-api-client-5.0.0 sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb
hubspot-api-client-4.0.0 sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb
hubspot-api-client-3.3.0 sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb
hubspot-api-client-3.2.0 sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb
hubspot-api-client-3.1.1 sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb
hubspot-api-client-3.1.0.pre.beta sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb
hubspot-api-client-3.0.0.pre.beta sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb
hubspot-api-client-2.3.2 sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb
hubspot-api-client-2.3.1 sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb
hubspot-api-client-2.2.0 sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb
hubspot-api-client-2.1.0 sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb
hubspot-api-client-2.0.0 sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb