Class: Beanie::StockItem

Inherits:
Api
  • Object
show all
Defined in:
lib/beanie/stock_item.rb

Constant Summary collapse

TYPE_PURCHASED =
0
TYPE_RAW_MATERIAL =
1
TYPE_WORK_IN_PROGRESS =
2
TYPE_FINISHED_GOODS =
3
TYPE_NAMES =
[
  ["Purchased for Resale", TYPE_PURCHASED],
  ["Raw Materials", TYPE_RAW_MATERIAL],
  ["Work In Progress", TYPE_WORK_IN_PROGRESS],
  ["Finished Goods", TYPE_FINISHED_GOODS]
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Api

all, build_url, #construct_path, delete, #extract, #field_name, find, get, #object_name, #populate, post, put, #save!, set_headers

Constructor Details

#initializeStockItem

Initialize instance variables



48
49
50
51
52
53
54
55
56
# File 'lib/beanie/stock_item.rb', line 48

def initialize
  @id = nil
  @description = nil
  @item_type = nil
  @name = nil
  @sku = nil
  @stock_category_id = nil
  @unit_of_measure = nil
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



32
33
34
# File 'lib/beanie/stock_item.rb', line 32

def description
  @description
end

#idObject

Returns the value of attribute id.



32
33
34
# File 'lib/beanie/stock_item.rb', line 32

def id
  @id
end

#item_typeObject

Returns the value of attribute item_type.



32
33
34
# File 'lib/beanie/stock_item.rb', line 32

def item_type
  @item_type
end

#nameObject

Returns the value of attribute name.



32
33
34
# File 'lib/beanie/stock_item.rb', line 32

def name
  @name
end

#skuObject

Returns the value of attribute sku.



32
33
34
# File 'lib/beanie/stock_item.rb', line 32

def sku
  @sku
end

#stock_category_idObject

Returns the value of attribute stock_category_id.



32
33
34
# File 'lib/beanie/stock_item.rb', line 32

def stock_category_id
  @stock_category_id
end

#unit_of_measureObject

Returns the value of attribute unit_of_measure.



32
33
34
# File 'lib/beanie/stock_item.rb', line 32

def unit_of_measure
  @unit_of_measure
end