sanmar_sdk.promostandards.order_status ====================================== .. py:module:: sanmar_sdk.promostandards.order_status .. autoapi-nested-parse:: SanMar's PromoStandards Order Status service, version 2.0.0. Reports where orders stand, line by line, with any holds. SanMar asks that it be called no more than three times a day, starting two hours after an order is placed, and that an order not be checked again once it is :attr:`Status.COMPLETE` or :attr:`Status.CANCELED`. SanMar does not implement ``getIssue`` or the ``transactionId`` query. Attributes ---------- .. autoapisummary:: sanmar_sdk.promostandards.order_status.MAX_AGE sanmar_sdk.promostandards.order_status.StatusValue Classes ------- .. autoapisummary:: sanmar_sdk.promostandards.order_status.Status sanmar_sdk.promostandards.order_status.IssueDetail sanmar_sdk.promostandards.order_status.ContactDetails sanmar_sdk.promostandards.order_status.Contact sanmar_sdk.promostandards.order_status.StatusLine sanmar_sdk.promostandards.order_status.Issue sanmar_sdk.promostandards.order_status.SalesOrderStatus sanmar_sdk.promostandards.order_status.OrderStatus sanmar_sdk.promostandards.order_status.OrderStatusService Module Contents --------------- .. py:data:: MAX_AGE .. py:class:: Status Bases: :py:obj:`enum.StrEnum` Where an order or line stands. .. py:attribute:: RECEIVED :value: 'received' SanMar has the order, including when it is on hold or backordered. .. py:attribute:: CONFIRMED :value: 'confirmed' .. py:attribute:: PREPRODUCTION :value: 'preproduction' .. py:attribute:: IN_PRODUCTION :value: 'inProduction' .. py:attribute:: IN_STORAGE :value: 'inStorage' .. py:attribute:: PARTIALLY_SHIPPED :value: 'partiallyShipped' .. py:attribute:: SHIPPED :value: 'shipped' .. py:attribute:: COMPLETE :value: 'complete' Shipped in full and invoiced. SanMar reports nothing further. .. py:attribute:: CANCELED :value: 'canceled' SanMar reports nothing further. .. py:type:: StatusValue :canonical: Annotated[Status | str, Field(union_mode='left_to_right'), BeforeValidator(_status)] A :class:`Status`, or the text SanMar sent if it is none of them. .. py:class:: IssueDetail Bases: :py:obj:`enum.StrEnum` Which issues to include in an order status. .. py:attribute:: NONE :value: 'noIssues' .. py:attribute:: OPEN :value: 'openIssues' Issues that are open or pending. .. py:attribute:: ALL :value: 'allIssues' .. py:class:: ContactDetails(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A contact's name and address. .. py:attribute:: attention_to :type: str | None :value: None .. py:attribute:: company_name :type: str | None :value: None .. py:attribute:: address1 :type: str | None :value: None .. py:attribute:: address2 :type: str | None :value: None .. py:attribute:: address3 :type: str | None :value: None .. py:attribute:: city :type: str | None :value: None .. py:attribute:: region :type: str | None :value: None .. py:attribute:: postal_code :type: str | None :value: None .. py:attribute:: country :type: str | None :value: None .. py:attribute:: email :type: str | None :value: None .. py:attribute:: phone :type: str | None :value: None .. py:attribute:: comments :type: str | None :value: None .. py:class:: Contact(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` Someone at SanMar to ask about an order, such as its account executive. .. py:attribute:: contact_type :type: str :value: None .. py:attribute:: details :type: ContactDetails :value: None .. py:attribute:: account_name :type: str | None :value: None .. py:attribute:: account_number :type: str | None :value: None .. py:class:: StatusLine(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` Where one line of a sales order stands. .. py:attribute:: product_id :type: str :value: None The style. .. py:attribute:: sales_order_line_number :type: str :value: None .. py:attribute:: status :type: StatusValue .. py:attribute:: part_id :type: str | None :value: None SanMar's unique key for the style, color and size. .. py:attribute:: po_line_number :type: str | None :value: None .. py:attribute:: quantity_ordered :type: decimal.Decimal :value: None .. py:attribute:: quantity_shipped :type: decimal.Decimal :value: None .. py:attribute:: issue_category :type: str | None :value: None .. py:class:: Issue(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A hold on an order, such as ``generalHold`` or ``backOrderHold``. .. py:attribute:: status :type: str :value: None ``Open``, ``Pending`` or ``Closed``. .. py:attribute:: category :type: str :value: None .. py:attribute:: urgent_response_required :type: bool :value: None .. py:attribute:: id :type: str | None :value: None .. py:attribute:: name :type: str | None :value: None .. py:attribute:: description :type: str | None :value: None .. py:attribute:: response_required_by :type: datetime.datetime | None :value: None .. py:attribute:: resolution_url :type: str | None :value: None .. py:attribute:: product_id :type: str | None :value: None .. py:attribute:: part_id :type: str | None :value: None .. py:class:: SalesOrderStatus(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` Where one of SanMar's sales orders stands. .. py:attribute:: sales_order_number :type: str :value: None .. py:attribute:: status :type: StatusValue .. py:attribute:: valid_timestamp :type: datetime.datetime :value: None When SanMar last confirmed this status. .. py:attribute:: issue_category :type: str | None :value: None ``generalHold`` when the order is on hold, ``backOrderHold`` when it is backordered. .. py:attribute:: expected_ship_date :type: datetime.date | None :value: None .. py:attribute:: expected_delivery_date :type: datetime.date | None :value: None .. py:attribute:: additional_explanation :type: str | None :value: None .. py:attribute:: contacts :type: list[Contact] :value: None .. py:attribute:: lines :type: list[StatusLine] :value: None The lines, when they were asked for. .. py:attribute:: issues :type: list[Issue] :value: None .. py:class:: OrderStatus(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` Where one purchase order stands, sales order by sales order. .. py:attribute:: po_number :type: str :value: None .. py:attribute:: sales_orders :type: list[SalesOrderStatus] :value: None .. py:attribute:: audit_url :type: str | None :value: None .. py:property:: finished :type: bool Whether every sales order is complete or canceled, so SanMar will report nothing more. .. py:class:: OrderStatusService(soap: SoapClient, credentials: Credentials) Bases: :py:obj:`sanmar_sdk.promostandards._common.PromoStandardsService` SanMar's PromoStandards Order Status service. .. py:attribute:: endpoint .. py:attribute:: version :value: '2.0.0' The PromoStandards version SanMar implements, sent as ``wsVersion``. .. py:method:: by_purchase_order(po_number: str, *, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) -> list[OrderStatus] Report where a purchase order stands. ``issues`` picks which holds to include, and ``lines`` whether to include each line. .. py:method:: by_sales_order(sales_order_number: str, *, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) -> list[OrderStatus] Report where one of SanMar's sales orders stands. .. py:method:: updated_since(since: datetime.datetime, *, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) -> list[OrderStatus] Report every order whose status changed after a point in time, at most 30 days ago. SanMar suggests narrowing to seven days if the call times out. :raises ValueError: If ``since`` has no time zone, or is more than 30 days ago. .. py:method:: open_orders(*, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) -> list[OrderStatus] Report every order that is not yet complete or canceled. .. py:method:: open_issues(*, issues: IssueDetail = IssueDetail.OPEN, lines: bool = True) -> list[OrderStatus] Report every open order with an open or pending issue. .. py:method:: service_methods() -> list[str] List the Order Status operations SanMar implements.