Sha256: a0a8ab58571f3f258a04c747531e55fabf3128ac29358cfaa2a9f09802680d7e
Contents?: true
Size: 636 Bytes
Versions: 14
Compression:
Stored size: 636 Bytes
Contents
module NetSuite module Records class SalesOrderItemList include Support::Fields include Namespaces::TranSales fields :item def initialize(attributes = {}) initialize_from_attributes_hash(attributes) end def item=(items) case items when Hash self.items << SalesOrderItem.new(items) when Array items.each { |item| self.items << SalesOrderItem.new(item) } end end def items @items ||= [] end def to_record { "#{record_namespace}:item" => items.map(&:to_record) } end end end end
Version data entries
14 entries across 14 versions & 1 rubygems