sanmar_sdk.standard.purchase_orders¶
SanMar’s own purchase order service.
PurchaseOrderService.check() asks SanMar whether an order could ship, and from which
warehouses, without placing it. PurchaseOrderService.submit() places it. Both take
the PurchaseOrder that SFTP ordering takes too.
SanMar needs an account set up for integrated ordering before it accepts orders here, and tests new integrations on EDEV first; see the Purchase Order Integration Guide.
Classes¶
Whether one line of an order could ship, and from where. |
|
SanMar's answer to whether an order could ship as it stands. |
|
SanMar's own purchase order service. |
Module Contents¶
- class sanmar_sdk.standard.purchase_orders.LineAvailability(/, **data: Any)[source]¶
Bases:
sanmar_sdk.base.RecordWhether one line of an order could ship, and from where.
- warehouse: sanmar_sdk.common.WarehouseNumber | None = None[source]¶
The warehouse SanMar would ship this line from.
- matches(item: sanmar_sdk.common.SkuKey | sanmar_sdk.common.StyleColorSize) bool[source]¶
Whether this line is for the given item.
- class sanmar_sdk.standard.purchase_orders.OrderCheck(/, **data: Any)[source]¶
Bases:
sanmar_sdk.base.RecordSanMar’s answer to whether an order could ship as it stands.
- lines: sanmar_sdk.base.OneOrMany[LineAvailability] = None[source]¶
- line_for(item: sanmar_sdk.common.SkuKey | sanmar_sdk.common.StyleColorSize) LineAvailability | None[source]¶
Find the line for an item, or
Noneif the order has no line for it.
- class sanmar_sdk.standard.purchase_orders.PurchaseOrderService(soap: SoapClient, credentials: Credentials)[source]¶
Bases:
sanmar_sdk._soap.ServiceSanMar’s own purchase order service.
- check(order: sanmar_sdk.orders.PurchaseOrder) OrderCheck[source]¶
Ask whether an order could ship, and from where, without placing it.
Being out of stock is an answer, not an error: see
OrderCheck.availableand each line’s message.
- submit(order: sanmar_sdk.orders.PurchaseOrder) str[source]¶
Place an order. Returns SanMar’s confirmation message.
SanMar ships each line from the warehouses its shipping option for the account picks, unless a line names one. Check an order first with
check()if the account splits orders across warehouses.