Class: NetSuite::Records::InventoryTransferInventoryList
- Inherits:
-
Object
- Object
- NetSuite::Records::InventoryTransferInventoryList
- Defined in:
- lib/netsuite/records/inventory_transfer_inventory_list.rb
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ InventoryTransferInventoryList
constructor
A new instance of InventoryTransferInventoryList.
- #inventory ⇒ Object
- #inventory=(items) ⇒ Object
- #to_record ⇒ Object
Methods included from Namespaces::TranInvt
Methods included from Support::Fields
Methods included from Support::Attributes
#attributes, #attributes=, #initialize_from_attributes_hash
Methods included from Support::Records
#record_type, #refresh, #to_attributes!
Methods included from Namespaces::PlatformCore
Methods included from Support::RecordRefs
Constructor Details
#initialize(attributes = {}) ⇒ InventoryTransferInventoryList
Returns a new instance of InventoryTransferInventoryList.
11 12 13 |
# File 'lib/netsuite/records/inventory_transfer_inventory_list.rb', line 11 def initialize(attributes = {}) initialize_from_attributes_hash(attributes) end |
Instance Method Details
#inventory ⇒ Object
24 25 26 |
# File 'lib/netsuite/records/inventory_transfer_inventory_list.rb', line 24 def inventory @inventory ||= [] end |
#inventory=(items) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/netsuite/records/inventory_transfer_inventory_list.rb', line 15 def inventory=(items) case items when Hash self.inventory << InventoryTransferInventory.new(items) when Array items.each { |item| self.inventory << InventoryTransferInventory.new(item) } end end |
#to_record ⇒ Object
28 29 30 |
# File 'lib/netsuite/records/inventory_transfer_inventory_list.rb', line 28 def to_record { "#{record_namespace}:inventory" => inventory.map(&:to_record) } end |