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

Fix response objects returned on Customer functions #142

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

CassioMG
Copy link
Contributor

@CassioMG CassioMG commented Jun 21, 2024

It turns out that our Customer class functions are returning a raw request response instead of returning its data field.

This PR fixes that so it matches the expected return types for those functions as following:

  • getCustomer should return object of type GetCustomerResponse
  • add should return object of type AddCustomerResponse
  • update should return object of type AddCustomerResponse

All the other class functions on the SDK also follow this same pattern of returning response.data field, so let's keep this same pattern for the Customer class.

It is important to notice that it is a BREAKING CHANGE for wallets out there that are using our existing Customer class.

Note: we need to merge this PR first in order to fix the tests on the Sep-7 PR

@CassioMG CassioMG merged commit b768607 into main Jun 24, 2024
8 checks passed
@CassioMG CassioMG deleted the cg-fix-customer-response branch June 24, 2024 14:49
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