Create check-refund endpoint

Description

This story is part of the fees/fines refactoring feature. Design doc: https://folio-org.atlassian.net/wiki/pages/viewpage.action?pageId=1776416

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 new "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.

New endpoint to be added to the mod-feesfines module:

Request body

Reponse

  • In case of success:
    Status code: 200
    Response body:

  • In case if the amount is too high:
    Status code: 422
    Response body:

  • In case of invalid amount value (e.g. negative or not parsable):
    Status code: 422
    Response body:

Environment

None

Potential Workaround

None

Attachments

4

Checklist

hide

TestRail: Results

Activity

Show:

Roman Barannyk August 25, 2020 at 10:23 AM

I verified these changes on snapshot, it works as expected:

Done

Details

Assignee

Reporter

Labels

Priority

Story Points

Sprint

Development Team

Vega

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created July 13, 2020 at 1:23 PM
Updated August 25, 2020 at 12:31 PM
Resolved August 25, 2020 at 12:31 PM
TestRail: Cases
TestRail: Runs