Koha-clms/Koha/REST/V1/Patrons
Martin Renvoize a702f57adf
Bug 21043: Handle exceptions and switch to debit response
We were cheating a bit here and expecting a 'debit' to be sent in but a
'line' to be returned.

We should really be sending a debit and returning a debit.. so I've
update the paths schema as such and we're now coercing the
Koha::Account::Line object that's returned by Koha::Account->add_debit
into a Koha::Account::Debit object. Longer term it would be nice to
convert returns from the various Koha::Account methods to their correct
Koha::Account:: objects as apposed to them all being the base ::Line

I've also added some code to catch exceptions that can be thrown by
Koha::Account->add_debit and added the appropriate 400 errors into the
path specs again.

Finally.. I added more unit tests to prove the above

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-05 12:13:52 -03:00
..
Password Bug 29926: Add pasword expiration route for API 2022-05-06 10:33:09 -10:00
Account.pm Bug 21043: Handle exceptions and switch to debit response 2023-05-05 12:13:52 -03:00
Attributes.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Holds.pm Bug 27366: Add controller 2021-03-16 16:08:31 +01:00
Password.pm Bug 27342: Remove dbh from C4::Auth 2022-08-16 10:45:41 -03:00