Constructor
new Inventory(dataopt)
Create a new instance of a store inventory
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
object |
<optional> |
API response data.
Properties
|
- Source:
Classes
Members
bind_id :number
Type:
- number
- Source:
bulk :number
Type:
- number
- Source:
color_id :number
Type:
- number
- Source:
completeness :string
Type:
- string
- Source:
date_created :Date
Type:
- Date
- Source:
description :string
Type:
- string
- Source:
inventory_id :number
Type:
- number
- Source:
is_retain :boolean
Type:
- boolean
- Source:
is_stock_room :boolean
Type:
- boolean
- Source:
item :object
Type:
- object
- Source:
my_cost :string
Type:
- string
- Source:
new_or_used :string
Type:
- string
- Source:
quantity :number
Type:
- number
- Source:
remarks :string
Type:
- string
- Source:
sale_rate :number
Type:
- number
- Source:
stock_room_id :string
Type:
- string
- Source:
tier_price1 :string
Type:
- string
- Source:
tier_price2 :string
Type:
- string
- Source:
tier_price3 :string
Type:
- string
- Source:
tier_quantity1 :number
Type:
- number
- Source:
tier_quantity2 :number
Type:
- number
- Source:
tier_quantity3 :number
Type:
- number
- Source:
unit_price :string
Type:
- string
- Source:
Methods
(static) all() → {BricklinkRequest}
Get a list of all inventory
Usage:
```
var req = Inventory.all();
client.send(req).then(inventories => console.log(inventories));
```
- Source:
Returns:
A request that resolves to an array of Inventory.
- Type
- BricklinkRequest
(static) create(resource) → {BricklinkRequest}
Create an inventory item
Usage:
```
var req = Inventory.create(inventory);
client.send(req).then(inventory => console.log(inventory));
```
Parameters:
Name | Type | Description |
---|---|---|
resource |
Inventory | Array.<Inventory> | The inventory item to update |
- Source:
Returns:
A request that resolves to a single Inventory or undefined if multiple.
- Type
- BricklinkRequest
(static) delete(inventory_id) → {BricklinkRequest}
Delete an inventory item
Usage:
```
var req = Inventory.delete(inventory_id);
client.send(req).then(inventory => console.log(inventory));
```
Parameters:
Name | Type | Description |
---|---|---|
inventory_id |
string | The inventory item to update |
- Source:
Returns:
A request that resolves if successfully deleted
- Type
- BricklinkRequest
(static) get(inventoryId) → {BricklinkRequest}
Method to get specific inventory resource
Usage:
```
var req = Inventory.get(10);
client.send(req).then(inventory => console.log(inventory));
```
Parameters:
Name | Type | Description |
---|---|---|
inventoryId |
number | An inventory id. |
- Source:
Returns:
A request that resolves to an Inventory instance.
- Type
- BricklinkRequest
(static) update(resource, quantityChange) → {BricklinkRequest}
Update an inventory item
Usage:
```
var req = Inventory.update(inventory);
client.send(req).then(inventory => console.log(inventory));
```
Parameters:
Name | Type | Default | Description |
---|---|---|---|
resource |
Inventory | The inventory item to update | |
quantityChange |
number | 0 | The difference of quantity to apply |
- Source:
Returns:
A request that resolves to an Inventory.
- Type
- BricklinkRequest