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

Use correct Amount type for InstantAvailable #1203

Merged

Conversation

jheth
Copy link
Contributor

@jheth jheth commented Oct 9, 2020

Fixes #1202

[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

@CLAassistant
Copy link

CLAassistant commented Oct 9, 2020

CLA assistant check
All committers have signed the CLA.

@richardm-stripe richardm-stripe merged commit 82b7ab2 into stripe:master Oct 9, 2020
@richardm-stripe
Copy link
Contributor

Thanks for the fix @jheth, this is released in v72.12.1

nadaismail-stripe pushed a commit that referenced this pull request Oct 18, 2024
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.

Balance: Wrong type for new InstantAvailable field
3 participants