foliolib.folio.api.orders.Rollover

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

Bases: foliolib.folio.FolioApi

Orders Business Logic API

API for running Orders rollover

Parameters
  • tenant (str) – Tenant id

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

Methods

set_rollover(rollover)

POST /orders/rollover

set_rollover(rollover: dict)

POST /orders/rollover

Parameters

rollover (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Ledger fiscal year rollover",
  "type": "object",
  "properties": {
    "id": {
      "description": "id of ledger fiscal year rollover",
      "$ref": "../../common/schemas/uuid.json"
    },
    "_version": {
      "type": "integer",
      "description": "Record version for optimistic locking"
    },
    "ledgerId": {
      "description": "Ledger UUID for which rollover was started",
      "$ref": "../../common/schemas/uuid.json"
    },
    "rolloverType": {
      "description": "Type of rollover. Action Commit means run real rollover",
      "type": "object",
      "$ref": "../../mod-finance/schemas/ledger_rollover_type.json"
    },
    "fromFiscalYearId": {
      "description": "UUID of the fiscal year from which rollover will be happened",
      "$ref": "../../common/schemas/uuid.json"
    },
    "toFiscalYearId": {
      "description": "UUID of the fiscal year to which rollover will be happened",
      "$ref": "../../common/schemas/uuid.json"
    },
    "restrictEncumbrance": {
      "description": "Imposes restrictions on encumbrances",
      "type": "boolean",
      "default": false
    },
    "restrictExpenditures": {
      "description": "Imposes restrictions on payments",
      "type": "boolean",
      "default": false
    },
    "needCloseBudgets": {
      "description": "Control that all budget must be closed in rollover time",
      "type": "boolean",
      "default": true
    },
    "currencyFactor": {
      "description": "Currency factor",
      "type": "integer",
      "readonly": true
    },
    "budgetsRollover": {
      "description": "Budget rollover info",
      "type": "array",
      "id": "budgetsRollover",
      "items": {
        "type": "object",
        "$ref": "budget_rollover.json"
      }
    },
    "encumbrancesRollover": {
      "description": "Encumbrances rollover info",
      "id": "encumbrancesRollover",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "encumbrance_rollover.json"
      }
    },
    "metadata": {
      "$ref": "../../../raml-util/schemas/metadata.schema",
      "readonly": true,
      "type": "object"
    }
  },
  "additionalProperties": false,
  "required": [
    "ledgerId",
    "fromFiscalYearId",
    "toFiscalYearId",
    "budgetsRollover",
    "encumbrancesRollover"
  ]
}