foliolib.folio.api.invoiceStorage.BatchVoucherExports
- class foliolib.folio.api.invoiceStorage.BatchVoucherExports(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiBatch voucher exports CRUD API
This documents the API calls that can be made to manage batch voucher exports
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
delete_batchVoucherExport(batchVoucherExportsId)Delete batchVoucherExport item with given {batchVoucherExportId}
get_batchVoucherExport(batchVoucherExportsId)Retrieve batchVoucherExport item with given {batchVoucherExportId}
get_batchVoucherExports(**kwargs)Get list of batch voucher exports
Update batchVoucherExport item with given {batchVoucherExportId}
set_batchVoucherExport(batchVoucherExport)Create a new batchVoucherExport item.
- delete_batchVoucherExport(batchVoucherExportsId: str)
Delete batchVoucherExport item with given {batchVoucherExportId}
DELETE /batch-voucher-storage/batch-voucher-exports/{batchVoucherExportsId}- Parameters
batchVoucherExportsId (str) –
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
- get_batchVoucherExport(batchVoucherExportsId: str)
Retrieve batchVoucherExport item with given {batchVoucherExportId}
GET /batch-voucher-storage/batch-voucher-exports/{batchVoucherExportsId}- Parameters
batchVoucherExportsId (str) –
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "This record describes an batch voucher export job - metadata about the process which generates and uploads the batch voucher", "type": "object", "properties": { "id": { "description": "UUID of the record - System generated if not specified", "$ref": "../../common/schemas/uuid.json" }, "status": { "description": "Status of the export", "type": "string", "enum": [ "Pending", "Generated", "Uploaded", "Error" ], "default": "Pending" }, "message": { "description": "free-form message providing additional context of status, e.g. an error message", "type": "string" }, "batchGroupId": { "description": "UUID of the batch associated with this export", "$ref": "../../common/schemas/uuid.json" }, "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" }, "batchVoucherId": { "description": "UUID of the batch voucher generated by this export", "$ref": "../../common/schemas/uuid.json" }, "metadata": { "type": "object", "$ref": "../../../raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "status", "batchGroupId", "start", "end" ] }
- get_batchVoucherExports(**kwargs)
Get list of batch voucher exports
GET /batch-voucher-storage/batch-voucher-exports- Parameters
**kwargs (properties) – Keyword Arguments
- Keyword Arguments
totalRecords (str) –
(default=auto) How to calculate the totalRecords property. “exact” for the correct number, “estimated” for an estimation, “auto” to automatically select “exact” or “estimated”, “none” for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example
none
offset (int) –
(default=0) Skip over a number of elements by specifying an offset value for the query
Example
0
limit (int) –
(default=10) Limit the number of elements returned in the response
Example
10
query (str) –
A query expressed as a CQL string (see [dev.folio.org/reference/glossary#cql](https://dev.folio.org/reference/glossary#cql)) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields: for example format
Example
(username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode
format==”Application/xml”
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "collection of batch voucher exports", "type": "object", "properties": { "batchVoucherExports": { "description": "an array of batch voucher export records", "id": "batchVoucherExports", "type": "array", "items": { "type": "object", "$ref": "batch_voucher_export.json" } }, "totalRecords": { "description": "total number of records in the array", "type": "integer" } }, "required": [ "batchVoucherExports", "totalRecords" ] }
- modify_batchVoucherExport(batchVoucherExportsId: str, batchVoucherExport: dict)
Update batchVoucherExport item with given {batchVoucherExportId}
PUT /batch-voucher-storage/batch-voucher-exports/{batchVoucherExportsId}- Parameters
batchVoucherExportsId (str) –
batchVoucherExport (dict) – See Schema below
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiRequestConflict – Conflict
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "This record describes an batch voucher export job - metadata about the process which generates and uploads the batch voucher", "type": "object", "properties": { "id": { "description": "UUID of the record - System generated if not specified", "$ref": "../../common/schemas/uuid.json" }, "status": { "description": "Status of the export", "type": "string", "enum": [ "Pending", "Generated", "Uploaded", "Error" ], "default": "Pending" }, "message": { "description": "free-form message providing additional context of status, e.g. an error message", "type": "string" }, "batchGroupId": { "description": "UUID of the batch associated with this export", "$ref": "../../common/schemas/uuid.json" }, "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" }, "batchVoucherId": { "description": "UUID of the batch voucher generated by this export", "$ref": "../../common/schemas/uuid.json" }, "metadata": { "type": "object", "$ref": "../../../raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "status", "batchGroupId", "start", "end" ] }
- set_batchVoucherExport(batchVoucherExport: dict)
Create a new batchVoucherExport item.
POST /batch-voucher-storage/batch-voucher-exports- Parameters
batchVoucherExport (dict) – See Schema below
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Headers
Location - URI to the created batchVoucherExport item
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "This record describes an batch voucher export job - metadata about the process which generates and uploads the batch voucher", "type": "object", "properties": { "id": { "description": "UUID of the record - System generated if not specified", "$ref": "../../common/schemas/uuid.json" }, "status": { "description": "Status of the export", "type": "string", "enum": [ "Pending", "Generated", "Uploaded", "Error" ], "default": "Pending" }, "message": { "description": "free-form message providing additional context of status, e.g. an error message", "type": "string" }, "batchGroupId": { "description": "UUID of the batch associated with this export", "$ref": "../../common/schemas/uuid.json" }, "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" }, "batchVoucherId": { "description": "UUID of the batch voucher generated by this export", "$ref": "../../common/schemas/uuid.json" }, "metadata": { "type": "object", "$ref": "../../../raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "status", "batchGroupId", "start", "end" ] }