Created attachment 76815 [details] [review] Bug 20944: OpenAPI spec for /patrons/{patron_id}/account/credits
Created attachment 76816 [details] [review] 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
Created attachment 77645 [details] [review] Bug 20944: OpenAPI spec for /patrons/{patron_id}/account/credits Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 77646 [details] [review] 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>
Ooops, I thought I'd already signed this one off.. Looks good, works well.. no breakages and completes the functionality off nicely for working with patron accounts. Signing Off.
Created attachment 77928 [details] [review] Bug 20944: OpenAPI spec for /patrons/{patron_id}/account/credits Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 77929 [details] [review] 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>
Awesome work all! Pushed to master for 18.11
Created attachment 78329 [details] [review] Bug 20944: Fix perlcritic issues Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(In reply to Tomás Cohen Arazi from comment #9) > Created attachment 78329 [details] [review] [review] > Bug 20944: Fix perlcritic issues > > Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Followup pushed to master