foliolib.folio.api.finance.TransactionSummary

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

Bases: foliolib.folio.FolioApi

Transaction Summaries API

This documents the API calls that can be made to create Transaction summaries for Orders and Invoices

Parameters
  • tenant (str) – Tenant id

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

Methods

modify_invoiceTransactionSummary(...)

Updated invoice transaction summary, for an invoice with number of pending payments and number of payment/credits

modify_orderTransactionSummary(...)

Updated order transaction summary, for an order with number of transactions(encumbrances)

set_invoiceTransactionSummary(...)

Create a new invoice transaction summary, for an order with number of transactions(encumbrances) and number of payment credits

set_orderTransactionSummary(...)

Create a new order transaction summary, for an order with number of transactions(encumbrances)

modify_invoiceTransactionSummary(invoiceTransactionSummariesId: str, invoiceTransactionSummary: dict)

Updated invoice transaction summary, for an invoice with number of pending payments and number of payment/credits

PUT /finance/invoice-transaction-summaries/{invoiceTransactionSummariesId}

Parameters
  • invoiceTransactionSummariesId (str) –

  • invoiceTransactionSummary (dict) – See Schema below

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Invoice transactions Summary",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID of this summary",
      "$ref": "../../common/schemas/uuid.json"
    },
    "numPendingPayments": {
      "description": "Total number of pending payments(transactions) expected for this invoice. Negative value indicates that all transactions have been processed",
      "type": "integer"
    },
    "numPaymentsCredits": {
      "description": "Total number of payments/credits(transactions) expected for this invoice. Negative value indicates that all transactions have been processed",
      "type": "integer"
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "numPendingPayments",
    "numPaymentsCredits"
  ]
}
modify_orderTransactionSummary(orderTransactionSummariesId: str, orderTransactionSummary: dict)

Updated order transaction summary, for an order with number of transactions(encumbrances)

PUT /finance/order-transaction-summaries/{orderTransactionSummariesId}

Parameters
  • orderTransactionSummariesId (str) –

  • orderTransactionSummary (dict) – See Schema below

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Order transactions summary",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID of this summary",
      "$ref": "../../common/schemas/uuid.json"
    },
    "numTransactions": {
      "description": "Total number of transactions (encumbrances) expected for this order. Negative value indicates that all transactions have been processed",
      "type": "integer"
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "numTransactions"
  ]
}
set_invoiceTransactionSummary(invoiceTransactionSummary: dict)

Create a new invoice transaction summary, for an order with number of transactions(encumbrances) and number of payment credits

POST /finance/invoice-transaction-summaries

Parameters

invoiceTransactionSummary (dict) – See Schema below

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Invoice transactions Summary",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID of this summary",
      "$ref": "../../common/schemas/uuid.json"
    },
    "numPendingPayments": {
      "description": "Total number of pending payments(transactions) expected for this invoice. Negative value indicates that all transactions have been processed",
      "type": "integer"
    },
    "numPaymentsCredits": {
      "description": "Total number of payments/credits(transactions) expected for this invoice. Negative value indicates that all transactions have been processed",
      "type": "integer"
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "numPendingPayments",
    "numPaymentsCredits"
  ]
}
set_orderTransactionSummary(orderTransactionSummary: dict)

Create a new order transaction summary, for an order with number of transactions(encumbrances)

POST /finance/order-transaction-summaries

Parameters

orderTransactionSummary (dict) – See Schema below

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Order transactions summary",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID of this summary",
      "$ref": "../../common/schemas/uuid.json"
    },
    "numTransactions": {
      "description": "Total number of transactions (encumbrances) expected for this order. Negative value indicates that all transactions have been processed",
      "type": "integer"
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "numTransactions"
  ]
}