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

Balance: Wrong type for new InstantAvailable field #1202

Closed
jheth opened this issue Oct 9, 2020 · 0 comments · Fixed by #1203
Closed

Balance: Wrong type for new InstantAvailable field #1202

jheth opened this issue Oct 9, 2020 · 0 comments · Fixed by #1203

Comments

@jheth
Copy link
Contributor

jheth commented Oct 9, 2020

This change introduced a serialization issue:

InstantAvailable *BalanceDetails `json:"instant_available"`

[ERROR] Couldn't deserialize JSON (response status: 200, body sample: '{\n "object": "balance",\n "available": [\n {\n "amount": 118300,\n "currency": "usd",\n "source_types": {\n "card": 118300\n }\n }\n ],\n "instant_available": [\n {\n "amount": 118300,\n "currency": "usd",\n "source_types": {\n "card": 118300\n }\n }\n ],\n "livemode": false,\n "pending": [\n {\n "amount": 0,\n "currency": "usd",\n "source_types": {\n "card": 0\n }\n }\n ]\n}\n'): json: cannot unmarshal array into Go struct field Balance.instant_available of type stripe.BalanceDetails

It needs to be[]*Amount instead of *BalanceDetails

InstantAvailable []*Amount               `json:"instant_available"`
nadaismail-stripe pushed a commit that referenced this issue Oct 18, 2024
* Pinning chrome version to fix CI

* Changing the browser tool steps
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 a pull request may close this issue.

1 participant