Class: Beanie::StockAdjustment
- Defined in:
- lib/beanie/stock_adjustment.rb
Constant Summary collapse
- TYPE_STOCK_TAKING =
0- TYPE_SCHED_REQUEST =
1- TYPE_ORDER_WAIT =
2- TYPE_TO_INVENTORY =
3- TYPE_FROM_INVENTORY =
3- TYPE_SPOILAGE =
4- TYPE_NAMES =
[ ["Stock-Taking", TYPE_STOCK_TAKING], ["Scheduled Request", TYPE_SCHED_REQUEST], ["Awaiting Delivery", TYPE_ORDER_WAIT], ["Move to Inventory", TYPE_TO_INVENTORY], ["Move from Inventory", TYPE_FROM_INVENTORY], ["Spoilage", TYPE_SPOILAGE] ].freeze
Instance Attribute Summary collapse
-
#adjustment_type ⇒ Object
Returns the value of attribute adjustment_type.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#effective ⇒ Object
Returns the value of attribute effective.
-
#id ⇒ Object
Returns the value of attribute id.
-
#note ⇒ Object
Returns the value of attribute note.
-
#purchase_order_item_id ⇒ Object
Returns the value of attribute purchase_order_item_id.
-
#stock_item_id ⇒ Object
Returns the value of attribute stock_item_id.
-
#stock_supplier_id ⇒ Object
Returns the value of attribute stock_supplier_id.
Instance Method Summary collapse
-
#initialize ⇒ StockAdjustment
constructor
Initialize instance variables.
-
#type_name ⇒ Object
Convert the type into a useful name.
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
#initialize ⇒ StockAdjustment
Initialize instance variables
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/beanie/stock_adjustment.rb', line 53 def initialize @id = nil @effective = nil @adjustment_type = nil @amount = nil @note = nil @stock_item_id = nil @stock_supplier_id = nil @purchase_order_item_id = nil end |
Instance Attribute Details
#adjustment_type ⇒ Object
Returns the value of attribute adjustment_type.
32 33 34 |
# File 'lib/beanie/stock_adjustment.rb', line 32 def adjustment_type @adjustment_type end |
#amount ⇒ Object
Returns the value of attribute amount.
32 33 34 |
# File 'lib/beanie/stock_adjustment.rb', line 32 def amount @amount end |
#effective ⇒ Object
Returns the value of attribute effective.
32 33 34 |
# File 'lib/beanie/stock_adjustment.rb', line 32 def effective @effective end |
#id ⇒ Object
Returns the value of attribute id.
32 33 34 |
# File 'lib/beanie/stock_adjustment.rb', line 32 def id @id end |
#note ⇒ Object
Returns the value of attribute note.
32 33 34 |
# File 'lib/beanie/stock_adjustment.rb', line 32 def note @note end |
#purchase_order_item_id ⇒ Object
Returns the value of attribute purchase_order_item_id.
33 34 35 |
# File 'lib/beanie/stock_adjustment.rb', line 33 def purchase_order_item_id @purchase_order_item_id end |
#stock_item_id ⇒ Object
Returns the value of attribute stock_item_id.
33 34 35 |
# File 'lib/beanie/stock_adjustment.rb', line 33 def stock_item_id @stock_item_id end |
#stock_supplier_id ⇒ Object
Returns the value of attribute stock_supplier_id.
33 34 35 |
# File 'lib/beanie/stock_adjustment.rb', line 33 def stock_supplier_id @stock_supplier_id end |
Instance Method Details
#type_name ⇒ Object
Convert the type into a useful name
66 67 68 |
# File 'lib/beanie/stock_adjustment.rb', line 66 def type_name TYPE_NAMES[adjustment_type][0] end |