foliolib.folio.api.feesfines.Waiver
- class foliolib.folio.api.feesfines.Waiver(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiWaives API
This documents the API calls that can be made to query and manage waive of the system
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
delete_waife(waiveId)Delete waife item with given {waifeId}
get_waife(waiveId)Get a single waive
get_waives(**kwargs)Return a list of waive
modify_waife(waiveId, waife)Update waife item with given {waifeId}
set_waife(waife)Create a waive
- delete_waife(waiveId: str)
Delete waife item with given {waifeId}
DELETE /waives/{waiveId}- Parameters
waiveId (str) –
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
- get_waife(waiveId: str)
Get a single waive
GET /waives/{waiveId}- Parameters
waiveId (str) –
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Waive Reasons Settings schema", "description": "CRUD Fee/Fine Waive Reasons Settings", "type": "object", "properties": { "nameReason": { "description": "Waive reason name", "type": "string" }, "description": { "description": "Waive reason description", "type": "string" }, "metadata": { "description": "Metadata about creation to waive reason, provided by the server", "type": "object", "$ref": "raml-util/schemas/metadata.schema" }, "accountId": { "description": "ID of the User fine/fee account", "$ref": "raml-util/schemas/uuid.schema" }, "id": { "description": "Waive reason id, UUID", "$ref": "raml-util/schemas/uuid.schema" } }, "additionalProperties": false, "required": [ "nameReason" ] }
- get_waives(**kwargs)
Return a list of waive
GET /waives- Parameters
**kwargs (properties) – Keyword Arguments
- Keyword Arguments
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
Example
(username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode
active=true
orderBy (str) – Order by field: field A, field B
order (str (desc|asc) – ): (default=desc) Order
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
facets (list) – facets to return in the collection result set, can be suffixed by a count of facet values to return, for example, patronGroup:10 default to top 5 facet values
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Collection of waives", "type": "object", "properties": { "waivers": { "description": "List of waive items", "type": "array", "id": "waivesData", "items": { "type": "object", "$ref": "waivedata.json" } }, "totalRecords": { "type": "integer" }, "resultInfo": { "$ref": "raml-util/schemas/resultInfo.schema", "readonly": true } }, "required": [ "waivers", "totalRecords" ] }
- modify_waife(waiveId: str, waife: dict)
Update waife item with given {waifeId}
PUT /waives/{waiveId}- Parameters
waiveId (str) –
waife (dict) – See Schema below
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiRequestConflict – Conflict
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Waive Reasons Settings schema", "description": "CRUD Fee/Fine Waive Reasons Settings", "type": "object", "properties": { "nameReason": { "description": "Waive reason name", "type": "string" }, "description": { "description": "Waive reason description", "type": "string" }, "metadata": { "description": "Metadata about creation to waive reason, provided by the server", "type": "object", "$ref": "raml-util/schemas/metadata.schema" }, "accountId": { "description": "ID of the User fine/fee account", "$ref": "raml-util/schemas/uuid.schema" }, "id": { "description": "Waive reason id, UUID", "$ref": "raml-util/schemas/uuid.schema" } }, "additionalProperties": false, "required": [ "nameReason" ] }
- set_waife(waife: dict)
Create a waive
POST /waives- Parameters
waife (dict) – See Schema below
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Headers
Location - URI to the created waife item
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Waive Reasons Settings schema", "description": "CRUD Fee/Fine Waive Reasons Settings", "type": "object", "properties": { "nameReason": { "description": "Waive reason name", "type": "string" }, "description": { "description": "Waive reason description", "type": "string" }, "metadata": { "description": "Metadata about creation to waive reason, provided by the server", "type": "object", "$ref": "raml-util/schemas/metadata.schema" }, "accountId": { "description": "ID of the User fine/fee account", "$ref": "raml-util/schemas/uuid.schema" }, "id": { "description": "Waive reason id, UUID", "$ref": "raml-util/schemas/uuid.schema" } }, "additionalProperties": false, "required": [ "nameReason" ] }