sanmar_sdk.standard.products ============================ .. py:module:: sanmar_sdk.standard.products .. autoapi-nested-parse:: SanMar's own product information service. Looks up products by style, optionally narrowed to a catalog color, a size, or both, and asks SanMar to write product files to the SFTP server. For frequent or whole-catalog pulls, SanMar recommends its product files (:mod:`sanmar_sdk.ftp`) over this service. Attributes ---------- .. autoapisummary:: sanmar_sdk.standard.products.PRODUCT_INFORMATION_FOLDER Classes ------- .. autoapisummary:: sanmar_sdk.standard.products.ProductImages sanmar_sdk.standard.products.ProductPrices sanmar_sdk.standard.products.ProductInfo sanmar_sdk.standard.products.FileRequest sanmar_sdk.standard.products.ProductInfoService Module Contents --------------- .. py:data:: PRODUCT_INFORMATION_FOLDER :value: 'SanMarPDD/SanMarPI' .. py:class:: ProductImages(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` Links to a product's images and documents. .. py:attribute:: product :type: str | None :value: None .. py:attribute:: thumbnail :type: str | None :value: None .. py:attribute:: color_product :type: str | None :value: None .. py:attribute:: color_product_thumbnail :type: str | None :value: None .. py:attribute:: color_square :type: str | None :value: None .. py:attribute:: color_swatch :type: str | None :value: None .. py:attribute:: brand_logo :type: str | None :value: None .. py:attribute:: front_model :type: str | None :value: None .. py:attribute:: back_model :type: str | None :value: None .. py:attribute:: side_model :type: str | None :value: None .. py:attribute:: three_quarter_model :type: str | None :value: None .. py:attribute:: front_flat :type: str | None :value: None .. py:attribute:: back_flat :type: str | None :value: None .. py:attribute:: spec_sheet :type: str | None :value: None .. py:class:: ProductPrices(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A product's list and sale prices. .. py:attribute:: piece_price :type: sanmar_sdk.base.Price :value: None The price per piece for five pieces or fewer of one style and color. .. py:attribute:: case_price :type: sanmar_sdk.base.Price :value: None The price per piece when buying by the case. .. py:attribute:: piece_sale_price :type: sanmar_sdk.base.Price :value: None .. py:attribute:: case_sale_price :type: sanmar_sdk.base.Price :value: None .. py:attribute:: sale_start_date :type: sanmar_sdk.base.SanMarDate | None :value: None .. py:attribute:: sale_end_date :type: sanmar_sdk.base.SanMarDate | None :value: None .. py:attribute:: map_price :type: sanmar_sdk.base.Price :value: None The minimum advertised price. .. py:attribute:: price_code :type: str | None :value: None The suggested retail pricing code. A/P is 50%, B/Q 45%, C/R 40%, D/S 35%, E/T 30%. .. py:attribute:: price_text :type: str | None :value: None Which sizes the price applies to. .. py:class:: ProductInfo(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` One style, color and size, as SanMar's product information service describes it. .. py:attribute:: style :type: str :value: None .. py:attribute:: catalog_color :type: str :value: None The catalog (mainframe) color, which web services and orders expect. .. py:attribute:: size :type: str :value: None .. py:attribute:: unique_key :type: str :value: None SanMar's identifier for this style, color and size, and the PromoStandards part id. .. py:attribute:: inventory_key :type: int :value: None .. py:attribute:: size_index :type: int :value: None .. py:attribute:: color_name :type: str | None :value: None The full color name, for display only. .. py:attribute:: title :type: str | None :value: None .. py:attribute:: description :type: str | None :value: None .. py:attribute:: brand :type: str | None :value: None .. py:attribute:: category :type: str | None :value: None .. py:attribute:: status :type: str | None :value: None Coming Soon, New, Active, Regular, or Discontinued. .. py:attribute:: available_sizes :type: str | None :value: None .. py:attribute:: keywords :type: sanmar_sdk.base.CommaSeparated :value: None .. py:attribute:: case_size :type: int | None :value: None .. py:attribute:: piece_weight :type: decimal.Decimal | None :value: None Approximate weight per piece in pounds. .. py:attribute:: images :type: ProductImages :value: None .. py:attribute:: prices :type: ProductPrices :value: None .. py:class:: FileRequest(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` SanMar's acknowledgement of a request for a product file. SanMar writes the file to its SFTP server about 20 minutes later. Brand and category file names end with the date SanMar wrote them, so they are matched by pattern; read one with :meth:`sanmar_sdk.ftp.SanMarFTP.find` and :meth:`~sanmar_sdk.ftp.SanMarFTP.product_information`. .. py:attribute:: folder :type: str .. py:attribute:: file_pattern :type: str The file's name, or a shell-style pattern where SanMar dates it. .. py:attribute:: message :type: str | None :value: None .. py:class:: ProductInfoService(soap: SoapClient, credentials: Credentials) Bases: :py:obj:`sanmar_sdk._soap.Service` SanMar's own product information service. .. py:method:: get(style: str, *, catalog_color: str | None = None, size: str | None = None) -> list[ProductInfo] Look up a style, optionally narrowed to one catalog color, one size, or both. Returns one entry per matching style, color and size. The color must be the catalog (mainframe) color. .. py:method:: get_many(queries: collections.abc.Sequence[sanmar_sdk.common.StyleQuery]) -> list[ProductInfo] Look up several styles in one call. .. py:method:: request_bulk_file() -> FileRequest Ask SanMar to write a file of its whole catalog. SanMar allows this once a month. .. py:method:: request_delta_file() -> FileRequest Ask SanMar to write a file of what changed since the last bulk or delta file. SanMar allows this once a day. The next delta starts from this one, so calling it consumes the changes it reports. .. py:method:: request_brand_file(brand: str) -> FileRequest Ask SanMar to write a file of one brand's products, such as ``OGIO``. .. py:method:: request_category_file(category: str) -> FileRequest Ask SanMar to write a file of one category's products, such as ``Caps``.