foliolib.folio.api.sender.Sender

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

Bases: foliolib.folio.FolioApi

Parameters
  • tenant (str) – Tenant id

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

Methods

set_messageDelivery(messageDelivery)

Send prepered notification to delivery channels

set_messageDelivery(messageDelivery: dict)

Send prepered notification to delivery channels

POST /message-delivery

Parameters

messageDelivery (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "Notification containing messages to be sent",
  "additionalProperties": false,
  "properties": {
    "notificationId": {
      "type": "string",
      "description": "Notification id; UUID format; Is used to receive notification when messages are delivered"
    },
    "recipientUserId": {
      "type": "string",
      "description": "Recipient user id; Is used to get contact information to deliver messages"
    },
    "messages": {
      "type": "array",
      "description": "Array of messages to be sent",
      "items": {
        "type": "object",
        "$ref": "message.json"
      }
    }
  },
  "required": [
    "notificationId",
    "recipientUserId",
    "messages"
  ]
}