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

Add CurrencyAccountId to AccountBalance struct #92

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

mickeyreiss
Copy link
Contributor

Problem

The GET /balances/:id API returns a currency_account_id field when this API is requested with the query param ?withCurrencyAccountId=true.

The go sdk seems to be missing this field in the AccountBalance struct.

Example HTTP Request & Response

GET /balances/ent_abc123?withCurrencyAccountId=true HTTP/1.1
Accept: application/json
Authorization: Bearer sk_<redacted>
Host: balances.checkout.com
 
HTTP/1.1 200 OK 
{
    "data": [
        {
            "currency_account_id": "ca_def456",
            "descriptor": "Acme, Inc. - USD",
            "holding_currency": "USD",
            "balances": {
                "available": 123456,
                "collateral": 0,
                "payable": 0,
                "pending": 0
            }
        }
    ],
    "_links": {
        "self": {
            "href": "https://balances.checkout.com/balances/ent_abc123?withCurrencyAccountId=true"
        }
    }
}

Solution

Add the missing field to the AccountBalance struct.

@armando-rodriguez-cko armando-rodriguez-cko self-assigned this Nov 10, 2023
@armando-rodriguez-cko armando-rodriguez-cko added bug Something isn't working question Further information is requested labels Nov 10, 2023
@armando-rodriguez-cko armando-rodriguez-cko removed their assignment Nov 10, 2023
@armando-rodriguez-cko armando-rodriguez-cko added help wanted Extra attention is needed and removed bug Something isn't working labels Nov 10, 2023
Copy link
Contributor

@armando-rodriguez-cko armando-rodriguez-cko left a comment

Choose a reason for hiding this comment

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

@armando-rodriguez-cko armando-rodriguez-cko merged commit e0ec54c into checkout:master Nov 10, 2023
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Development

Successfully merging this pull request may close these issues.

2 participants