Class: NetSuite::Records::InventoryAssignmentList
Instance Method Summary
collapse
#record_namespace
included
#attributes, #attributes=, #initialize_from_attributes_hash
#record_type, #refresh, #to_attributes!
#record_namespace
Constructor Details
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
|