We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was reading the documentation and it does not work as the code indicate.
it raise and error not finding a file "models/object_type"
However running the CURL command it works perfectly.
https://developers.hubspot.com/docs/api/crm/associations
I've tested with versions 17.1 and 17.2
# this code fails require 'hubspot-api-client' api_client = Hubspot::Client.new(access_token: 'YOUR_ACCESS_TOKEN') api_response = api_client.crm.objects.basic_api.create(object_type: "deals", object_id: "DEAL_ID", to_object_type: "contacts", to_object_id: "CONTACT_ID", association_spec: [{"associationCategory":"USER_DEFINED","associationTypeId":ASSOCIATION_ID}])
# This command works curl --request PUT \ --url https://api.hubapi.com/crm/v4/objects/deals/DEAL_ID/associations/contacts/CONTACT_ID \ --header 'authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'content-type: application/json' \ --data '[ { "associationCategory": "USER_DEFINED", "associationTypeId": ASSOCIATION_ID } ]'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I was reading the documentation and it does not work as the code indicate.
it raise and error not finding a file "models/object_type"
However running the CURL command it works perfectly.
https://developers.hubspot.com/docs/api/crm/associations
I've tested with versions 17.1 and 17.2
The text was updated successfully, but these errors were encountered: