Sha256: b2a007de05b78a00b92a022e5954ba09f1620818ea5a77b17a4602615a31bf9d
Contents?: true
Size: 635 Bytes
Versions: 15
Compression:
Stored size: 635 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
15 entries across 15 versions & 1 rubygems