foliolib.folio.api.financeStorage.GroupFundFy

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

Bases: foliolib.folio.FolioApi

Group/fund/fiscal year records relations CRUD APIs

CRUD APIs used to manage group/fund/fiscal year records relations

Parameters
  • tenant (str) – Tenant id

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

Methods

delete_groupFundFiscalYear(...)

Delete groupFundFiscalYear item with given {groupFundFiscalYearId}

get_groupFundFiscalYear(groupFundFiscalYearsId)

Retrieve groupFundFiscalYear item with given {groupFundFiscalYearId}

get_groupFundFiscalYears(**kwargs)

Get list of group/fund/fiscal year records relations

modify_groupFundFiscalYear(...)

Update groupFundFiscalYear item with given {groupFundFiscalYearId}

set_groupFundFiscalYear(groupFundFiscalYear)

Create a new groupFundFiscalYear item.

delete_groupFundFiscalYear(groupFundFiscalYearsId: str)

Delete groupFundFiscalYear item with given {groupFundFiscalYearId}

DELETE /finance-storage/group-fund-fiscal-years/{groupFundFiscalYearsId}

Parameters

groupFundFiscalYearsId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

get_groupFundFiscalYear(groupFundFiscalYearsId: str)

Retrieve groupFundFiscalYear item with given {groupFundFiscalYearId}

GET /finance-storage/group-fund-fiscal-years/{groupFundFiscalYearsId}

Parameters

groupFundFiscalYearsId (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": "A relationship between group and fund on a per fiscal year basis",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID of the record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "_version": {
      "type": "integer",
      "description": "Record version for optimistic locking"
    },
    "budgetId": {
      "description": "UUID of the budget record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "groupId": {
      "description": "UUID of the group record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "fiscalYearId": {
      "description": "UUID of the fiscal year record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "fundId": {
      "description": "UUID of the fund record",
      "$ref": "../../common/schemas/uuid.json"
    }
  },
  "additionalProperties": false,
  "required": [
    "groupId",
    "fiscalYearId",
    "fundId"
  ]
}
get_groupFundFiscalYears(**kwargs)

Get list of group/fund/fiscal year records relations

GET /finance-storage/group-fund-fiscal-years

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: e.g.

    Example

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

    • group.name == History and and fund.fundStatus == Active and fiscalYear.periodEnd < 2020-01-01 and fundType.name == Monographs and ledger.name == One-time

  • 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

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A collection of fund/group relationship records on a per fiscal year basis",
  "type": "object",
  "properties": {
    "groupFundFiscalYears": {
      "description": "The list of fund/group relationship records on a per fiscal year basis",
      "type": "array",
      "items": {
        "$ref": "group_fund_fiscal_year.json"
      }
    },
    "totalRecords": {
      "description": "The number of records contained in this collection",
      "type": "integer",
      "minimum": 0
    }
  },
  "additionalProperties": false,
  "required": [
    "groupFundFiscalYears",
    "totalRecords"
  ]
}
modify_groupFundFiscalYear(groupFundFiscalYearsId: str, groupFundFiscalYear: dict)

Update groupFundFiscalYear item with given {groupFundFiscalYearId}

PUT /finance-storage/group-fund-fiscal-years/{groupFundFiscalYearsId}

Parameters
  • groupFundFiscalYearsId (str) –

  • groupFundFiscalYear (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": "A relationship between group and fund on a per fiscal year basis",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID of the record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "_version": {
      "type": "integer",
      "description": "Record version for optimistic locking"
    },
    "budgetId": {
      "description": "UUID of the budget record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "groupId": {
      "description": "UUID of the group record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "fiscalYearId": {
      "description": "UUID of the fiscal year record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "fundId": {
      "description": "UUID of the fund record",
      "$ref": "../../common/schemas/uuid.json"
    }
  },
  "additionalProperties": false,
  "required": [
    "groupId",
    "fiscalYearId",
    "fundId"
  ]
}
set_groupFundFiscalYear(groupFundFiscalYear: dict)

Create a new groupFundFiscalYear item.

POST /finance-storage/group-fund-fiscal-years

Parameters

groupFundFiscalYear (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

Headers

  • Location - URI to the created groupFundFiscalYear item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A relationship between group and fund on a per fiscal year basis",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID of the record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "_version": {
      "type": "integer",
      "description": "Record version for optimistic locking"
    },
    "budgetId": {
      "description": "UUID of the budget record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "groupId": {
      "description": "UUID of the group record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "fiscalYearId": {
      "description": "UUID of the fiscal year record",
      "$ref": "../../common/schemas/uuid.json"
    },
    "fundId": {
      "description": "UUID of the fund record",
      "$ref": "../../common/schemas/uuid.json"
    }
  },
  "additionalProperties": false,
  "required": [
    "groupId",
    "fiscalYearId",
    "fundId"
  ]
}