[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
Fri Jul 8 10:05:03 CEST 2016


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

--- Comment #18 from Julian Maurice <julian.maurice at biblibre.com> ---
(In reply to Lari Taskula from comment #15)
> - Payments should be POST instead of PUT (PUT is idempotent, but
>   making multiple payments has different effect than sending just one)
I agree

> - If patron has amountoustanding 0, payment is still possible. 
>   Should we return an error instead?
Yes, probably

> - /accountlines/:borrowernumber/amountpayment is confusing because of
>   :borrowernumber. How about /accountlines/amountpayment?borrowernumber=X
I believe it's not a good idea to mix GET and POST parameters. What about POST
/borrowers/:borrowernumber/payment ?

> - 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 think it couldn't hurt. But what currency should we return ? The default
(active) currency ?

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


More information about the Koha-bugs mailing list