Koha/api/v1/swagger/definitions/account_line.json
Joonas Kylmälä 089b857586 Bug 26271: Add null to the list of accepted account_line data types
The database schema for accountlines table allows the
manager_id/user_id column to be NULL. If request to
/api/v1/patrons/<patron_id>/account returns such an accountline where
it is NULL we get 500 error as response. Adding NULL to allowed data
types fixes this issue.

To test:
 1) Run prove t/db_dependent/api/v1/patrons_accounts.t and notice it
    doesn't fail

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 14:18:23 +02:00

101 lines
2.2 KiB
JSON

{
"type": "object",
"properties": {
"account_line_id": {
"type": "integer",
"description": "Internal account line identifier"
},
"checkout_id": {
"type": [
"integer",
"null"
],
"description": "Internal identifier for the checkout the account line is related to"
},
"patron_id": {
"type": "integer",
"description": "Internal identifier for the patron the account line belongs to"
},
"item_id": {
"type": [
"integer",
"null"
],
"description": "Internal identifier for the item the account line is related to"
},
"date": {
"type": "string",
"format": "date-time",
"description": "Date the account line was created"
},
"amount": {
"type": "number",
"description": "Account line amount"
},
"description": {
"type": [
"string",
"null"
],
"description": "Account line description"
},
"account_type": {
"type": [
"string",
"null"
],
"description": "Account line type"
},
"debit_type": {
"type": [
"string",
"null"
],
"description": "Account line debit type"
},
"payment_type": {
"type": [
"string",
"null"
],
"description": "Payment type"
},
"amount_outstanding": {
"type": "number",
"description": "Outstanding amount"
},
"last_increment": {
"type": [
"number",
"null"
],
"description": "The amount the line was increased last time"
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp for the latest line update"
},
"internal_note": {
"type": [
"string",
"null"
],
"description": "Internal note"
},
"user_id": {
"type": [
"integer",
"null"
],
"description": "Internal patron identifier for the staff member that introduced the account line"
},
"library_id": {
"type": [
"string",
"null"
],
"description": "Internal identifier for the library in which the transaction took place"
}
}
}