foliolib.folio.api.circulationStorage.PatronNoticePolicy
- class foliolib.folio.api.circulationStorage.PatronNoticePolicy(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiPatron Notice Policies API
Storage for Patron Notice Policies
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
delete_patronNoticePolicy(patronNoticePolicyId)Delete Patron Notice Policy by id
get_patronNoticePolicies(**kwargs)Get Patron Notice Policy list
get_patronNoticePolicy(patronNoticePolicyId)Get Patron Notice Policy by id
Update Patron Notice Policy by id
set_patronNoticePolicy(patronNoticePolicy)Create new Patron Notice Policy
- delete_patronNoticePolicy(patronNoticePolicyId: str)
Delete Patron Notice Policy by id
DELETE /patron-notice-policy-storage/patron-notice-policies/{patronNoticePolicyId}- Parameters
patronNoticePolicyId (str) –
- Raises
OkapiRequestError – Bad Request
OkapiRequestNotFound – Not Found
OkapiFatalError – Server Error
- get_patronNoticePolicies(**kwargs)
Get Patron Notice Policy list
GET /patron-notice-policy-storage/patron-notice-policies- Parameters
**kwargs (properties) – Keyword Arguments
- Keyword Arguments
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.
searchable using CQL
Example
(username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode
name=”undergrad*”
- Returns
See Schema below
- Return type
dict
- Raises
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Collection of patron notice policies", "type": "object", "properties": { "patronNoticePolicies": { "description": "List of patron notice policies", "id": "patronNoticePolicies", "type": "array", "items": { "type": "object", "$ref": "patron-notice-policy.json" } }, "totalRecords": { "type": "integer" } }, "required": [ "patronNoticePolicies", "totalRecords" ] }
- get_patronNoticePolicy(patronNoticePolicyId: str)
Get Patron Notice Policy by id
GET /patron-notice-policy-storage/patron-notice-policies/{patronNoticePolicyId}- Parameters
patronNoticePolicyId (str) –
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "additionalProperties": false, "description": "Patron notice policy", "properties": { "id": { "type": "string", "description": "Patron notice policy id, UUID" }, "name": { "type": "string", "description": "Patron notice policy name" }, "description": { "type": "string", "description": "Patron notice policy description" }, "active": { "type": "boolean", "description": "A flag to determine if a patron notice policy is active" }, "metadata": { "description": "Metadata about creation and changes to policy, provided by the server (client should not provide)", "type": "object", "$ref": "raml-util/schemas/metadata.schema" }, "loanNotices": { "type": "array", "description": "List of loan notices", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Notice name" }, "templateId": { "type": "string", "description": "Template id, UUID" }, "templateName": { "type": "string", "description": "Template name" }, "format": { "type": "string", "description": "Notice format, send through email, sms etc.", "enum": [ "Email", "SMS", "Print" ] }, "frequency": { "type": "string", "description": "Frequency, send it once or more", "enum": [ "One time", "Recurring" ] }, "realTime": { "type": "boolean", "description": "Is this real time event" }, "sendOptions": { "type": "object", "additionalProperties": false, "properties": { "sendHow": { "type": "string", "description": "Defines how notice should be sent, before, after or upon", "enum": [ "Upon At", "Before", "After" ] }, "sendWhen": { "type": "string", "description": "Triggering event", "enum": [ "Due date", "Renewed", "Check in", "Check out", "Manual due date change", "Item recalled", "Aged to lost" ] }, "sendBy": { "type": "object", "$ref": "interval.json" }, "sendEvery": { "type": "object", "$ref": "interval.json" } }, "required": [ "sendWhen" ] } }, "required": [ "templateId", "format", "realTime" ] } }, "feeFineNotices": { "type": "array", "description": "List of fee/fine notices", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Notice name" }, "templateId": { "type": "string", "description": "Template id, UUID" }, "templateName": { "type": "string", "description": "Template name" }, "format": { "type": "string", "description": "Notice format, send through email, sms etc.", "enum": [ "Email", "SMS", "Print" ] }, "frequency": { "type": "string", "description": "Frequency, send it once or more", "enum": [ "One time", "Recurring" ] }, "realTime": { "type": "boolean", "description": "Is this real time event" }, "sendOptions": { "type": "object", "additionalProperties": false, "properties": { "sendHow": { "type": "string", "description": "Defines how notice should be sent: after or upon", "enum": [ "Upon At", "After" ] }, "sendWhen": { "type": "string", "description": "Triggering event", "enum": [ "Overdue fine returned", "Overdue fine renewed", "Aged to lost - fine charged", "Aged to lost & item returned - fine adjusted", "Aged to lost & item replaced - fine adjusted" ] }, "sendBy": { "type": "object", "$ref": "interval.json" }, "sendEvery": { "type": "object", "$ref": "interval.json" } }, "required": [ "sendWhen" ] } }, "required": [ "templateId", "format", "realTime" ] } }, "requestNotices": { "type": "array", "description": "List of request notice", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Notice name" }, "templateId": { "type": "string", "description": "Template id, UUID" }, "templateName": { "type": "string", "description": "Template name" }, "format": { "type": "string", "description": "Notice format, send through email, sms etc.", "enum": [ "Email", "SMS", "Print" ] }, "frequency": { "type": "string", "description": "Frequency, send it once or more", "enum": [ "One time", "Recurring" ] }, "realTime": { "type": "boolean", "description": "Is this real time event" }, "sendOptions": { "type": "object", "additionalProperties": false, "properties": { "sendHow": { "type": "string", "description": "Defines how notice should be sent, before, after or upon", "enum": [ "Upon At", "Before", "After" ] }, "sendWhen": { "type": "string", "description": "User initiated and time driven events for request related notices", "enum": [ "Recall request", "Hold request", "Request expiration", "Paging request", "Available", "Hold expiration", "Request cancellation" ] }, "sendBy": { "type": "object", "$ref": "interval.json" }, "sendEvery": { "type": "object", "$ref": "interval.json" } }, "required": [ "sendWhen" ] } }, "required": [ "templateId", "format", "realTime" ] } } }, "required": [ "name" ] }
- modify_patronNoticePolicy(patronNoticePolicyId: str, patronNoticePolicy: dict)
Update Patron Notice Policy by id
PUT /patron-notice-policy-storage/patron-notice-policies/{patronNoticePolicyId}- Parameters
patronNoticePolicyId (str) –
patronNoticePolicy (dict) – See Schema below
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "additionalProperties": false, "description": "Patron notice policy", "properties": { "id": { "type": "string", "description": "Patron notice policy id, UUID" }, "name": { "type": "string", "description": "Patron notice policy name" }, "description": { "type": "string", "description": "Patron notice policy description" }, "active": { "type": "boolean", "description": "A flag to determine if a patron notice policy is active" }, "metadata": { "description": "Metadata about creation and changes to policy, provided by the server (client should not provide)", "type": "object", "$ref": "raml-util/schemas/metadata.schema" }, "loanNotices": { "type": "array", "description": "List of loan notices", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Notice name" }, "templateId": { "type": "string", "description": "Template id, UUID" }, "templateName": { "type": "string", "description": "Template name" }, "format": { "type": "string", "description": "Notice format, send through email, sms etc.", "enum": [ "Email", "SMS", "Print" ] }, "frequency": { "type": "string", "description": "Frequency, send it once or more", "enum": [ "One time", "Recurring" ] }, "realTime": { "type": "boolean", "description": "Is this real time event" }, "sendOptions": { "type": "object", "additionalProperties": false, "properties": { "sendHow": { "type": "string", "description": "Defines how notice should be sent, before, after or upon", "enum": [ "Upon At", "Before", "After" ] }, "sendWhen": { "type": "string", "description": "Triggering event", "enum": [ "Due date", "Renewed", "Check in", "Check out", "Manual due date change", "Item recalled", "Aged to lost" ] }, "sendBy": { "type": "object", "$ref": "interval.json" }, "sendEvery": { "type": "object", "$ref": "interval.json" } }, "required": [ "sendWhen" ] } }, "required": [ "templateId", "format", "realTime" ] } }, "feeFineNotices": { "type": "array", "description": "List of fee/fine notices", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Notice name" }, "templateId": { "type": "string", "description": "Template id, UUID" }, "templateName": { "type": "string", "description": "Template name" }, "format": { "type": "string", "description": "Notice format, send through email, sms etc.", "enum": [ "Email", "SMS", "Print" ] }, "frequency": { "type": "string", "description": "Frequency, send it once or more", "enum": [ "One time", "Recurring" ] }, "realTime": { "type": "boolean", "description": "Is this real time event" }, "sendOptions": { "type": "object", "additionalProperties": false, "properties": { "sendHow": { "type": "string", "description": "Defines how notice should be sent: after or upon", "enum": [ "Upon At", "After" ] }, "sendWhen": { "type": "string", "description": "Triggering event", "enum": [ "Overdue fine returned", "Overdue fine renewed", "Aged to lost - fine charged", "Aged to lost & item returned - fine adjusted", "Aged to lost & item replaced - fine adjusted" ] }, "sendBy": { "type": "object", "$ref": "interval.json" }, "sendEvery": { "type": "object", "$ref": "interval.json" } }, "required": [ "sendWhen" ] } }, "required": [ "templateId", "format", "realTime" ] } }, "requestNotices": { "type": "array", "description": "List of request notice", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Notice name" }, "templateId": { "type": "string", "description": "Template id, UUID" }, "templateName": { "type": "string", "description": "Template name" }, "format": { "type": "string", "description": "Notice format, send through email, sms etc.", "enum": [ "Email", "SMS", "Print" ] }, "frequency": { "type": "string", "description": "Frequency, send it once or more", "enum": [ "One time", "Recurring" ] }, "realTime": { "type": "boolean", "description": "Is this real time event" }, "sendOptions": { "type": "object", "additionalProperties": false, "properties": { "sendHow": { "type": "string", "description": "Defines how notice should be sent, before, after or upon", "enum": [ "Upon At", "Before", "After" ] }, "sendWhen": { "type": "string", "description": "User initiated and time driven events for request related notices", "enum": [ "Recall request", "Hold request", "Request expiration", "Paging request", "Available", "Hold expiration", "Request cancellation" ] }, "sendBy": { "type": "object", "$ref": "interval.json" }, "sendEvery": { "type": "object", "$ref": "interval.json" } }, "required": [ "sendWhen" ] } }, "required": [ "templateId", "format", "realTime" ] } } }, "required": [ "name" ] }
- set_patronNoticePolicy(patronNoticePolicy: dict)
Create new Patron Notice Policy
POST /patron-notice-policy-storage/patron-notice-policies- Parameters
patronNoticePolicy (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "additionalProperties": false, "description": "Patron notice policy", "properties": { "id": { "type": "string", "description": "Patron notice policy id, UUID" }, "name": { "type": "string", "description": "Patron notice policy name" }, "description": { "type": "string", "description": "Patron notice policy description" }, "active": { "type": "boolean", "description": "A flag to determine if a patron notice policy is active" }, "metadata": { "description": "Metadata about creation and changes to policy, provided by the server (client should not provide)", "type": "object", "$ref": "raml-util/schemas/metadata.schema" }, "loanNotices": { "type": "array", "description": "List of loan notices", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Notice name" }, "templateId": { "type": "string", "description": "Template id, UUID" }, "templateName": { "type": "string", "description": "Template name" }, "format": { "type": "string", "description": "Notice format, send through email, sms etc.", "enum": [ "Email", "SMS", "Print" ] }, "frequency": { "type": "string", "description": "Frequency, send it once or more", "enum": [ "One time", "Recurring" ] }, "realTime": { "type": "boolean", "description": "Is this real time event" }, "sendOptions": { "type": "object", "additionalProperties": false, "properties": { "sendHow": { "type": "string", "description": "Defines how notice should be sent, before, after or upon", "enum": [ "Upon At", "Before", "After" ] }, "sendWhen": { "type": "string", "description": "Triggering event", "enum": [ "Due date", "Renewed", "Check in", "Check out", "Manual due date change", "Item recalled", "Aged to lost" ] }, "sendBy": { "type": "object", "$ref": "interval.json" }, "sendEvery": { "type": "object", "$ref": "interval.json" } }, "required": [ "sendWhen" ] } }, "required": [ "templateId", "format", "realTime" ] } }, "feeFineNotices": { "type": "array", "description": "List of fee/fine notices", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Notice name" }, "templateId": { "type": "string", "description": "Template id, UUID" }, "templateName": { "type": "string", "description": "Template name" }, "format": { "type": "string", "description": "Notice format, send through email, sms etc.", "enum": [ "Email", "SMS", "Print" ] }, "frequency": { "type": "string", "description": "Frequency, send it once or more", "enum": [ "One time", "Recurring" ] }, "realTime": { "type": "boolean", "description": "Is this real time event" }, "sendOptions": { "type": "object", "additionalProperties": false, "properties": { "sendHow": { "type": "string", "description": "Defines how notice should be sent: after or upon", "enum": [ "Upon At", "After" ] }, "sendWhen": { "type": "string", "description": "Triggering event", "enum": [ "Overdue fine returned", "Overdue fine renewed", "Aged to lost - fine charged", "Aged to lost & item returned - fine adjusted", "Aged to lost & item replaced - fine adjusted" ] }, "sendBy": { "type": "object", "$ref": "interval.json" }, "sendEvery": { "type": "object", "$ref": "interval.json" } }, "required": [ "sendWhen" ] } }, "required": [ "templateId", "format", "realTime" ] } }, "requestNotices": { "type": "array", "description": "List of request notice", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Notice name" }, "templateId": { "type": "string", "description": "Template id, UUID" }, "templateName": { "type": "string", "description": "Template name" }, "format": { "type": "string", "description": "Notice format, send through email, sms etc.", "enum": [ "Email", "SMS", "Print" ] }, "frequency": { "type": "string", "description": "Frequency, send it once or more", "enum": [ "One time", "Recurring" ] }, "realTime": { "type": "boolean", "description": "Is this real time event" }, "sendOptions": { "type": "object", "additionalProperties": false, "properties": { "sendHow": { "type": "string", "description": "Defines how notice should be sent, before, after or upon", "enum": [ "Upon At", "Before", "After" ] }, "sendWhen": { "type": "string", "description": "User initiated and time driven events for request related notices", "enum": [ "Recall request", "Hold request", "Request expiration", "Paging request", "Available", "Hold expiration", "Request cancellation" ] }, "sendBy": { "type": "object", "$ref": "interval.json" }, "sendEvery": { "type": "object", "$ref": "interval.json" } }, "required": [ "sendWhen" ] } }, "required": [ "templateId", "format", "realTime" ] } } }, "required": [ "name" ] }