sanmar_sdk.promostandards.purchase_orders ========================================= .. py:module:: sanmar_sdk.promostandards.purchase_orders .. autoapi-nested-parse:: 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 (:mod:`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 ---------- .. autoapisummary:: sanmar_sdk.promostandards.purchase_orders.NOT_USED Classes ------- .. autoapisummary:: sanmar_sdk.promostandards.purchase_orders.PromoStandardsOrderLine sanmar_sdk.promostandards.purchase_orders.PromoStandardsOrder sanmar_sdk.promostandards.purchase_orders.PurchaseOrderService Module Contents --------------- .. py:data:: NOT_USED :value: 'N/A' What goes in the text fields PromoStandards requires and SanMar does not use. .. py:class:: PromoStandardsOrderLine(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Model` One part on a PromoStandards purchase order. .. py:attribute:: part_id :type: Annotated[str, Field(min_length=1, max_length=64), sanmar_sdk.base.ORDER_TEXT] SanMar's unique key for the style, color and size (``UNIQUE_KEY`` in its files). .. py:attribute:: quantity :type: int :value: None .. py:attribute:: warehouse :type: sanmar_sdk.common.Warehouse | None :value: None 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. .. py:class:: PromoStandardsOrder(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Model` A purchase order for SanMar's PromoStandards purchase order service. .. py:attribute:: po_number :type: sanmar_sdk.orders.PONumber .. py:attribute:: ship_to :type: sanmar_sdk.common.ShipTo .. py:attribute:: ship_method :type: sanmar_sdk.common.ShipMethod .. py:attribute:: lines :type: Annotated[collections.abc.Sequence[PromoStandardsOrderLine], Field(min_length=1), sanmar_sdk.base.FROZEN] .. py:attribute:: order_date :type: datetime.datetime | None :value: None When the order was placed. Defaults to the time it is sent. .. py:attribute:: ship_references :type: 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] :value: () Up to two references for the shipping process. Defaults to the PO number. .. py:method:: merged_lines() -> list[PromoStandardsOrderLine] 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. .. py:class:: PurchaseOrderService(soap: SoapClient, credentials: Credentials) Bases: :py:obj:`sanmar_sdk.promostandards._common.PromoStandardsService` SanMar's PromoStandards Purchase Order service. .. py:attribute:: endpoint .. py:attribute:: version :value: '1.0.0' The PromoStandards version SanMar implements, sent as ``wsVersion``. .. py:method:: send(order: PromoStandardsOrder) -> str Place an order. Returns SanMar's transaction id, which starts with the PO number. .. py:method:: supported_order_types() -> list[str] List the order types SanMar accepts. SanMar sells blank goods only: ``Blank``.