foliolib.folio.api.feesfines.Transfers

class foliolib.folio.api.feesfines.Transfers(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)

Bases: foliolib.folio.FolioApi

Transfers API

This documents the API calls that can be made to query and manage feefine of the system

Parameters
  • tenant (str) – Tenant id

  • okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.

Methods

delete_transfer(transferId)

Delete transfer item with given {transferId}

get_transfer(transferId)

Get a single transfer

get_transfers(**kwargs)

Return a list of transfers

modify_transfer(transferId, transfer)

Update transfer item with given {transferId}

set_transfer(transfer)

Create a transfer

delete_transfer(transferId: str)

Delete transfer item with given {transferId}

DELETE /transfers/{transferId}

Parameters

transferId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

get_transfer(transferId: str)

Get a single transfer

GET /transfers/{transferId}

Parameters

transferId (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 Fee/Fine Transfer Accounts Settings schema",
  "description": "Allows Fee/Fine Owner to identify accepted locations to which fees/fines are transferred",
  "type": "object",
  "properties": {
    "accountName": {
      "description": "Transfer account name",
      "type": "string"
    },
    "desc": {
      "description": "Transfer account description",
      "type": "string"
    },
    "metadata": {
      "description": "Metadata about creation to transfer account, provided by the server",
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema"
    },
    "ownerId": {
      "description": "ID of the owner",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "id": {
      "description": "Transfer account id, UUID",
      "$ref": "raml-util/schemas/uuid.schema"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountName"
  ]
}
get_transfers(**kwargs)

Return a list of transfers

GET /transfers

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 transfers",
  "type": "object",
  "properties": {
    "transfers": {
      "description": "List of transfer items",
      "type": "array",
      "id": "transfersData",
      "items": {
        "type": "object",
        "$ref": "transferdata.json"
      }
    },
    "totalRecords": {
      "type": "integer"
    },
    "resultInfo": {
      "$ref": "raml-util/schemas/resultInfo.schema",
      "readonly": true
    }
  },
  "required": [
    "transfers",
    "totalRecords"
  ]
}
modify_transfer(transferId: str, transfer: dict)

Update transfer item with given {transferId}

PUT /transfers/{transferId}

Parameters
  • transferId (str) –

  • transfer (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 Fee/Fine Transfer Accounts Settings schema",
  "description": "Allows Fee/Fine Owner to identify accepted locations to which fees/fines are transferred",
  "type": "object",
  "properties": {
    "accountName": {
      "description": "Transfer account name",
      "type": "string"
    },
    "desc": {
      "description": "Transfer account description",
      "type": "string"
    },
    "metadata": {
      "description": "Metadata about creation to transfer account, provided by the server",
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema"
    },
    "ownerId": {
      "description": "ID of the owner",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "id": {
      "description": "Transfer account id, UUID",
      "$ref": "raml-util/schemas/uuid.schema"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountName"
  ]
}
set_transfer(transfer: dict)

Create a transfer

POST /transfers

Parameters

transfer (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created transfer item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "CRUD Fee/Fine Transfer Accounts Settings schema",
  "description": "Allows Fee/Fine Owner to identify accepted locations to which fees/fines are transferred",
  "type": "object",
  "properties": {
    "accountName": {
      "description": "Transfer account name",
      "type": "string"
    },
    "desc": {
      "description": "Transfer account description",
      "type": "string"
    },
    "metadata": {
      "description": "Metadata about creation to transfer account, provided by the server",
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema"
    },
    "ownerId": {
      "description": "ID of the owner",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "id": {
      "description": "Transfer account id, UUID",
      "$ref": "raml-util/schemas/uuid.schema"
    }
  },
  "additionalProperties": false,
  "required": [
    "accountName"
  ]
}