View Source BasicECommerce.DataSource.Adapter behaviour (Basic e-commerce v0.1.0)
Specification of the data source adapter.
Link to this section Summary
Types
(This type is managed by TypeCheck,
which allows checking values against the type at runtime.)
(This type is managed by TypeCheck,
which allows checking values against the type at runtime.)
(This type is managed by TypeCheck,
which allows checking values against the type at runtime.)
(This type is managed by TypeCheck,
which allows checking values against the type at runtime.)
Callbacks
Returns the applicable special offers for a given SKU.
Gets a single product by its SKU.
Returns the list of products.
Link to this section Types
@type config() :: Keyword.t()
(This type is managed by TypeCheck,
which allows checking values against the type at runtime.)
Full definition:
config :: Keyword.t()
@type product() :: BasicECommerce.Product.t()
(This type is managed by TypeCheck,
which allows checking values against the type at runtime.)
Full definition:
product :: BasicECommerce.Product.t()
@type sku() :: atom()
(This type is managed by TypeCheck,
which allows checking values against the type at runtime.)
Full definition:
sku :: atom()
@type special_offer() :: BasicECommerce.SpecialOffer.t()
(This type is managed by TypeCheck,
which allows checking values against the type at runtime.)
Full definition:
special_offer :: BasicECommerce.SpecialOffer.t()
@type t() :: module()
(This type is managed by TypeCheck,
which allows checking values against the type at runtime.)
Full definition:
t :: module
Link to this section Callbacks
@callback applicable_special_offers(sku :: sku(), config :: config()) :: [special_offer()]
Returns the applicable special offers for a given SKU.
Gets a single product by its SKU.
Returns the list of products.