balanced / balanced-api

Balanced API specification.
220 stars 72 forks source link

Return "type" and "period" for dispute invoice #640

Closed kyungmin closed 10 years ago

kyungmin commented 10 years ago

Dispute invoices are currently being generated separately from regular invoices, which would potentially create confusions for users. They also return inconsistent response format, which results in an unreliable way of detecting the invoice type in the dashboard.

Transaction invoice returns period array with disputes_total_fee as 0:

{
  "invoices": [
    {
     ...
      "period": [
        "2014-05-28T00:03:37.523859Z",
        "2014-05-28T23:59:29.504211Z"
      ],
      "disputes_total_fee": 0,
     ...
    }
}

Dispute invoice returns no period with non-zero disputes_total_fee:

{
  "invoices": [
    {
     ...
      "disputes_total_fee": 123,
     ...
    }

@cieplak can you suggest which of the following changes we can make? 1) Return type and period for dispute invoice 2) (Better solution) Combine dispute invoices with regular invoices into one (https://github.com/balanced/balanced-dashboard/issues/1059)

cieplak commented 10 years ago

(2) may be a better solution from a UI perspective in that it consolidates the invoice view, but it would prohibit us from settling different types of invoices with different funding instruments. Clients have requested that we settle their fee invoices from one bank account and dispute invoices from another account; (2) would remove this option.

kyungmin commented 10 years ago

@cieplak Didn't realize users have requested the invoice separation. Can you make (1) happen some time soon?

cieplak commented 10 years ago

@kyungmin https://github.com/PoundPay/balanced/pull/544

kyungmin commented 10 years ago

@cieplak when is this going to get merged in?

mjallday commented 10 years ago

a fix has been deployed.

kyungmin commented 10 years ago

Still not seeing period and type in the invoice response

mjallday commented 10 years ago

this will appear for all subsequent invoices automatically. we'll create a job to backfill this information

kyungmin commented 10 years ago

How long would it take to backfill the information?