new module:models/Inventory(id)
Constructs a new Inventory
.
Document representing inventory information of the current product for a particular inventory list.
Parameters:
Name | Type | Description |
---|---|---|
id |
String | The inventory id. |
- Source:
Members
(inner) ats :Number
The ats of the product. If it is infinity, the return value is 999999. The value can be overwritten by the OCAPI setting 'product.inventory.ats.max_threshold'.
Type:
- Number
- Source:
(inner) backorderable :Boolean
A flag indicating whether the product is back orderable.
Type:
- Boolean
- Source:
(inner) id :String
The inventory id.
Type:
- String
- Source:
(inner) in_stock_date :Date
A flag indicating the date when the product will be in stock.
Type:
- Date
- Source:
(inner) orderable :Boolean
A flag indicating whether at least one of products is available to sell.
Type:
- Boolean
- Source:
(inner) preorderable :Boolean
A flag indicating whether the product is pre orderable.
Type:
- Boolean
- Source:
(inner) stock_level :Number
The stock level of the product. If it is infinity, the return value is 999999. The value can be overwritten by the OCAPI setting 'product.inventory.stock_level.max_threshold'.
Type:
- Number
- Source:
Methods
(static) constructFromObject(data, obj) → {module:models/Inventory}
Constructs a Inventory
from a plain JavaScript object, optionally creating a new instance.
Copies all relevant properties from data
to obj
if supplied or a new instance if not.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | The plain JavaScript object bearing properties of interest. |
obj |
module:models/Inventory | Optional instance to populate. |
- Source:
Returns:
The populated Inventory
instance.