Details
-
Story
-
Status: Closed (View Workflow)
-
TBD
-
Resolution: Done
-
None
-
-
EPAM-Veg Sprint 95, EPAM-Veg Sprint 96
-
5
-
Vega
Description
Feature overview:
This story is part of the fees/fines refactoring feature. Design doc: https://wiki.folio.org/pages/viewpage.action?pageId=36576978
Currently, calculations for fee/fine actions are happening on FE without any checks on the BE side.
Instead, when a value is entered in the amount field, an additional call to the "check" endpoint needs to be made prior to the action in order to check if this value is valid and if the action is allowed. After receiving a positive response from BE ("allowed": true), when a user proceeds with the fee/fine action, instead of updating Account and creating FeeFineAction objects directly UI needs to call the new endpoint with the same body.
New endpoint to be added to the mod-feesfines module:
POST /accounts/{accountId}/pay
Request body
{ "amount": "1.0" }
BE should take care of updating Account object and creating new FeeFineAction object.
Reponse
- In case of success:
Status code: 201
Response body:{ "accountId": "e74d50c9-0c69-4f80-9e1b-a819719fc0c9" "amount": "1.0" "feeFineActionId": "8fe3026e-8eb0-49b3-8613-f889b8d0fe20" }
- In case if the amount is too high:
Status code: 422
Response body:{ "accountId": "e74d50c9-0c69-4f80-9e1b-a819719fc0c9" "amount": "1.0" "errorMessage": "Payment amount exceeds the selected amount" }
- In case of invalid amount value (e.g. negative or not parsable):
Status code: 422
Response body:{ "accountId": "e74d50c9-0c69-4f80-9e1b-a819719fc0c9" "amount": "abcdefg", "errorMessage": "Invalid amount entered" }
TestRail: Results
Attachments
Issue Links
- defines
-
UXPROD-2445 Refactoring of Fees/Fines Actions
-
- Closed
-