shuup.core.suppliers package

Submodules

shuup.core.suppliers.base module

System Message: WARNING/2 (/home/docs/checkouts/readthedocs.org/user_builds/shuup/checkouts/latest/doc/api/shuup.core.suppliers.rst, line 10)

error while formatting arguments for shuup.core.suppliers.base.SupplierModuleInterface.get_orderability_errors: name ‘ShopProduct’ is not defined

System Message: WARNING/2 (/home/docs/checkouts/readthedocs.org/user_builds/shuup/checkouts/latest/doc/api/shuup.core.suppliers.rst, line 10)

error while formatting arguments for shuup.core.suppliers.base.SupplierModuleInterface.ship_products: name ‘Shipment’ is not defined

System Message: WARNING/2 (/home/docs/checkouts/readthedocs.org/user_builds/shuup/checkouts/latest/doc/api/shuup.core.suppliers.rst, line 10)

error while formatting arguments for shuup.core.suppliers.base.BaseSupplierModule: name ‘Supplier’ is not defined
shuup.core.suppliers.base.get_supported_product_kinds_for_module[source]
shuup.core.suppliers.base.get_supported_product_kinds_values_for_module[source]
class shuup.core.suppliers.base.SupplierModuleInterface[source]

Bases: object

Supplier module interface.

identifier = None
name = None
get_stock_statuses(product_ids, *args, **kwargs) → typing.Dict[int, shuup.core.stocks.ProductStockStatus][source]
Parameters:product_ids – Iterable of product IDs.
Returns:Dict of {product_id: ProductStockStatus}.
get_stock_status(product_id: int, *args, **kwargs) → typing.Union[shuup.core.stocks.ProductStockStatus, NoneType][source]
Parameters:product_id (int) – Product ID.
Return type:shuup.core.stocks.ProductStockStatus|None
get_orderability_errors()[source]
Parameters:
adjust_stock(product_id: int, delta: decimal.Decimal, created_by: django.contrib.auth.models.User = None, type: shuup.core.suppliers.enums.StockAdjustmentType = <StockAdjustmentType.INVENTORY: 1>, *args, **kwargs) → None[source]

Adjusts the stock for the given product_id.

update_stock(product_id: int, *args, **kwargs) → None[source]

Updates a stock for the given product_id

update_stocks(product_ids: typing.Iterable[int], *args, **kwargs) → None[source]
ship_products()[source]
classmethod get_supported_product_kinds() → typing.Iterable[shuup.core.specs.product_kind.ProductKindSpec][source]
classmethod get_supported_product_kinds_values() → typing.Iterable[int][source]
class shuup.core.suppliers.base.BaseSupplierModule[source]

Bases: shuup.core.suppliers.base.SupplierModuleInterface

Base supplier module implementation.

classmethod get_supported_product_kinds() → typing.Iterable[shuup.core.specs.product_kind.ProductKindSpec][source]
classmethod get_supported_product_kinds_values() → typing.Iterable[int][source]
get_stock_status(product_id: int, *args, **kwargs)[source]
update_stocks(product_ids: typing.Iterable[int], *args, **kwargs)[source]

shuup.core.suppliers.enums module

class shuup.core.suppliers.enums.StockAdjustmentType[source]

Bases: enumfields.enums.Enum

An enumeration.

INVENTORY = 1
RESTOCK = 2
RESTOCK_LOGICAL = 3

shuup.core.suppliers.strategies module

class shuup.core.suppliers.strategies.FirstSupplierStrategy[source]

Bases: object

get_supplier(**kwargs)[source]

Module contents

System Message: WARNING/2 (/home/docs/checkouts/readthedocs.org/user_builds/shuup/checkouts/latest/doc/api/shuup.core.suppliers.rst, line 35)

error while formatting arguments for shuup.core.suppliers.BaseSupplierModule: name ‘Supplier’ is not defined
class shuup.core.suppliers.BaseSupplierModule[source]

Bases: shuup.core.suppliers.base.SupplierModuleInterface

Base supplier module implementation.

get_stock_status(product_id: int, *args, **kwargs)[source]
classmethod get_supported_product_kinds() → typing.Iterable[shuup.core.specs.product_kind.ProductKindSpec][source]
classmethod get_supported_product_kinds_values() → typing.Iterable[int][source]
update_stocks(product_ids: typing.Iterable[int], *args, **kwargs)[source]
class shuup.core.suppliers.FirstSupplierStrategy[source]

Bases: object

get_supplier(**kwargs)[source]