feat: add function for getting a list of attributes for customers#158
Closed
omBratteng wants to merge 1 commit intocustomerio:mainfrom
Closed
feat: add function for getting a list of attributes for customers#158omBratteng wants to merge 1 commit intocustomerio:mainfrom
omBratteng wants to merge 1 commit intocustomerio:mainfrom
Conversation
rebelchris
approved these changes
Jul 5, 2024
nensidosari
approved these changes
Jul 5, 2024
mike-engel
requested changes
May 8, 2026
| } | ||
|
|
||
| getAttributesBatch(ids: string[]) { | ||
| if (isEmpty(ids)) { |
Collaborator
There was a problem hiding this comment.
isEmpty needs to be updated to handle arrays
| ); | ||
| }); | ||
|
|
||
| test('#getAttributesBatch: fails without customerId', (t) => { |
Collaborator
There was a problem hiding this comment.
Suggested change
| test('#getAttributesBatch: fails without customerId', (t) => { | |
| test('#getAttributesBatch: fails without customer ids', (t) => { |
| test('#getAttributesBatch: success with default type id', (t) => { | ||
| sinon.stub(t.context.client.request, 'post'); | ||
| t.context.client.getAttributesBatch(['1']); | ||
| t.truthy((t.context.client.request.post as SinonStub).calledWith(`${RegionUS.apiUrl}/customers/attributes`)); |
Collaborator
There was a problem hiding this comment.
Suggested change
| t.truthy((t.context.client.request.post as SinonStub).calledWith(`${RegionUS.apiUrl}/customers/attributes`)); | |
| t.true((t.context.client.request.post as SinonStub).calledWith(`${RegionUS.apiUrl}/customers/attributes`)); |
| t.falsy((t.context.client.request.post as SinonStub).calledWith(`${RegionUS.apiUrl}/customers/attributes`)); | ||
| }); | ||
|
|
||
| test('#getAttributesBatch: success with default type id', (t) => { |
Collaborator
There was a problem hiding this comment.
Another assertion is needed to make sure the ids were passed through correctly
Author
|
@mike-engel I no longer work at dailydev, so I do not have access to the fork and am unable to do the changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a function for getting a list of customers attributes
https://customer.io/docs/api/app/#operation/getPeopleById