foliolib.folio.api.feesfines.Feefines

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

Bases: foliolib.folio.FolioApi

Feefines 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_feefine(feefineId)

Delete feefine item with given {feefineId}

get_feefine(feefineId)

Get a single feefine

get_feefines(**kwargs)

Return a list of feefines

modify_feefine(feefineId, feefine)

Update feefine item with given {feefineId}

set_feefine(feefine)

Create a feefine

delete_feefine(feefineId: str)

Delete feefine item with given {feefineId}

DELETE /feefines/{feefineId}

Parameters

feefineId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

get_feefine(feefineId: str)

Get a single feefine

GET /feefines/{feefineId}

Parameters

feefineId (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": "Manual Fees/Fines Table Settings schema",
  "description": "Fees/fines that are used by the entire library system. They can be a set of fees / fines shared throughout the library or fees / fines that are unique to a specific customer service",
  "type": "object",
  "properties": {
    "automatic": {
      "description": "A flag to indicate that fee/fine was created automatically.",
      "type": "boolean",
      "default": false
    },
    "feeFineType": {
      "description": "Description of fee/fine that is up to the discretion of the user",
      "type": "string"
    },
    "defaultAmount": {
      "description": "Amount of fee or fine, which may be overridden. ",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "chargeNoticeId": {
      "description": "ID of the charge notice template",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "actionNoticeId": {
      "description": "ID of the action notice template",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "ownerId": {
      "description": "ID of the owner",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "metadata": {
      "description": "Metadata about creation to fee/fine, provided by the server",
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema"
    },
    "id": {
      "description": "Fee/fine id, UUID",
      "$ref": "raml-util/schemas/uuid.schema"
    }
  },
  "additionalProperties": false,
  "required": [
    "feeFineType",
    "automatic"
  ]
}
get_feefines(**kwargs)

Return a list of feefines

GET /feefines

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 feesfines",
  "type": "object",
  "properties": {
    "feefines": {
      "description": "List of fee/fine items",
      "type": "array",
      "id": "feefinesData",
      "items": {
        "type": "object",
        "$ref": "feefinedata.json"
      }
    },
    "totalRecords": {
      "type": "integer"
    },
    "resultInfo": {
      "$ref": "raml-util/schemas/resultInfo.schema",
      "readonly": true
    }
  },
  "required": [
    "feefines",
    "totalRecords"
  ]
}
modify_feefine(feefineId: str, feefine: dict)

Update feefine item with given {feefineId}

PUT /feefines/{feefineId}

Parameters
  • feefineId (str) –

  • feefine (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": "Manual Fees/Fines Table Settings schema",
  "description": "Fees/fines that are used by the entire library system. They can be a set of fees / fines shared throughout the library or fees / fines that are unique to a specific customer service",
  "type": "object",
  "properties": {
    "automatic": {
      "description": "A flag to indicate that fee/fine was created automatically.",
      "type": "boolean",
      "default": false
    },
    "feeFineType": {
      "description": "Description of fee/fine that is up to the discretion of the user",
      "type": "string"
    },
    "defaultAmount": {
      "description": "Amount of fee or fine, which may be overridden. ",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "chargeNoticeId": {
      "description": "ID of the charge notice template",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "actionNoticeId": {
      "description": "ID of the action notice template",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "ownerId": {
      "description": "ID of the owner",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "metadata": {
      "description": "Metadata about creation to fee/fine, provided by the server",
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema"
    },
    "id": {
      "description": "Fee/fine id, UUID",
      "$ref": "raml-util/schemas/uuid.schema"
    }
  },
  "additionalProperties": false,
  "required": [
    "feeFineType",
    "automatic"
  ]
}
set_feefine(feefine: dict)

Create a feefine

POST /feefines

Parameters

feefine (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created feefine item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Manual Fees/Fines Table Settings schema",
  "description": "Fees/fines that are used by the entire library system. They can be a set of fees / fines shared throughout the library or fees / fines that are unique to a specific customer service",
  "type": "object",
  "properties": {
    "automatic": {
      "description": "A flag to indicate that fee/fine was created automatically.",
      "type": "boolean",
      "default": false
    },
    "feeFineType": {
      "description": "Description of fee/fine that is up to the discretion of the user",
      "type": "string"
    },
    "defaultAmount": {
      "description": "Amount of fee or fine, which may be overridden. ",
      "javaType": "org.folio.rest.domain.MonetaryValue",
      "type": "number"
    },
    "chargeNoticeId": {
      "description": "ID of the charge notice template",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "actionNoticeId": {
      "description": "ID of the action notice template",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "ownerId": {
      "description": "ID of the owner",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "metadata": {
      "description": "Metadata about creation to fee/fine, provided by the server",
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema"
    },
    "id": {
      "description": "Fee/fine id, UUID",
      "$ref": "raml-util/schemas/uuid.schema"
    }
  },
  "additionalProperties": false,
  "required": [
    "feeFineType",
    "automatic"
  ]
}