sanmar_sdk.promostandards.purchase_orders¶
SanMar’s PromoStandards Purchase Order service, version 1.0.0.
Places orders by part: SanMar’s unique key for each style, color and size. The
PromoStandards schema requires many fields SanMar ignores, such as totals, tolerances and
consolidation flags; the SDK fills those in, and leaves out everything SanMar says not to
send. Only blank goods can be ordered, and there is no will call or truck freight here; use
the standard purchase order service (sanmar_sdk.standard.purchase_orders) for those.
SanMar needs an account set up for integrated ordering before it accepts orders, and tests new integrations on EDEV first; see the Purchase Order Integration Guide.
Attributes¶
What goes in the text fields PromoStandards requires and SanMar does not use. |
Classes¶
One part on a PromoStandards purchase order. |
|
A purchase order for SanMar's PromoStandards purchase order service. |
|
SanMar's PromoStandards Purchase Order service. |
Module Contents¶
- sanmar_sdk.promostandards.purchase_orders.NOT_USED = 'N/A'[source]¶
What goes in the text fields PromoStandards requires and SanMar does not use.
- class sanmar_sdk.promostandards.purchase_orders.PromoStandardsOrderLine(/, **data: Any)[source]¶
Bases:
sanmar_sdk.base.ModelOne part on a PromoStandards purchase order.
- part_id: Annotated[str, Field(min_length=1, max_length=64), sanmar_sdk.base.ORDER_TEXT][source]¶
SanMar’s unique key for the style, color and size (
UNIQUE_KEYin its files).
- 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.promostandards.purchase_orders.PromoStandardsOrder(/, **data: Any)[source]¶
Bases:
sanmar_sdk.base.ModelA purchase order for SanMar’s PromoStandards purchase order service.
- po_number: sanmar_sdk.orders.PONumber[source]¶
- ship_to: sanmar_sdk.common.ShipTo[source]¶
- ship_method: sanmar_sdk.common.ShipMethod[source]¶
- lines: Annotated[collections.abc.Sequence[PromoStandardsOrderLine], Field(min_length=1), sanmar_sdk.base.FROZEN][source]¶
- order_date: datetime.datetime | None = None[source]¶
When the order was placed. Defaults to the time it is sent.
- ship_references: Annotated[collections.abc.Sequence[Annotated[str, Field(min_length=1, max_length=64), sanmar_sdk.base.ORDER_TEXT]], Field(max_length=2), sanmar_sdk.base.FROZEN] = ()[source]¶
Up to two references for the shipping process. Defaults to the PO number.
- merged_lines() list[PromoStandardsOrderLine][source]¶
Return the lines with duplicates combined, keeping the order each first appeared in.
SanMar checks inventory line by line, so two lines for the same part and warehouse can each pass on their own while their total is short.
- class sanmar_sdk.promostandards.purchase_orders.PurchaseOrderService(soap: SoapClient, credentials: Credentials)[source]¶
Bases:
sanmar_sdk.promostandards._common.PromoStandardsServiceSanMar’s PromoStandards Purchase Order service.
- send(order: PromoStandardsOrder) str[source]¶
Place an order. Returns SanMar’s transaction id, which starts with the PO number.