foliolib.folio.api.orders.AcquisitionMethod
- class foliolib.folio.api.orders.AcquisitionMethod(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiAcquisition method
CRUD APIs used to manage acquisition method.
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
delete_acquisitionMethod(acquisitionMethodsId)Delete acquisitionMethod item with given {acquisitionMethodId}
get_acquisitionMethod(acquisitionMethodsId)Retrieve acquisitionMethod item with given {acquisitionMethodId}
get_acquisitionMethods(**kwargs)Get list of acquisition methods
Update acquisitionMethod item with given {acquisitionMethodId}
set_acquisitionMethod(acquisitionMethod)Create a new acquisitionMethod item.
- delete_acquisitionMethod(acquisitionMethodsId: str)
Delete acquisitionMethod item with given {acquisitionMethodId}
DELETE /orders/acquisition-methods/{acquisitionMethodsId}- Parameters
acquisitionMethodsId (str) –
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
- get_acquisitionMethod(acquisitionMethodsId: str)
Retrieve acquisitionMethod item with given {acquisitionMethodId}
GET /orders/acquisition-methods/{acquisitionMethodsId}- Parameters
acquisitionMethodsId (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": "An acquisition method", "type": "object", "properties": { "id": { "description": "The unique id of this acquisition method", "$ref": "../../common/schemas/uuid.json" }, "value": { "description": "The value of this acquisition method", "type": "string" }, "source": { "description": "Source of acquisition method", "type": "string", "enum": [ "User", "System" ], "default": "User" }, "metadata": { "type": "object", "$ref": "../../../raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "value", "source" ] }
- get_acquisitionMethods(**kwargs)
Get list of acquisition methods
GET /orders/acquisition-methods- 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: for example code
Example
(username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode
[“value”, “Purchase At Vendor System”, “=”]
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": "collection of acquisition method line records", "type": "object", "properties": { "acquisitionMethods": { "description": "collection of acquisition method line records", "type": "array", "id": "acquisitionMethods", "items": { "type": "object", "$ref": "acquisition_method.json" } }, "totalRecords": { "description": "The number of objects contained in this collection", "type": "integer" } }, "additionalProperties": false, "required": [ "acquisitionMethods", "totalRecords" ] }
- modify_acquisitionMethod(acquisitionMethodsId: str, acquisitionMethod: dict)
Update acquisitionMethod item with given {acquisitionMethodId}
PUT /orders/acquisition-methods/{acquisitionMethodsId}- Parameters
acquisitionMethodsId (str) –
acquisitionMethod (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": "An acquisition method", "type": "object", "properties": { "id": { "description": "The unique id of this acquisition method", "$ref": "../../common/schemas/uuid.json" }, "value": { "description": "The value of this acquisition method", "type": "string" }, "source": { "description": "Source of acquisition method", "type": "string", "enum": [ "User", "System" ], "default": "User" }, "metadata": { "type": "object", "$ref": "../../../raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "value", "source" ] }
- set_acquisitionMethod(acquisitionMethod: dict)
Create a new acquisitionMethod item.
POST /orders/acquisition-methods- Parameters
acquisitionMethod (dict) – See Schema below
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
Headers
Location - URI to the created acquisitionMethod item
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "An acquisition method", "type": "object", "properties": { "id": { "description": "The unique id of this acquisition method", "$ref": "../../common/schemas/uuid.json" }, "value": { "description": "The value of this acquisition method", "type": "string" }, "source": { "description": "Source of acquisition method", "type": "string", "enum": [ "User", "System" ], "default": "User" }, "metadata": { "type": "object", "$ref": "../../../raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "value", "source" ] }