Stock Availability

StateCreationConfigurationBuilderInterface

Stock availability state creation configuration builder interface.

Tags
author

Jakub Jabůrek jaburek.jakub@gmail.com

subpackage

Factory

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

getForQuantity()

Returns the quantity that is being requested.

public getForQuantity() : QuantityInterface|null
APIYes
Return values
QuantityInterface|null

requested quantity or null if not applicable

getInStock()

Returns in stock quantity.

public getInStock() : QuantityInterface|null
APIYes
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
APIYes
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
APIYes
Return values
bool

true if larger quantity than in stock can be ordered, false otherwise

setAllowOverorder()

Sets whether larger quantity than is in stock can be ordered.

public setAllowOverorder(bool $allowOverorder) : $this
APIYes
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
APIYes
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
APIYes
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
APIYes
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
APIYes
Parameters
$supplierShipmentTime : int|null

number of hours or null if unknown or not applicable

Return values
$this

builder instance


        
On this page

Search results