Koha/api/v1/swagger/definitions/cashup.json
Martin Renvoize 9ba40e1adf Bug 26274: Add cashups api routes
This patch creates a Koha::Cash::Register::Cashup(s) class pair which
subclass Koha::Cash::Register::Action(s) and moves the cashup specific
code into these new classes to improve code separation.

We then introduce API routes based on these classes to allow fetching
a list of cashups associated to a cash register and a full cashup with
emeddable summary for individual cashups.

Test plan
1/ Run the updated unit tests.
   t/db_dependent/Koha/Cash/Register/Action.t
   t/db_dependent/Koha/Cash/Register/Cashup.t
2/ Run the incuded api tests.
   t/db_dependent/api/v1/cashups.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-12 12:33:41 +01:00

30 lines
888 B
JSON

{
"type": "object",
"properties": {
"cashup_id": {
"type": "integer",
"description": "Internal cashup identifier"
},
"cash_register_id": {
"type": "integer",
"description": "Internal identifier for the register the cashup belongs to"
},
"manager_id": {
"type": "integer",
"description": "Internal identifier for the manager the cashup was performed by"
},
"amount": {
"type": "number",
"description": "Account line amount"
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp for the latest line update"
},
"summary": {
"type": "object",
"description": "A summary of the cashup action"
}
}
}