sanmar_sdk.promostandards.inventory =================================== .. py:module:: sanmar_sdk.promostandards.inventory .. autoapi-nested-parse:: SanMar's PromoStandards Inventory service, version 2.0.0. Reports stock for a style, narrowed to some of its sizes and catalog colors, or for up to 200 parts from any styles at once, which suits checking a whole cart in one call. SanMar does not implement ``getFilterValues``, and caps each warehouse's reported quantity at 3,000. Attributes ---------- .. autoapisummary:: sanmar_sdk.promostandards.inventory.MAX_PART_IDS Classes ------- .. autoapisummary:: sanmar_sdk.promostandards.inventory.FutureStock sanmar_sdk.promostandards.inventory.LocationStock sanmar_sdk.promostandards.inventory.PartStock sanmar_sdk.promostandards.inventory.InventoryService Module Contents --------------- .. py:data:: MAX_PART_IDS :value: 200 .. py:class:: FutureStock(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` Stock a warehouse expects to receive. .. py:attribute:: quantity :type: int :value: None .. py:attribute:: available_on :type: datetime.datetime :value: None .. py:class:: LocationStock(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` One part's stock at one warehouse. .. py:attribute:: warehouse :type: sanmar_sdk.common.WarehouseNumber :value: None .. py:attribute:: quantity :type: int :value: None Pieces available, up to SanMar's cap of 3,000. .. py:attribute:: name :type: str | None :value: None .. py:attribute:: postal_code :type: str | None :value: None .. py:attribute:: country :type: str | None :value: None .. py:attribute:: future :type: list[FutureStock] :value: None .. py:class:: PartStock(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` One part's stock across SanMar's warehouses. .. py:attribute:: part_id :type: str :value: None SanMar's unique key for this style, color and size. .. py:attribute:: catalog_color :type: str | None :value: None The catalog (mainframe) color, which web services and orders expect. .. py:attribute:: size :type: str | None :value: None .. py:attribute:: description :type: str | None :value: None .. py:attribute:: quantity :type: int :value: None Pieces available across every warehouse. .. py:attribute:: main_part :type: bool :value: None .. py:attribute:: manufactured_item :type: bool :value: None .. py:attribute:: buy_to_order :type: bool :value: None .. py:attribute:: replenishment_lead_time :type: int | None :value: None .. py:attribute:: locations :type: list[LocationStock] :value: None .. py:attribute:: last_modified :type: datetime.datetime | None :value: None .. py:class:: InventoryService(soap: SoapClient, credentials: Credentials) Bases: :py:obj:`sanmar_sdk.promostandards._common.PromoStandardsService` SanMar's PromoStandards Inventory service. .. py:attribute:: endpoint .. py:attribute:: version :value: '2.0.0' The PromoStandards version SanMar implements, sent as ``wsVersion``. .. py:method:: get(product_id: str, *, part_ids: collections.abc.Sequence[str] = (), sizes: collections.abc.Sequence[str] = (), catalog_colors: collections.abc.Sequence[str] = ()) -> list[PartStock] Report stock for a style, or for a set of parts. With no filter, every part of the style is reported. ``sizes`` and ``catalog_colors`` narrow the style down. ``part_ids`` asks for up to 200 parts from any styles instead; SanMar still needs a valid style in ``product_id``, but does not require the parts to belong to it. :raises TypeError: If a filter is a single string rather than a list of them. :raises ValueError: If ``part_ids`` is combined with ``sizes`` or ``catalog_colors``, or lists more than 200 parts.