1bde9c37a8b8f6c2e1e3f4021d3b1b843f215414
[koha.git] / api / v1 / swagger / definitions / patron_account_credit.json
1 {
2   "type": "object",
3   "properties": {
4     "credit_type": {
5       "type": "string",
6       "description": "Type of credit ('credit', 'forgiven', 'lost_item_return', 'payment', 'writeoff' )"
7     },
8     "amount": {
9       "type": "number",
10       "minimum": 0,
11       "description": "Credit amount"
12     },
13     "library_id": {
14       "type": [ "string", "null" ],
15       "description": "Internal identifier for the library in which the transaction took place"
16     },
17     "account_lines_ids": {
18         "type": "array",
19         "items": {
20             "type": "integer"
21         },
22         "description": "List of account line ids the credit goes against (optional)"
23     },
24     "payment_type": {
25         "type": "string",
26         "description":  "Payment type (only applies when credit_type=payment)"
27     },
28     "date": {
29       "type": "string",
30       "format": "date",
31       "description": "Date the credit was recorded (optional)"
32     },
33     "description": {
34       "type": "string",
35       "description": "Description"
36     },
37     "note": {
38       "type": "string",
39       "description": "Internal note"
40     }
41   },
42   "required": [ "amount" ]
43 }