foliolib.folio.api.feesfines.TransferCriteria

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

Bases: foliolib.folio.FolioApi

Transfers criteria API

This documents the API calls that can be made to query and manage fee/fine of the system

Parameters
  • tenant (str) – Tenant id

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

Methods

delete_transferCriteria(transferCriteriaId)

Delete transferCriteria item with given {transferCriteriaId}

get_transferCriteria(transferCriteriaId)

Get a single transfer criteria

get_transferCriterias(**kwargs)

Return a list of transfer criteria

modify_transferCriteria(transferCriteriaId, ...)

Update transferCriteria item with given {transferCriteriaId}

set_transferCriteria(transferCriteria)

Create a transfer criteria

delete_transferCriteria(transferCriteriaId: str)

Delete transferCriteria item with given {transferCriteriaId}

DELETE /transfer-criterias/{transferCriteriaId}

Parameters

transferCriteriaId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

get_transferCriteria(transferCriteriaId: str)

Get a single transfer criteria

GET /transfer-criterias/{transferCriteriaId}

Parameters

transferCriteriaId (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": "Transfer criteria schema",
  "description": "CRUD Fee/Fine transfer criteria",
  "type": "object",
  "properties": {
    "criteria": {
      "description": "Not implemented yet",
      "type": "string"
    },
    "type": {
      "description": "Not implemented yet",
      "type": "string"
    },
    "value": {
      "description": "Not implemented yet",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "interval": {
      "description": "Not implemented yet",
      "type": "string"
    },
    "id": {
      "description": "Transfer criteria id, UUID",
      "$ref": "raml-util/schemas/uuid.schema"
    }
  },
  "additionalProperties": false
}
get_transferCriterias(**kwargs)

Return a list of transfer criteria

GET /transfer-criterias

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 tranfer criterias",
  "type": "object",
  "properties": {
    "transferCriterias": {
      "description": "List of transfer criteria items",
      "type": "array",
      "id": "transferCriteriaData",
      "items": {
        "type": "object",
        "$ref": "transfer-criteriadata.json"
      }
    },
    "totalRecords": {
      "type": "integer"
    }
  },
  "required": [
    "transferCriterias",
    "totalRecords"
  ]
}
modify_transferCriteria(transferCriteriaId: str, transferCriteria: dict)

Update transferCriteria item with given {transferCriteriaId}

PUT /transfer-criterias/{transferCriteriaId}

Parameters
  • transferCriteriaId (str) –

  • transferCriteria (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": "Transfer criteria schema",
  "description": "CRUD Fee/Fine transfer criteria",
  "type": "object",
  "properties": {
    "criteria": {
      "description": "Not implemented yet",
      "type": "string"
    },
    "type": {
      "description": "Not implemented yet",
      "type": "string"
    },
    "value": {
      "description": "Not implemented yet",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "interval": {
      "description": "Not implemented yet",
      "type": "string"
    },
    "id": {
      "description": "Transfer criteria id, UUID",
      "$ref": "raml-util/schemas/uuid.schema"
    }
  },
  "additionalProperties": false
}
set_transferCriteria(transferCriteria: dict)

Create a transfer criteria

POST /transfer-criterias

Parameters

transferCriteria (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created transferCriteria item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Transfer criteria schema",
  "description": "CRUD Fee/Fine transfer criteria",
  "type": "object",
  "properties": {
    "criteria": {
      "description": "Not implemented yet",
      "type": "string"
    },
    "type": {
      "description": "Not implemented yet",
      "type": "string"
    },
    "value": {
      "description": "Not implemented yet",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "interval": {
      "description": "Not implemented yet",
      "type": "string"
    },
    "id": {
      "description": "Transfer criteria id, UUID",
      "$ref": "raml-util/schemas/uuid.schema"
    }
  },
  "additionalProperties": false
}