sanmar_sdk.ftp.pricing ====================== .. py:module:: sanmar_sdk.ftp.pricing .. autoapi-nested-parse:: SanMar's customer pricing files. SanMar writes these on request, nightly after 2 AM Pacific, to the account's outbound folder. ``my_price`` is the price for this account specifically. - ``sanmar_dp.csv`` covers the whole catalog, with the lowest price available to the account in ``my_price``. - ``sanmar_dpIncentive.csv`` covers the whole catalog, with any special pricing in ``my_price``, or 0 where there is none. - ``sanmar_dpc.csv`` lists only what changed since the previous file (the first one has everything), with just ``unique_key`` and ``my_price``. Attributes ---------- .. autoapisummary:: sanmar_sdk.ftp.pricing.CUSTOMER_PRICE_COLUMNS sanmar_sdk.ftp.pricing.PRICE_CHANGE_COLUMNS Classes ------- .. autoapisummary:: sanmar_sdk.ftp.pricing.CustomerPrice sanmar_sdk.ftp.pricing.PriceChange Functions --------- .. autoapisummary:: sanmar_sdk.ftp.pricing.read_customer_prices sanmar_sdk.ftp.pricing.read_price_changes Module Contents --------------- .. py:data:: CUSTOMER_PRICE_COLUMNS :value: ('inventory_key', 'size_index', 'catalog_no', 'catalog_color', 'size', 'piece_weight',... ``sanmar_dp.csv`` and ``sanmar_dpIncentive.csv``, per the FTP Integration Guide v23.6. .. py:data:: PRICE_CHANGE_COLUMNS :value: ('unique_key', 'my_price') ``sanmar_dpc.csv``, per the FTP Integration Guide v23.6. .. py:class:: CustomerPrice(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` The account's price for one style, color and size. .. py:attribute:: unique_key :type: str .. py:attribute:: inventory_key :type: int .. py:attribute:: size_index :type: int .. py:attribute:: style :type: str :value: None .. py:attribute:: catalog_color :type: str The catalog (mainframe) color, which web services and orders expect. .. py:attribute:: size :type: str .. py:attribute:: my_price :type: sanmar_sdk.base.Price The account's price, which is the case or sale price where there is no special pricing. .. py:attribute:: piece_weight :type: decimal.Decimal | None :value: None .. py:attribute:: piece_price :type: sanmar_sdk.base.Price :value: None .. py:attribute:: case_price :type: sanmar_sdk.base.Price :value: None .. py:attribute:: case_size :type: int | None :value: None .. 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:: discontinued_code :type: str | None :value: None Who discontinued the product, ``S`` for SanMar or ``M`` for the mill. .. py:class:: PriceChange(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A changed price from ``sanmar_dpc.csv``. .. py:attribute:: unique_key :type: str .. py:attribute:: my_price :type: sanmar_sdk.base.Price .. py:function:: read_customer_prices(source: sanmar_sdk.ftp.readers.Source, *, encoding: str = 'utf-8-sig') -> collections.abc.Iterator[CustomerPrice] Stream ``sanmar_dp.csv`` or ``sanmar_dpIncentive.csv``, one row at a time. .. py:function:: read_price_changes(source: sanmar_sdk.ftp.readers.Source, *, encoding: str = 'utf-8-sig') -> collections.abc.Iterator[PriceChange] Stream ``sanmar_dpc.csv``, one changed price at a time.