shuup.core.suppliers package
Submodules
shuup.core.suppliers.base module
- shuup.core.suppliers.base.get_supported_product_kinds_for_module(module_identifier: str) Iterable[ProductKindSpec] [source]
- shuup.core.suppliers.base.get_supported_product_kinds_values_for_module(module_identifier: str) Iterable[int] [source]
- class shuup.core.suppliers.base.SupplierModuleInterface[source]
Bases:
object
Supplier module interface.
- get_stock_statuses(product_ids, *args, **kwargs) Dict[int, ProductStockStatus] [source]
- Parameters:
product_ids – Iterable of product IDs.
- Returns:
Dict of {product_id: ProductStockStatus}.
- get_stock_status(product_id: int, *args, **kwargs) ProductStockStatus | None [source]
- Parameters:
product_id (int) – Product ID.
- Return type:
- get_orderability_errors(shop_product: ShopProduct, quantity: Decimal, customer: Contact) Iterable[ValidationError] [source]
- Parameters:
shop_product (shuup.core.models.ShopProduct) – Shop Product.
quantity (decimal.Decimal) – Quantity to order.
customer – Contact.
- adjust_stock(product_id: int, delta: Decimal, created_by: User = None, type: StockAdjustmentType = StockAdjustmentType.INVENTORY, *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
- ship_products(shipment: Shipment, product_quantities: Dict[Product, Decimal], *args, **kwargs)[source]
- classmethod get_supported_product_kinds() Iterable[ProductKindSpec] [source]
- class shuup.core.suppliers.base.BaseSupplierModule(supplier: Supplier, options: Dict)[source]
Bases:
SupplierModuleInterface
Base supplier module implementation.
- classmethod get_supported_product_kinds() Iterable[ProductKindSpec] [source]
shuup.core.suppliers.enums module
shuup.core.suppliers.strategies module
Module contents
- class shuup.core.suppliers.BaseSupplierModule(supplier: Supplier, options: Dict)[source]
Bases:
SupplierModuleInterface
Base supplier module implementation.
- get_stock_status(product_id: int, *args, **kwargs)[source]
- Parameters:
product_id (int) – Product ID.
- Return type:
- classmethod get_supported_product_kinds() Iterable[ProductKindSpec] [source]