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)