Hi,
I’m having an issue with the hubspot ruby gem because it is not returning any custom properties.
The weird thing is that it works if I test it in the documentation page with my api key and the fields I want, but if I copy and paste that query with the same api key, it doesn’t return the custom fields I want.
I would appreciate some help with this!
I solved it by specifying the params_encoding option to :multi like this:
def api_client
config = ::Hubspot::Crm::Contacts::Configuration.new do |config|
config.api_key['hapikey'] = "my_api_key"
config.params_encoding = :multi
end
::Hubspot::Crm::Contacts::ApiClient.new(config)
end
Hubspot::Crm::Contacts::BasicApi.new(api_client).get_by_id(...)
Many thanks, pity the copy and paste did not work, wonder why this happened. I wonder if the code ever get tested on the HubSpot end ?