Order Management

Order Request

class labstep.entities.orderRequest.model.OrderRequest(data, user)

Represents an Order Request on Labstep.

To see all attributes of the order request run

print(my_order_request)

Specific attributes can be accessed via dot notation like so…

print(my_order_request.name)
print(my_order_request.id)
Inherited-members:

edit(status=OPTIONAL, resource_id=OPTIONAL, quantity=OPTIONAL, price=OPTIONAL, currency=OPTIONAL, extraParams={})

Edit an existing OrderRequest.

Parameters:
  • status (str) – The status of the OrderRequest. Options are: “new”, “approved”, “ordered”, “back_ordered”, “received”, and “cancelled”.

  • resource_id (int) – The id of the Resource being requested.

  • quantity (int) – The quantity of the OrderRequest.

  • price (int) – The price of the OrderRequest.

  • currency (str) – The currency of the price in the format of the 3-letter currency code by country. For example, “EUR” for Euro, “GBP” for British Pound Sterling, “USD” for US Dollar, etc.

Returns:

An object representing the edited OrderRequest.

Return type:

OrderRequest

Example

my_orderRequest = user.getOrderRequest(17000)
my_orderRequest.edit(status="back_ordered", quantity=3,
                     price=50, currency="GBP")
delete()

Delete an existing OrderRequest.

Example

my_orderRequest = user.getOrderRequest(17000)
my_orderRequest.delete()
getResource()

Retrieve the Resource of the OrderRequest.

Returns:

An object representing the Resource of the OrderRequest.

Return type:

Resource

Example

my_orderRequest = user.getOrderRequest(17000)
my_orderRequest.getResource()

Purchase Order

class labstep.entities.purchaseOrder.model.PurchaseOrder(data, user)

Represents a Purchase Order on Labstep.

To see all attributes of the order request run

print(my_order_request)

Specific attributes can be accessed via dot notation like so…

print(my_order_request.name)
print(my_order_request.id)
Inherited-members:

edit(name=OPTIONAL, status=OPTIONAL, currency=OPTIONAL, handling_amount=OPTIONAL, discount_amount=OPTIONAL, tax_rate=OPTIONAL, extraParams={})

Edit an existing Purchase Order.

Parameters:
  • name (str) – The name of the Purchase Order.

  • status (str) – The status of the Purchase Order. Options are: “open”, “pending”, and “completed”.

  • currency (str) – The currency of the price in the format of the 3-letter currency code by country. For example, “EUR” for Euro, “GBP” for British Pound Sterling, “USD” for US Dollar, etc.

  • handling_amount (int) – The amount designed to handling the Purchase Order.

  • deducted_amount (int) – The amount deducted in the Purchase Order.

  • tax_rate (int) – The tax rate used to calculate the total in the Purchase Order.

Returns:

An object representing the edited PurchaseOrder.

Return type:

PurchaseOrder

Example

my_purchaseOrder = user.getPurchaseOrder(17000)
my_purchaseOrder.edit(status="completed", currency="GBP")
delete()

Delete an existing Purchase Order.

Example

my_purchaseOrder = user.getPurchaseOrder(17000)
my_purchaseOrder.delete()
addOrderRequest(order_request_id)

Add Order Request to an existing Purchase Order.

Parameters:

order_request_id (int) – The ID of the Order request to be added to the Purchase Order.

Example

my_purchaseOrder = user.getPurchaseOrder(17000)
my_purchaseOrder.addOrderRequest(120)