sanmar_sdk.orders¶
Purchase orders for SanMar’s own order channels.
A PurchaseOrder is placed through SanMar’s standard purchase order web service or
uploaded as order files to SanMar’s SFTP server; both take the same fields. PromoStandards
orders carry a different set of fields and are modelled separately.
Attributes¶
A purchase order number as SanMar takes it, up to 28 characters of printable ASCII without commas. |
Classes¶
One item on a purchase order. |
|
A purchase order for SanMar's standard order service or SFTP order files. |
Module Contents¶
- type sanmar_sdk.orders.PONumber = Annotated[str, Field(min_length=1, max_length=28), ORDER_TEXT][source]¶
A purchase order number as SanMar takes it, up to 28 characters of printable ASCII without commas.
- class sanmar_sdk.orders.OrderLine(/, **data: Any)[source]¶
Bases:
sanmar_sdk.base.ModelOne item on a purchase order.
Name the item by
SkuKeywhere you can. SanMar recommends it, and the SFTP order files accept nothing else. ByStyleColorSize, the color must be the catalog color.- warehouse: sanmar_sdk.common.Warehouse | None = None[source]¶
The warehouse to ship this line from.
Leave it unset unless SanMar has set your account up for warehouse selection; otherwise SanMar picks warehouses according to the shipping option on your account.
- class sanmar_sdk.orders.PurchaseOrder(/, **data: Any)[source]¶
Bases:
sanmar_sdk.base.ModelA purchase order for SanMar’s standard order service or SFTP order files.
- ship_to: sanmar_sdk.common.ShipTo[source]¶
- ship_method: sanmar_sdk.common.ShipMethod | sanmar_sdk.common.WillCall[source]¶
- lines: Annotated[collections.abc.Sequence[OrderLine], Field(min_length=1), sanmar_sdk.base.FROZEN][source]¶
- merged_lines() list[OrderLine][source]¶
Return the lines with duplicates combined, as SanMar asks.
SanMar checks inventory line by line, so two lines for the same item and warehouse can each pass on their own while their total is short. Lines are combined on item and warehouse, keeping the order each first appeared in.