Class: NetSuite::Records::InventoryAssignmentList
- Inherits:
-
Object
- Object
- NetSuite::Records::InventoryAssignmentList
- Defined in:
- lib/netsuite/records/inventory_assignment_list.rb
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ InventoryAssignmentList
constructor
A new instance of InventoryAssignmentList.
- #inventory_assignment ⇒ Object
- #inventory_assignment=(items) ⇒ Object
- #to_record ⇒ Object
Methods included from Namespaces::PlatformCommon
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
Constructor Details
#initialize(attrs = {}) ⇒ InventoryAssignmentList
Returns a new instance of InventoryAssignmentList.
10 11 12 |
# File 'lib/netsuite/records/inventory_assignment_list.rb', line 10 def initialize(attrs = {}) initialize_from_attributes_hash(attrs) end |
Instance Method Details
#inventory_assignment ⇒ Object
23 24 25 |
# File 'lib/netsuite/records/inventory_assignment_list.rb', line 23 def inventory_assignment @inventory_assignment ||= [] end |
#inventory_assignment=(items) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/netsuite/records/inventory_assignment_list.rb', line 14 def inventory_assignment=(items) case items when Hash self.inventory_assignment << InventoryAssignment.new(items) when Array items.each { |ref| self.inventory_assignment << InventoryAssignment.new(ref) } end end |
#to_record ⇒ Object
27 28 29 30 31 |
# File 'lib/netsuite/records/inventory_assignment_list.rb', line 27 def to_record rec = { "#{record_namespace}:inventoryAssignment" => inventory_assignment.map(&:to_record) } rec[:@replaceAll] = self.replace_all if !self.replace_all.nil? rec end |