Koha-clms/Koha/REST/V1
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
..
Acquisitions Bug 33080: Adapt other use-cases 2023-03-10 12:04:07 -03:00
Auth Bug 30962: (QA follow-up) Rename attribute and simplify tests 2023-02-03 10:30:13 -03:00
Biblios Bug 24857: API spec 2022-07-08 15:59:55 -03:00
CashRegisters Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Clubs Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
Config/SMTP Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ERM Bug 33482: Propagate errors from EBSCO's ws to the UI 2023-05-05 09:13:18 -03:00
OAuth Bug 32178: Remove security breach introduced in bug 31378 2022-11-15 18:43:45 -03:00
Patrons Bug 21043: Handle exceptions and switch to debit response 2023-05-05 12:13:52 -03:00
AdvancedEditorMacro.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ArticleRequests.pm Bug 27947: (QA follow-up) Make parameters a hashref 2021-10-06 10:09:54 +02:00
Auth.pm Bug 32713: Throw exception on unexpected x-koha-embed header 2023-03-16 16:12:31 -03:00
AuthorisedValueCategories.pm Bug 32997: Add REST API endpoint to list authorised values for multiple given categories 2023-03-02 12:00:15 -03:00
AuthorisedValues.pm Bug 32997: (QA follow-up) values => authorised_values 2023-03-02 12:00:17 -03:00
Authorities.pm Bug 32735: Add endpoint to list authorities 2023-05-05 12:13:49 -03:00
BackgroundJobs.pm Bug 30982: (QA follow-up) Spelling 2022-09-23 08:57:50 -03:00
Biblios.pm Bug 33328: Rename x-marc-schema => x-record-schema 2023-05-05 09:13:24 -03:00
Checkouts.pm Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals` 2022-07-05 09:46:04 -03:00
CirculationRules.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Cities.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ERM.pm Bug 32030: ERM - Users 2022-11-08 09:43:36 -03:00
Holds.pm Bug 33470: Don't calculate overridden hold limits 2023-05-05 10:18:37 -03:00
Illbackends.pm Bug 22440: Move backend statuses api endpoint 2023-05-05 09:13:43 -03:00
Illrequests.pm Bug 22440: Add Koha::Illrequests->filter_by_visible 2023-05-05 09:13:40 -03:00
ImportBatchProfiles.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ImportRecordMatches.pm Bug 30855: Rename /import => /import_batches 2022-06-02 13:42:28 -03:00
Items.pm Bug 33146: Add public items lookup route 2023-03-31 12:26:57 +02:00
Libraries.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
OAuth.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Patrons.pm Bug 32426: (follow-up) Fix api/v1/patrons.t 2023-03-28 14:54:04 +02:00
Quotes.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ReturnClaims.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SearchFilter.pm Bug 17170: (QA follow-up) Spec cleanup 2022-10-21 11:15:22 -03:00
Stage.pm
…
Static.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Suggestions.pm Bug 32030: rename filter_by_have_subpermission with filter_by_have_permission 2022-11-08 09:43:35 -03:00
Tickets.pm Bug 31028: (follow-up) Update notice module codes 2023-03-06 11:23:17 -03:00
TransferLimits.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
TwoFactorAuth.pm Bug 30588: Add the option to require 2FA setup on first staff login 2022-10-21 11:36:57 -03:00