foliolib.folio.api.feesfines.Owners
- class foliolib.folio.api.feesfines.Owners(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiOwners API
This documents the API calls that can be made to query and manage owner of the system
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
delete_owner(ownerId)Delete owner item with given {ownerId}
get_owner(ownerId)Get a single owner
get_owners(**kwargs)Return a list of owners
modify_owner(ownerId, owner)Update owner item with given {ownerId}
set_owner(owner)Create a owner
- delete_owner(ownerId: str)
Delete owner item with given {ownerId}
DELETE /owners/{ownerId}- Parameters
ownerId (str) –
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
- get_owner(ownerId: str)
Get a single owner
GET /owners/{ownerId}- Parameters
ownerId (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": "CRUD Owner schema", "description": "CRUD functions for Fee/Fine Owners", "type": "object", "properties": { "owner": { "description": "Service desk (known as a fee/fine owner) is library-defined and is associated with specific fees/fines", "type": "string" }, "desc": { "description": "Owner description", "type": "string" }, "servicePointOwner": { "description": "Service points associated to a Owner", "type": "array", "items": { "type": "object", "properties": { "value": { "description": "ID of the service-point", "$ref": "raml-util/schemas/uuid.schema" }, "label": { "description": "Service-point name label", "type": "string" } }, "required": [ "value" ] } }, "defaultChargeNoticeId": { "description": "ID of the fee/fine charge template", "$ref": "raml-util/schemas/uuid.schema" }, "defaultActionNoticeId": { "description": "ID of the fee/fine action template", "$ref": "raml-util/schemas/uuid.schema" }, "metadata": { "description": "Metadata about creation to owner, provided by the server", "type": "object", "$ref": "raml-util/schemas/metadata.schema" }, "id": { "description": "Owner id, UUID", "$ref": "raml-util/schemas/uuid.schema" } }, "additionalProperties": false }
- get_owners(**kwargs)
Return a list of owners
GET /owners- 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
- 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 owners", "type": "object", "properties": { "owners": { "description": "List of owner items", "type": "array", "id": "ownersData", "items": { "type": "object", "$ref": "ownerdata.json" } }, "totalRecords": { "type": "integer" } }, "required": [ "owners", "totalRecords" ] }
- modify_owner(ownerId: str, owner: dict)
Update owner item with given {ownerId}
PUT /owners/{ownerId}- Parameters
ownerId (str) –
owner (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": "CRUD Owner schema", "description": "CRUD functions for Fee/Fine Owners", "type": "object", "properties": { "owner": { "description": "Service desk (known as a fee/fine owner) is library-defined and is associated with specific fees/fines", "type": "string" }, "desc": { "description": "Owner description", "type": "string" }, "servicePointOwner": { "description": "Service points associated to a Owner", "type": "array", "items": { "type": "object", "properties": { "value": { "description": "ID of the service-point", "$ref": "raml-util/schemas/uuid.schema" }, "label": { "description": "Service-point name label", "type": "string" } }, "required": [ "value" ] } }, "defaultChargeNoticeId": { "description": "ID of the fee/fine charge template", "$ref": "raml-util/schemas/uuid.schema" }, "defaultActionNoticeId": { "description": "ID of the fee/fine action template", "$ref": "raml-util/schemas/uuid.schema" }, "metadata": { "description": "Metadata about creation to owner, provided by the server", "type": "object", "$ref": "raml-util/schemas/metadata.schema" }, "id": { "description": "Owner id, UUID", "$ref": "raml-util/schemas/uuid.schema" } }, "additionalProperties": false }
- set_owner(owner: dict)
Create a owner
POST /owners- Parameters
owner (dict) – See Schema below
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Headers
Location - URI to the created owner item
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "CRUD Owner schema", "description": "CRUD functions for Fee/Fine Owners", "type": "object", "properties": { "owner": { "description": "Service desk (known as a fee/fine owner) is library-defined and is associated with specific fees/fines", "type": "string" }, "desc": { "description": "Owner description", "type": "string" }, "servicePointOwner": { "description": "Service points associated to a Owner", "type": "array", "items": { "type": "object", "properties": { "value": { "description": "ID of the service-point", "$ref": "raml-util/schemas/uuid.schema" }, "label": { "description": "Service-point name label", "type": "string" } }, "required": [ "value" ] } }, "defaultChargeNoticeId": { "description": "ID of the fee/fine charge template", "$ref": "raml-util/schemas/uuid.schema" }, "defaultActionNoticeId": { "description": "ID of the fee/fine action template", "$ref": "raml-util/schemas/uuid.schema" }, "metadata": { "description": "Metadata about creation to owner, provided by the server", "type": "object", "$ref": "raml-util/schemas/metadata.schema" }, "id": { "description": "Owner id, UUID", "$ref": "raml-util/schemas/uuid.schema" } }, "additionalProperties": false }