Class: Inventory

Inventory(dataopt)

Represents an inventory object

Constructor

new Inventory(dataopt)

Create a new instance of a store inventory
Parameters:
Name Type Attributes Description
data object <optional>
API response data.
Properties
Name Type Attributes Description
inventory_id number <optional>
The inventory id. i.e. - 50592684
item object <optional>
The inventory item.
Properties
Name Type Attributes Description
no string <optional>
The inventory item id. i.e. - bel004
name string <optional>
The inventory item name. i.e. - Belville Accessories - Complete Sprue - Perfume Bottles (same as 6932)
type string <optional>
The inventory item type. i.e. - MINIFIG, PART, SET, BOOK, GEAR, CATALOG, INSTRUCTION, UNSORTED_LOT, ORIGINAL_BOX
categoryID string <optional>
The inventory item type. i.e. - PART
color_id number <optional>
The inventory item color id. i.e. - 5
quantity number <optional>
The number of items included in this inventory. i.e. - 10
new_or_used string <optional>
Whether the inventory item is new or used. i.e. - U or N
completeness string <optional>
Whether the inventory set is complete or incomplete. i.e. - C, B or S
unit_price string <optional>
The original price of this item per sale unit
bind_id number <optional>
The ID of the parent lot that this lot is bound to
description string <optional>
A short description for this inventory
remarks string <optional>
User remarks on this inventory
bulk number <optional>
Buyers can buy this item only in multiples of the bulk amount
is_retain boolean <optional>
Whether the item retains in inventory after it is sold out
is_stock_room boolean <optional>
Whether the inventory item appears only in the owner's inventory. ie. - true
stock_room_id string <optional>
The inventory stockroom identifier. i.e. - A, B or C
date_created string | Date <optional>
sale_rate number <optional>
my_cost string <optional>
tier_quantity1 number <optional>
tier_price1 string <optional>
tier_quantity2 number <optional>
tier_price2 string <optional>
tier_quantity3 number <optional>
tier_price3 string <optional>
Source:

Classes

Inventory

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