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