foliolib.folio.api.invoiceStorage.BatchVoucher
- class foliolib.folio.api.invoiceStorage.BatchVoucher(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiBatch Vouchers CRUD API
API used to manage batch vouchers.
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
delete_batchVoucher(batchVouchersId)Delete batchVoucher item with given {batchVoucherId}
get_batchVouchers(batchVouchersId)Retrieve batchVoucher item with given {batchVoucherId}
set_batchVoucher(batchVoucher)Process batchVouchers.
- delete_batchVoucher(batchVouchersId: str)
Delete batchVoucher item with given {batchVoucherId}
DELETE /batch-voucher-storage/batch-vouchers/{batchVouchersId}- Parameters
batchVouchersId (str) –
- Raises
OkapiRequestError – Bad Request
OkapiRequestNotFound – Not Found
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
- get_batchVouchers(batchVouchersId: str)
Retrieve batchVoucher item with given {batchVoucherId}
GET /batch-voucher-storage/batch-vouchers/{batchVouchersId}- Parameters
batchVouchersId (str) –
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestNotFound – Not Found
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "top-level batch voucher, i.e. a collection of batched vouchers", "type": "object", "properties": { "id": { "description": "UUID of batch voucher", "$ref": "../../common/schemas/uuid.json" }, "batchGroup": { "description": "The human-readable name of the batch group used when generating this batch voucher", "type": "string" }, "batchedVouchers": { "description": "an array of batched voucher records", "id": "batchVouchers", "type": "array", "items": { "type": "object", "$ref": "batched_voucher.json" } }, "created": { "description": "When this batch voucher was created", "type": "string", "format": "date-time" }, "start": { "description": "This export is for all vouchers between start and end", "type": "string", "format": "date-time" }, "end": { "description": "This export is for all vouchers between start and end", "type": "string", "format": "date-time" }, "totalRecords": { "description": "total number of records in the array", "type": "integer" } }, "required": [ "batchGroup", "batchedVouchers", "created", "start", "end", "totalRecords" ] }
- set_batchVoucher(batchVoucher: dict)
Process batchVouchers.
POST /batch-voucher-storage/batch-vouchers- Parameters
batchVoucher (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestNotFound – Not Found
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Headers
Location - URI to the created batchVoucher item
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "top-level batch voucher, i.e. a collection of batched vouchers", "type": "object", "properties": { "id": { "description": "UUID of batch voucher", "$ref": "../../common/schemas/uuid.json" }, "batchGroup": { "description": "The human-readable name of the batch group used when generating this batch voucher", "type": "string" }, "batchedVouchers": { "description": "an array of batched voucher records", "id": "batchVouchers", "type": "array", "items": { "type": "object", "$ref": "batched_voucher.json" } }, "created": { "description": "When this batch voucher was created", "type": "string", "format": "date-time" }, "start": { "description": "This export is for all vouchers between start and end", "type": "string", "format": "date-time" }, "end": { "description": "This export is for all vouchers between start and end", "type": "string", "format": "date-time" }, "totalRecords": { "description": "total number of records in the array", "type": "integer" } }, "required": [ "batchGroup", "batchedVouchers", "created", "start", "end", "totalRecords" ] }