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

no transform_keys for bulk import contacts #87

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

aurorareachire
Copy link

@aurorareachire aurorareachire commented May 2, 2022

There is no direct/explicit support for bulk import in the SDK, but it can nontheless be invoked with:
res = client.post('import/bulk_import', data)

This mostly works but not quite. Bulk import requests use snake_case keys, not camelCase, unlike most of the rest of the API, and the normalize_body processing breaks it.

client.post('import/bulk_import', data)
data should not have all its keys mapped to camelCase, this API will simply ignore e.g firstName, lastName.

This API call, uniquely, uses the keys contacts and callback. With this PR, the normalize_body method now leaves the body alone, in the presence of those keys, as it already did in select other cases.

REQUEST_BODY: #{env.request_body}\n\n"
RESPONSE_BODY: #{response.body}\n\n"
MESSAGE
rescue StandardError => e
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ActiveCampaign::Error#message has the variable name 'e'

Copy link

codeclimate bot commented May 21, 2024

Code Climate has analyzed commit 9f52d04 and detected 3 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 3

View more on Code Climate.

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

Successfully merging this pull request may close these issues.

2 participants