StateCreationConfigurationBuilderInterface
in
Stock availability state creation configuration builder interface.
Tags
Table of Contents
Methods
- getConfiguration() : StateCreationConfigurationInterface
- Returns the resulting state creation configuration.
- getForQuantity() : QuantityInterface|null
- Returns the quantity that is being requested.
- getInStock() : QuantityInterface|null
- Returns in stock quantity.
- getSupplierShipmentTime() : int|null
- Returns how many hours does it take to ship out the item if not in stock.
- isAllowOverorder() : bool
- Indicates whether larger quantity than is in stock can be ordered.
- isPriceKnown() : bool
- Indicates whether the item has a price defined.
- reset() : $this
- Resets configured values.
- setAllowOverorder() : $this
- Sets whether larger quantity than is in stock can be ordered.
- setForQuantity() : $this
- Sets the quantity that is being requested.
- setInStock() : $this
- Sets in stock quantity.
- setPriceKnown() : $this
- Sets whether the item has a price defined.
- setSupplierShipmentTime() : $this
- Sets how many hours it takes to ship out the item if not in stock.
Methods
getConfiguration()
Returns the resulting state creation configuration.
public
getConfiguration() : StateCreationConfigurationInterface
Return values
StateCreationConfigurationInterface —configuration
getForQuantity()
Returns the quantity that is being requested.
public
getForQuantity() : QuantityInterface|null
Return values
QuantityInterface|null —requested quantity or null
if not applicable
getInStock()
Returns in stock quantity.
public
getInStock() : QuantityInterface|null
Return values
QuantityInterface|null —in stock quantity or null
if unknown or not applicable
getSupplierShipmentTime()
Returns how many hours does it take to ship out the item if not in stock.
public
getSupplierShipmentTime() : int|null
Return values
int|null —number of hours or null
if unknown or not applicable
isAllowOverorder()
Indicates whether larger quantity than is in stock can be ordered.
public
isAllowOverorder() : bool
Return values
bool —true
if larger quantity than in stock can be ordered, false
otherwise
isPriceKnown()
Indicates whether the item has a price defined.
public
isPriceKnown() : bool
Return values
bool —true
if it has a price, false
otherwise
reset()
Resets configured values.
public
reset() : $this
Return values
$this —builder instance
setAllowOverorder()
Sets whether larger quantity than is in stock can be ordered.
public
setAllowOverorder(bool $allowOverorder) : $this
Parameters
- $allowOverorder : bool
-
true
if larger quantity than in stock can be ordered,false
otherwise
Return values
$this —builder instance
setForQuantity()
Sets the quantity that is being requested.
public
setForQuantity(QuantityInterface|null $forQuantity) : $this
Parameters
- $forQuantity : QuantityInterface|null
-
requested quantity or
null
if not applicable
Return values
$this —builder instance
setInStock()
Sets in stock quantity.
public
setInStock(QuantityInterface|null $inStock) : $this
Parameters
- $inStock : QuantityInterface|null
-
in stock quantity or
null
if unknown or not applicable
Return values
$this —builder instance
setPriceKnown()
Sets whether the item has a price defined.
public
setPriceKnown(bool $priceKnown) : $this
Parameters
- $priceKnown : bool
-
true
if a price is defined,false
otherwise
Return values
$this —builder instance
setSupplierShipmentTime()
Sets how many hours it takes to ship out the item if not in stock.
public
setSupplierShipmentTime(int|null $supplierShipmentTime) : $this
Parameters
- $supplierShipmentTime : int|null
-
number of hours or
null
if unknown or not applicable
Return values
$this —builder instance