Koha/api/v1/swagger/definitions/debit.yaml
Agustin Moyano ab10759c50
Bug 21043: Add debit REST endpoint
This patch adds an endpoint to create a debit for a patron.

Testplan

1. Create a new account debit type (Administration > Debit types)
2. Add a fee with this debit type to a patron’s account via API
3. Make sure that this fee is shown in the accounting overview in the patron’s account in the staff interface
4. Make sure that it is possible to make a payment for this fee

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
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:51 -03:00

84 lines
2 KiB
YAML

type: object
properties:
account_line_id:
type:
- integer
- "null"
readOnly: true
description: Internal account line identifier
amount:
type: number
minimum: 0
description: Debit amount
amount_outstanding:
type: number
description: Outstanding amount
cash_register_id:
type:
- integer
- "null"
description: Internal identifier for the cash register used for the payout (if any)
checkout_id:
type:
- integer
- "null"
description: Internal identifier for the checkout the account line is related to
date:
type: string
format: date-time
description: Date the account line was created
description:
type:
- string
- "null"
description: Account line description
interface:
type:
- string
- "null"
description: 'Interface in which the account line was generated (values can be: api, cron, commandline, intranet, opac and sip)'
internal_note:
type:
- string
- "null"
description: Internal note
item_id:
type:
- integer
- "null"
description: Internal identifier for the item the account line is related to
library_id:
type:
- string
- "null"
description: Internal identifier for the library in which the transaction took place
patron_id:
type: integer
description: Internal identifier for the patron the account line belongs to
payout_type:
type:
- string
- "null"
description: Payout type
status:
type:
- string
- "null"
description: The debit status
timestamp:
type: string
format: date-time
description: Timestamp for the latest line update
type:
type:
- string
- "null"
description: Account debit type
user_id:
type:
- integer
- "null"
description: Internal patron identifier for the staff member that introduced the account line
required:
- amount
additionalProperties: false