I'm getting an error using the gem when trying to use the lists membership API.
The specific call I'm using when I get this error is api_client.crm.lists.memberships_api.get_page(list_id: list_id)(The ID points to a list of companies)
This returns the error:
NoMethodError: undefined method 'to_i' for an instance of Hash
which comes from lib/hubspot/codegen/crm/lists/models/collection_response_long.rb:161
It looks like it's passing the _deserialize method the type :Integer for the values in the results array, when in fact these are hashes:
I'm getting an error using the gem when trying to use the lists membership API.
The specific call I'm using when I get this error is
api_client.crm.lists.memberships_api.get_page(list_id: list_id)
(The ID points to a list of companies)This returns the error:
NoMethodError: undefined method 'to_i' for an instance of Hash
which comes from
lib/hubspot/codegen/crm/lists/models/collection_response_long.rb:161
It looks like it's passing the
_deserialize
method the type:Integer
for the values in the results array, when in fact these are hashes:More specifically, the method is called on the line
lib/hubspot/codegen/crm/lists/models/collection_response_long.rb:137
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
where $1 is
Integer
This has ultimately come from the
Hubspot::Crm::Lists::CollectionResponseLong#openapi_types
method:Updating this method like this seems to fix the issue:
Though I'm not sure if there are any edge cases this might break.
Let me know if you need any other info to replicate this.
Thanks!