Koha/t/db_dependent/api/v1
Tomas Cohen Arazi d19d8ec049 Bug 20944: Add route to add credits to a patron's account
This patch adds the /patrons/{patron_id}/account/credits endpoint, that
can be used to add credits to a patron's account. It is implemented so
the new credits are used to pay existing debts.

To test:
- Run:
  $ kshell
k$ prove t/db_dependent/api/v1/patrons_accounts.t
=> SUCCESS: Tests pass!
- Make your favourite REST testing tool (RESTer on Firefox?) do:
  POST /api/v1/patrons/{patron_id}/account/credits
{
  "amount": 100
}
- Play with other possible attributes on the credit object.
- Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-08-31 12:47:00 +00:00
..
acquisitions_vendors.t Bug 18120: /acquisitions/vendors unit tests 2017-09-29 17:13:13 -03:00
auth.t Bug 18137: (QA followup) Make sure the session exists and is expired on expiration tests 2017-09-21 11:27:05 -03:00
cities.t Bug 20004: Unit tests 2018-02-16 17:53:41 -03:00
holds.t Bug 21133: Fix use statements order 2018-07-31 16:28:02 -03:00
illrequests.t Bug 7317: (QA followup) Rename 'branch' for 'library' 2017-11-09 11:42:16 -03:00
oauth.t Bug 20624: Net::OAuth2::AuthorizationServer is not a hard dependency 2018-05-09 12:56:03 -03:00
patrons.t Bug 20287: Fix tests expecting a warning 2018-07-18 15:49:56 +00:00
patrons_accounts.t Bug 20944: Add route to add credits to a patron's account 2018-08-31 12:47:00 +00:00