foliolib.folio.api.invoiceStorage.BatchVoucherExportConfiguration

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

Bases: foliolib.folio.FolioApi

Batch voucher export configurations CRUD API

This documents the API calls that can be made to manage batch voucher export configurations; This API is intended for internal use only

Parameters
  • tenant (str) – Tenant id

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

Methods

delete_credential(exportConfigurationsId)

Delete credential item with given {credentialId}

delete_exportConfiguration(...)

Delete exportConfiguration item with given {exportConfigurationId}

get_credential(exportConfigurationsId)

Retrieve credential item with given {credentialId}

get_exportConfiguration(exportConfigurationsId)

Retrieve exportConfiguration item with given {exportConfigurationId}

get_exportConfigurations(**kwargs)

Get list of batch voucher export configurations

modify_credential(exportConfigurationsId, ...)

Update credential item with given {credentialId}

modify_exportConfiguration(...)

Update exportConfiguration item with given {exportConfigurationId}

set_credential(exportConfigurationsId)

POST /batch-voucher-storage/export-configurations/{exportConfigurationsId}/credentials

set_exportConfiguration(exportConfiguration)

Create a new exportConfiguration item.

set_exportConfiguration_by_exportConfigurationsId(...)

POST /batch-voucher-storage/export-configurations/{exportConfigurationsId}

delete_credential(exportConfigurationsId: str)

Delete credential item with given {credentialId}

DELETE /batch-voucher-storage/export-configurations/{exportConfigurationsId}/credentials

Parameters

exportConfigurationsId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

delete_exportConfiguration(exportConfigurationsId: str)

Delete exportConfiguration item with given {exportConfigurationId}

DELETE /batch-voucher-storage/export-configurations/{exportConfigurationsId}

Parameters

exportConfigurationsId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

get_credential(exportConfigurationsId: str)

Retrieve credential item with given {credentialId}

GET /batch-voucher-storage/export-configurations/{exportConfigurationsId}/credentials

Parameters

exportConfigurationsId (str) –

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Credentials used to upload batch vouchers.  Part of the batch voucher export configuration, but separated for security reasons",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID of this credentials record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "username": {
      "description": "The username portion of these credentials",
      "type": "string"
    },
    "password": {
      "description": "The password portion of these credentials",
      "type": "string"
    },
    "exportConfigId": {
      "description": "UUID of the batch voucher export configuration record these credentials as associated with",
      "$ref": "../../common/schemas/uuid.json"
    },
    "metadata": {
      "type": "object",
      "$ref": "../../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "exportConfigId",
    "username"
  ]
}
get_exportConfiguration(exportConfigurationsId: str)

Retrieve exportConfiguration item with given {exportConfigurationId}

GET /batch-voucher-storage/export-configurations/{exportConfigurationsId}

Parameters

exportConfigurationsId (str) –

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Configuration information for a voucher export - there's only one of these for a given batchGroup",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID of the configuration record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "batchGroupId": {
      "description": "UUID of the batch group this configuration is associated with",
      "$ref": "../../common/schemas/uuid.json"
    },
    "enableScheduledExport": {
      "description": "Whether or not to enable scheduled batch voucher exports",
      "type": "boolean",
      "default": false
    },
    "format": {
      "description": "Desired format (MIME type) of the batch voucher",
      "type": "string",
      "enum": [
        "Application/json",
        "Application/xml"
      ],
      "default": "Application/json"
    },
    "startTime": {
      "description": "The time of day to trigger an export if enableDailyExport == true.  Format: HH:MM",
      "type": "string",
      "pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]$",
      "default": "00:00"
    },
    "uploadURI": {
      "description": "Host where batch vouchers should be uploaded to. Limited to FTP initially",
      "type": "string"
    },
    "uploadDirectory": {
      "description": "The upload directory",
      "type": "string"
    },
    "ftpFormat": {
      "description": "The FTP format",
      "type": "string",
      "enum": [
        "SFTP",
        "FTP"
      ]
    },
    "ftpPort": {
      "description": "The ftp port",
      "type": "integer"
    },
    "weekdays": {
      "description": "An array of weekdays (enum: Sunday, Monday, etc.) indicating which days to trigger exports on.  If empty, indicates daily exports",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "Sunday",
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday",
          "Saturday"
        ],
        "uniqueItems": true
      }
    },
    "metadata": {
      "type": "object",
      "$ref": "../../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "batchGroupId"
  ]
}
get_exportConfigurations(**kwargs)

Get list of batch voucher export configurations

GET /batch-voucher-storage/export-configurations

Parameters

**kwargs (properties) – Keyword Arguments

Keyword Arguments
  • 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

  • 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: for example format

    Example

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

    • format==”Application/xml”

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 batch voucher export configurations",
  "type": "object",
  "properties": {
    "exportConfigs": {
      "description": "an array of batch voucher export configuration records",
      "id": "exportConfigs",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "export_configuration.json"
      }
    },
    "totalRecords": {
      "description": "total number of records in the array",
      "type": "integer"
    }
  },
  "required": [
    "exportConfigs",
    "totalRecords"
  ]
}
modify_credential(exportConfigurationsId: str, credential: dict)

Update credential item with given {credentialId}

PUT /batch-voucher-storage/export-configurations/{exportConfigurationsId}/credentials

Parameters
  • exportConfigurationsId (str) –

  • credential (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#",
  "description": "Credentials used to upload batch vouchers.  Part of the batch voucher export configuration, but separated for security reasons",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID of this credentials record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "username": {
      "description": "The username portion of these credentials",
      "type": "string"
    },
    "password": {
      "description": "The password portion of these credentials",
      "type": "string"
    },
    "exportConfigId": {
      "description": "UUID of the batch voucher export configuration record these credentials as associated with",
      "$ref": "../../common/schemas/uuid.json"
    },
    "metadata": {
      "type": "object",
      "$ref": "../../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "exportConfigId",
    "username"
  ]
}
modify_exportConfiguration(exportConfigurationsId: str, exportConfiguration: dict)

Update exportConfiguration item with given {exportConfigurationId}

PUT /batch-voucher-storage/export-configurations/{exportConfigurationsId}

Parameters
  • exportConfigurationsId (str) –

  • exportConfiguration (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#",
  "description": "Configuration information for a voucher export - there's only one of these for a given batchGroup",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID of the configuration record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "batchGroupId": {
      "description": "UUID of the batch group this configuration is associated with",
      "$ref": "../../common/schemas/uuid.json"
    },
    "enableScheduledExport": {
      "description": "Whether or not to enable scheduled batch voucher exports",
      "type": "boolean",
      "default": false
    },
    "format": {
      "description": "Desired format (MIME type) of the batch voucher",
      "type": "string",
      "enum": [
        "Application/json",
        "Application/xml"
      ],
      "default": "Application/json"
    },
    "startTime": {
      "description": "The time of day to trigger an export if enableDailyExport == true.  Format: HH:MM",
      "type": "string",
      "pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]$",
      "default": "00:00"
    },
    "uploadURI": {
      "description": "Host where batch vouchers should be uploaded to. Limited to FTP initially",
      "type": "string"
    },
    "uploadDirectory": {
      "description": "The upload directory",
      "type": "string"
    },
    "ftpFormat": {
      "description": "The FTP format",
      "type": "string",
      "enum": [
        "SFTP",
        "FTP"
      ]
    },
    "ftpPort": {
      "description": "The ftp port",
      "type": "integer"
    },
    "weekdays": {
      "description": "An array of weekdays (enum: Sunday, Monday, etc.) indicating which days to trigger exports on.  If empty, indicates daily exports",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "Sunday",
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday",
          "Saturday"
        ],
        "uniqueItems": true
      }
    },
    "metadata": {
      "type": "object",
      "$ref": "../../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "batchGroupId"
  ]
}
set_credential(exportConfigurationsId: str)

POST /batch-voucher-storage/export-configurations/{exportConfigurationsId}/credentials

Parameters

exportConfigurationsId (str) –

set_exportConfiguration(exportConfiguration: dict)

Create a new exportConfiguration item.

POST /batch-voucher-storage/export-configurations

Parameters

exportConfiguration (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

Headers

  • Location - URI to the created exportConfiguration item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Configuration information for a voucher export - there's only one of these for a given batchGroup",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID of the configuration record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "batchGroupId": {
      "description": "UUID of the batch group this configuration is associated with",
      "$ref": "../../common/schemas/uuid.json"
    },
    "enableScheduledExport": {
      "description": "Whether or not to enable scheduled batch voucher exports",
      "type": "boolean",
      "default": false
    },
    "format": {
      "description": "Desired format (MIME type) of the batch voucher",
      "type": "string",
      "enum": [
        "Application/json",
        "Application/xml"
      ],
      "default": "Application/json"
    },
    "startTime": {
      "description": "The time of day to trigger an export if enableDailyExport == true.  Format: HH:MM",
      "type": "string",
      "pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]$",
      "default": "00:00"
    },
    "uploadURI": {
      "description": "Host where batch vouchers should be uploaded to. Limited to FTP initially",
      "type": "string"
    },
    "uploadDirectory": {
      "description": "The upload directory",
      "type": "string"
    },
    "ftpFormat": {
      "description": "The FTP format",
      "type": "string",
      "enum": [
        "SFTP",
        "FTP"
      ]
    },
    "ftpPort": {
      "description": "The ftp port",
      "type": "integer"
    },
    "weekdays": {
      "description": "An array of weekdays (enum: Sunday, Monday, etc.) indicating which days to trigger exports on.  If empty, indicates daily exports",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "Sunday",
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday",
          "Saturday"
        ],
        "uniqueItems": true
      }
    },
    "metadata": {
      "type": "object",
      "$ref": "../../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "batchGroupId"
  ]
}
set_exportConfiguration_by_exportConfigurationsId(exportConfigurationsId: str)

POST /batch-voucher-storage/export-configurations/{exportConfigurationsId}

Parameters

exportConfigurationsId (str) –