Skip to content
New issue

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

Add a showListMemberships param to Hubspot::Contact.find_by_email #183

Open
dventulieri opened this issue Jan 28, 2019 · 1 comment
Open

Comments

@dventulieri
Copy link

The showListMemberships param is set to false by default by HubSpot when getting contacts by a batch of email addresses. My use case requires getting contact lists based on an array of email addresses. However, when I call Hubspot::Contact.find_by_email([email1, email2]), no contact list data is returned because we are not setting the showListMemberships param.

We can get around this by adding showListMemberships: true to the parameters on the following line: https://github.com/adimichele/hubspot-ruby/blob/d9a369eb2aacda5a87b7de46942dec3e774e191b/lib/hubspot/contact.rb#L113

i.e. :

when Array then [true, GET_CONTACTS_BY_EMAIL_PATH, { batch_email: emails, showListMemberships: true }]

Would it be possible to add a showListMemberships parameter to the method so we can specify if we need lists or not?

Otherwise, I need to call Hubspot::Connection.get( ... ) directly. I would prefer to use the Hubspot::Contact.find_by_email method of course.

Thanks!

@dventulieri dventulieri changed the title Set the showListMemberships to true when calling Contact.find_by_email with an array of emails. Add a showListMemberships param to Hubspot::Contact.find_by_email Jan 28, 2019
@dventulieri dventulieri changed the title Add a showListMemberships param to Hubspot::Contact.find_by_email Add a showListMemberships param to Hubspot::Contact.find_by_email Jan 28, 2019
@dventulieri
Copy link
Author

PR: #184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant