[Koha-bugs] [Bug 15165] REST API routes to list, edit and pay borrower's accountlines

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 22 14:14:42 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15165

Lari Taskula <larit at student.uef.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |In Discussion

--- Comment #15 from Lari Taskula <larit at student.uef.fi> ---
(In reply to Andreas Hedström Mace from comment #10)
> Created attachment 50790 [details] [review]
> It is not possible to pay specified/partial amounts (for one or more
> accountlines).
Maybe I misunderstood the problem, but doesn't this do it:
  PUT /accountlines/123/partialpayment
  {"amount": 5.00, "description": "payment description"} 
Or pay payment with specific amount to borrower:
  PUT /accountlines/:borrowernumber/amountpayment
  { "amount": 5, "description": "payment description" }

Anyway, comments to this bug. I think some fixes are needed.

- Payments should be POST instead of PUT (PUT is idempotent, but
  making multiple payments has different effect than sending just one)
- If patron has amountoustanding 0, payment is still possible. 
  Should we return an error instead? Also the same should be considered
  when making a payment bigger than current amountoutstanding.
- /accountlines/:borrowernumber/amountpayment is confusing because of
  :borrowernumber. How about /accountlines/amountpayment?borrowernumber=X
- Do you think it would be useful to return total and currency? e.g.
  GET /accountlines?borrowernumber=1
  {
        "total": 100.00,
        "currency": "USD",
        "rows": [
          {
                // accountline-object with amountoutstanding 25,
                // accountline-object with amountoutstanding 60,
                // accountline-object with amountoutstanding 15
          }
        ]
  }

I will switch this back to "In Discussion".

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list