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 new invoicing schema to get invoice charges #1627

Open
mjallday opened this issue Jan 14, 2015 · 0 comments
Open

Use new invoicing schema to get invoice charges #1627

mjallday opened this issue Jan 14, 2015 · 0 comments

Comments

@mjallday
Copy link
Contributor

This is required since we are going to start providing more granular charges and additional dimensions.

Currently the invoice returns data using a set of attributes per charge. e.g.

{
         "card_credits_total_fee":0,
         "bank_account_debit_variable_fee_cap":500,
         "refunds_count":0,
         "bank_account_debits_total_amount":0,
}

This is unwieldy so I've changed it to return a fees collection and each item within this array has a standard set of attributes

{
    "fees":[
            {
               "count":0,
               "total_fee":0,
               "variable_fee_cap":500,
               "name":"bank_account_debits",
               "variable_fee_percentage":1.0,
               "fixed_fee":30,
               "total_amount":0
            },
    ]
}

hopefully it should now be as simple as iterating over this list of fees in order to render the invoice charges.

e.g. (var fee in fees) { print fee.name; }

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

No branches or pull requests

1 participant