foliolib.folio.api.organizations.BankingInformation

class foliolib.folio.api.organizations.BankingInformation(tenant: str)

Bases: foliolib.folio.FolioApi

Banking information Logic API

API for banking information

Base class of the Folio API

Parameters

tenant (str) – Tenant id

Methods

delete_bankingInformation(bankingInformationId)

Delete a banking information by id

get_bankingInformation(bankingInformationId)

Retrieve bankingInformation item with given {bankingInformationId}

get_bankingInformations(**kwargs)

Get a list of banking information

modify_bankingInformation(...)

Update a banking information by id

set_bankingInformation(bankingInformation)

Create a banking information

delete_bankingInformation(bankingInformationId: str)

Delete a banking information by id

DELETE /organizations/banking-information/{bankingInformationId}

Parameters

bankingInformationId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiRequestFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

get_bankingInformation(bankingInformationId: str)

Retrieve bankingInformation item with given {bankingInformationId}

GET /organizations/banking-information/{bankingInformationId}

Parameters

bankingInformationId (str) –

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "An organization banking information",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique id of this banking information",
      "$ref": "../../common/schemas/uuid.json"
    },
    "_version": {
      "type": "integer",
      "description": "Record version for optimistic locking"
    },
    "organizationId": {
      "description": "The unique id of organization",
      "$ref": "../../common/schemas/uuid.json"
    },
    "categoryId": {
      "description": "The unique id of category",
      "$ref": "../../common/schemas/uuid.json"
    },
    "accountTypeId": {
      "description": "The unique id of accountType",
      "$ref": "../../common/schemas/uuid.json"
    },
    "bankName": {
      "description": "The bank name",
      "type": "string"
    },
    "bankAccountNumber": {
      "description": "The bank account number",
      "type": "string"
    },
    "transitNumber": {
      "description": "The transit number",
      "type": "string"
    },
    "notes": {
      "description": "The notes",
      "type": "string"
    },
    "isPrimary": {
      "description": "Is primary banking information",
      "type": "boolean",
      "default": false
    },
    "metadata": {
      "type": "object",
      "$ref": "../../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "organization_id"
  ]
}
get_bankingInformations(**kwargs)

Get a list of banking information

GET /organizations/banking-information

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.

    CQL query

    Example

    • (username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode

    • bankName=TRC

  • totalRecords (str) –

    (default=auto) How to calculate the totalRecords property. “exact” for the correct number, “estimated” for an estimation, “auto” to automatically select “exact” or “estimated”, “none” for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords

    Example

    • none

  • 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

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Collection of banking information records",
  "type": "object",
  "properties": {
    "bankingInformation": {
      "description": "The list of banking information in this collection",
      "type": "array",
      "id": "bankingInformation",
      "items": {
        "type": "object",
        "$ref": "banking_information.json"
      }
    },
    "totalRecords": {
      "description": "The number of banking information records returned in this collection",
      "type": "integer"
    }
  },
  "additionalProperties": false,
  "required": [
    "bankingInformation",
    "totalRecords"
  ]
}
modify_bankingInformation(bankingInformationId: str, bankingInformation: dict)

Update a banking information by id

PUT /organizations/banking-information/{bankingInformationId}

Parameters
  • bankingInformationId (str) –

  • bankingInformation (dict) – See Schema below

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiRequestConflict – Conflict

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "An organization banking information",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique id of this banking information",
      "$ref": "../../common/schemas/uuid.json"
    },
    "_version": {
      "type": "integer",
      "description": "Record version for optimistic locking"
    },
    "organizationId": {
      "description": "The unique id of organization",
      "$ref": "../../common/schemas/uuid.json"
    },
    "categoryId": {
      "description": "The unique id of category",
      "$ref": "../../common/schemas/uuid.json"
    },
    "accountTypeId": {
      "description": "The unique id of accountType",
      "$ref": "../../common/schemas/uuid.json"
    },
    "bankName": {
      "description": "The bank name",
      "type": "string"
    },
    "bankAccountNumber": {
      "description": "The bank account number",
      "type": "string"
    },
    "transitNumber": {
      "description": "The transit number",
      "type": "string"
    },
    "notes": {
      "description": "The notes",
      "type": "string"
    },
    "isPrimary": {
      "description": "Is primary banking information",
      "type": "boolean",
      "default": false
    },
    "metadata": {
      "type": "object",
      "$ref": "../../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "organization_id"
  ]
}
set_bankingInformation(bankingInformation: dict)

Create a banking information

POST /organizations/banking-information

Parameters

bankingInformation (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiRequestFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created bankingInformation item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "An organization banking information",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique id of this banking information",
      "$ref": "../../common/schemas/uuid.json"
    },
    "_version": {
      "type": "integer",
      "description": "Record version for optimistic locking"
    },
    "organizationId": {
      "description": "The unique id of organization",
      "$ref": "../../common/schemas/uuid.json"
    },
    "categoryId": {
      "description": "The unique id of category",
      "$ref": "../../common/schemas/uuid.json"
    },
    "accountTypeId": {
      "description": "The unique id of accountType",
      "$ref": "../../common/schemas/uuid.json"
    },
    "bankName": {
      "description": "The bank name",
      "type": "string"
    },
    "bankAccountNumber": {
      "description": "The bank account number",
      "type": "string"
    },
    "transitNumber": {
      "description": "The transit number",
      "type": "string"
    },
    "notes": {
      "description": "The notes",
      "type": "string"
    },
    "isPrimary": {
      "description": "Is primary banking information",
      "type": "boolean",
      "default": false
    },
    "metadata": {
      "type": "object",
      "$ref": "../../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "organization_id"
  ]
}