Skip to content

Use new invoicing schema to get invoice charges #1627

@mjallday

Description

@mjallday

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; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions