foliolib.folio.api.users.Patronpin

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

Bases: foliolib.folio.FolioApi

patron-pins API

This documents the API calls that can be made to set and verify patron pins

Parameters
  • tenant (str) – Tenant id

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

Methods

delete_patronPins(patronPin)

Remove the PIN for a user

set_patronPin(patronPin)

Set the PIN for a user

set_verify(verify)

Verify the pin posted

delete_patronPins(patronPin: dict)

Remove the PIN for a user

DELETE /patron-pin

Parameters

patronPin (dict) – See Schema below

Raises
  • OkapiRequestUnprocessableEntity – Unprocessable Entity

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Patron PIN Schema",
  "description": "A Patron ID and optional Corresponding PIN",
  "type": "object",
  "properties": {
    "id": {
      "description": "ID of user",
      "type": "string"
    },
    "pin": {
      "description": "PIN of user",
      "type": "string"
    }
  }
}
set_patronPin(patronPin: dict)

Set the PIN for a user

POST /patron-pin

Parameters

patronPin (dict) – See Schema below

Raises

OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Patron PIN Schema",
  "description": "A Patron ID and optional Corresponding PIN",
  "type": "object",
  "properties": {
    "id": {
      "description": "ID of user",
      "type": "string"
    },
    "pin": {
      "description": "PIN of user",
      "type": "string"
    }
  }
}
set_verify(verify: dict)

Verify the pin posted

POST /patron-pin/verify

Parameters

verify (dict) – See Schema below

Raises
  • OkapiRequestUnprocessableEntity – Unprocessable Entity

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Patron PIN Schema",
  "description": "A Patron ID and optional Corresponding PIN",
  "type": "object",
  "properties": {
    "id": {
      "description": "ID of user",
      "type": "string"
    },
    "pin": {
      "description": "PIN of user",
      "type": "string"
    }
  }
}