Koha-clms/Koha/REST
Tomas Cohen Arazi 814078ab40 Bug 21786: Make balance and credits endpoints handle library_id
This patch:
- Adds the branchcode <-> library_id mapping in the controller
- Adds 'library_id' to the credit and account_line definitions
- Makes add_credit handle the library_id param, passing it to the
  underlying $account->add_credit method.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons_accounts.t
=> FAIL: Tests fail, because library_id is not mapped
(balance) and because it is not handled when adding a credit.
- Apply this patch
- Run:
  k$ prove t/db_dependent/api/v1/patrons_accounts.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-01-08 15:50:50 +00:00
..
Plugin Bug 21116: Add API routes through plugins 2018-09-14 17:21:14 +00:00
V1 Bug 21786: Make balance and credits endpoints handle library_id 2019-01-08 15:50:50 +00:00
V1.pm Bug 21334: Add bibliographic content type definitions 2018-09-14 20:30:47 +00:00