sample-apps/companies-app/app/lib/services/hubspot/associations/delete.rb in hubspot-api-client-2.0.0 vs sample-apps/companies-app/app/lib/services/hubspot/associations/delete.rb in hubspot-api-client-2.1.0
- old
+ new
@@ -9,11 +9,11 @@
def call
::Hubspot::Crm::Associations::BatchApi.new.archive_batch(
'companies',
'contacts',
- body: association,
+ batch_input_public_association: association,
auth_names: 'oauth2'
)
end
private
@@ -26,10 +26,11 @@
def contacts_to_assotiate
@contacts_ids.map do |id|
::Hubspot::Crm::Associations::PublicAssociation.new(
from: ::Hubspot::Crm::Associations::PublicObjectId.new(id: @company_id),
- to: ::Hubspot::Crm::Associations::PublicObjectId.new(id: id)
+ to: ::Hubspot::Crm::Associations::PublicObjectId.new(id: id),
+ type: 'company_to_contact'
)
end
end
end
end
\ No newline at end of file