foliolib.folio.api.feesfines.AccountsBulk
- class foliolib.folio.api.feesfines.AccountsBulk(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiAccounts bulk actions API
This documents the API calls for bulk actions against accounts
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
checkPay(checkPay)Checks if an action is allowed
checkRefund(checkRefund)Checks if an action is allowed
checkTransfer(checkTransfer)Checks if an action is allowed
checkWaive(checkWaive)Checks if an action is allowed
pay(pay)Perform an action
refund(refund)Perform an action
set_cancel(cancel)Perform an action
transfer(transfer)Perform an action
waive(waive)Perform an action
- checkPay(checkPay: dict)
Checks if an action is allowed
POST /accounts-bulk/check-pay- Parameters
checkPay (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Accounts check request", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "amount": { "type": "string", "description": "Action amount to be validated" } }, "additionalProperties": false, "required": [ "accountIds", "amount" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Accounts check response", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "amount": { "type": "string", "description": "Amount that validation was requested for" }, "allowed": { "type": "boolean", "description": "Flag which indicates if validation is successful" }, "remainingAmount": { "type": "string", "description": "Amount of fee/fine that will remain if the action is performed" }, "errorMessage": { "type": "string", "description": "Error message which describes why validation failed" } }, "additionalProperties": false, "required": [ "amounts", "allowed" ] }
- checkRefund(checkRefund: dict)
Checks if an action is allowed
POST /accounts-bulk/check-refund- Parameters
checkRefund (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Accounts check request", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "amount": { "type": "string", "description": "Action amount to be validated" } }, "additionalProperties": false, "required": [ "accountIds", "amount" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Accounts check response", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "amount": { "type": "string", "description": "Amount that validation was requested for" }, "allowed": { "type": "boolean", "description": "Flag which indicates if validation is successful" }, "remainingAmount": { "type": "string", "description": "Amount of fee/fine that will remain if the action is performed" }, "errorMessage": { "type": "string", "description": "Error message which describes why validation failed" } }, "additionalProperties": false, "required": [ "amounts", "allowed" ] }
- checkTransfer(checkTransfer: dict)
Checks if an action is allowed
POST /accounts-bulk/check-transfer- Parameters
checkTransfer (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Accounts check request", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "amount": { "type": "string", "description": "Action amount to be validated" } }, "additionalProperties": false, "required": [ "accountIds", "amount" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Accounts check response", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "amount": { "type": "string", "description": "Amount that validation was requested for" }, "allowed": { "type": "boolean", "description": "Flag which indicates if validation is successful" }, "remainingAmount": { "type": "string", "description": "Amount of fee/fine that will remain if the action is performed" }, "errorMessage": { "type": "string", "description": "Error message which describes why validation failed" } }, "additionalProperties": false, "required": [ "amounts", "allowed" ] }
- checkWaive(checkWaive: dict)
Checks if an action is allowed
POST /accounts-bulk/check-waive- Parameters
checkWaive (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Accounts check request", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "amount": { "type": "string", "description": "Action amount to be validated" } }, "additionalProperties": false, "required": [ "accountIds", "amount" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Accounts check response", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "amount": { "type": "string", "description": "Amount that validation was requested for" }, "allowed": { "type": "boolean", "description": "Flag which indicates if validation is successful" }, "remainingAmount": { "type": "string", "description": "Amount of fee/fine that will remain if the action is performed" }, "errorMessage": { "type": "string", "description": "Error message which describes why validation failed" } }, "additionalProperties": false, "required": [ "amounts", "allowed" ] }
- pay(pay: dict)
Perform an action
POST /accounts-bulk/pay- Parameters
pay (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Default action request", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "amount": { "type": "string", "description": "Action amount" }, "comments": { "type": "string", "description": "Additional info for staff or patron. Format: [STAFF : staff comment \n PATRON : patron comment]" }, "transactionInfo": { "type": "string", "description": "Additional transaction information, e.g. check number" }, "notifyPatron": { "type": "boolean", "description": "Should send patron notification or not" }, "servicePointId": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema", "description": "Unique ID of the service point where the payment was made" }, "userName": { "type": "string", "description": "Name of the user that was logged in when the action was performed" }, "paymentMethod": { "type": "string", "description": "Name of the payment method, e.g. `Cash` or `Credit card`" } }, "additionalProperties": false, "required": [ "accountIds", "amount", "notifyPatron", "servicePointId", "userName", "paymentMethod" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Action response", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "feefineactions": { "type": "array", "items": { "type": "object", "$ref": "../feefineactiondata.json" }, "description": "Fee/fine actions created during a bulk action" }, "amount": { "type": "string", "description": "Action total amount" } }, "additionalProperties": false, "required": [ "accountIds", "feefineactions", "amount" ] }
- refund(refund: dict)
Perform an action
POST /accounts-bulk/refund- Parameters
refund (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Default action request", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "amount": { "type": "string", "description": "Action amount" }, "comments": { "type": "string", "description": "Additional info for staff or patron. Format: [STAFF : staff comment \n PATRON : patron comment]" }, "transactionInfo": { "type": "string", "description": "Additional transaction information, e.g. check number" }, "notifyPatron": { "type": "boolean", "description": "Should send patron notification or not" }, "servicePointId": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema", "description": "Unique ID of the service point where the payment was made" }, "userName": { "type": "string", "description": "Name of the user that was logged in when the action was performed" }, "paymentMethod": { "type": "string", "description": "Name of the payment method, e.g. `Cash` or `Credit card`" } }, "additionalProperties": false, "required": [ "accountIds", "amount", "notifyPatron", "servicePointId", "userName", "paymentMethod" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Action response", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "feefineactions": { "type": "array", "items": { "type": "object", "$ref": "../feefineactiondata.json" }, "description": "Fee/fine actions created during a bulk action" }, "amount": { "type": "string", "description": "Action total amount" } }, "additionalProperties": false, "required": [ "accountIds", "feefineactions", "amount" ] }
- set_cancel(cancel: dict)
Perform an action
POST /accounts-bulk/cancel- Parameters
cancel (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Bulk cancel action request", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "comments": { "type": "string", "description": "Additional info for staff or patron. Format: [STAFF : staff comment \n PATRON : patron comment]" }, "notifyPatron": { "type": "boolean", "description": "Should send patron notification or not" }, "servicePointId": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema", "description": "Unique ID of the service point where the payment was made" }, "userName": { "type": "string", "description": "Name of the user that was logged in when the action was performed" } }, "additionalProperties": false, "required": [ "accountIds", "notifyPatron", "servicePointId", "userName", "comments" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Action response", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "feefineactions": { "type": "array", "items": { "type": "object", "$ref": "../feefineactiondata.json" }, "description": "Fee/fine actions created during a bulk action" }, "amount": { "type": "string", "description": "Action total amount" } }, "additionalProperties": false, "required": [ "accountIds", "feefineactions", "amount" ] }
- transfer(transfer: dict)
Perform an action
POST /accounts-bulk/transfer- Parameters
transfer (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Default action request", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "amount": { "type": "string", "description": "Action amount" }, "comments": { "type": "string", "description": "Additional info for staff or patron. Format: [STAFF : staff comment \n PATRON : patron comment]" }, "transactionInfo": { "type": "string", "description": "Additional transaction information, e.g. check number" }, "notifyPatron": { "type": "boolean", "description": "Should send patron notification or not" }, "servicePointId": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema", "description": "Unique ID of the service point where the payment was made" }, "userName": { "type": "string", "description": "Name of the user that was logged in when the action was performed" }, "paymentMethod": { "type": "string", "description": "Name of the payment method, e.g. `Cash` or `Credit card`" } }, "additionalProperties": false, "required": [ "accountIds", "amount", "notifyPatron", "servicePointId", "userName", "paymentMethod" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Action response", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "feefineactions": { "type": "array", "items": { "type": "object", "$ref": "../feefineactiondata.json" }, "description": "Fee/fine actions created during a bulk action" }, "amount": { "type": "string", "description": "Action total amount" } }, "additionalProperties": false, "required": [ "accountIds", "feefineactions", "amount" ] }
- waive(waive: dict)
Perform an action
POST /accounts-bulk/waive- Parameters
waive (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Default action request", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "amount": { "type": "string", "description": "Action amount" }, "comments": { "type": "string", "description": "Additional info for staff or patron. Format: [STAFF : staff comment \n PATRON : patron comment]" }, "transactionInfo": { "type": "string", "description": "Additional transaction information, e.g. check number" }, "notifyPatron": { "type": "boolean", "description": "Should send patron notification or not" }, "servicePointId": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema", "description": "Unique ID of the service point where the payment was made" }, "userName": { "type": "string", "description": "Name of the user that was logged in when the action was performed" }, "paymentMethod": { "type": "string", "description": "Name of the payment method, e.g. `Cash` or `Credit card`" } }, "additionalProperties": false, "required": [ "accountIds", "amount", "notifyPatron", "servicePointId", "userName", "paymentMethod" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Action response", "type": "object", "properties": { "accountIds": { "type": "array", "items": { "type": "string", "$ref": "../raml-util/schemas/uuid.schema" }, "description": "IDs of multiple accounts" }, "feefineactions": { "type": "array", "items": { "type": "object", "$ref": "../feefineactiondata.json" }, "description": "Fee/fine actions created during a bulk action" }, "amount": { "type": "string", "description": "Action total amount" } }, "additionalProperties": false, "required": [ "accountIds", "feefineactions", "amount" ] }