[Koha-bugs] [Bug 20944] Add routes to add credits to a patron's account

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Aug 10 12:14:02 CEST 2018


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

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #76816|0                           |1
        is obsolete|                            |

--- Comment #4 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 77646
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77646&action=edit
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 at ptfs-europe.com>

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


More information about the Koha-bugs mailing list