Sha256: 25a70247f86685ce893d62d48097372f38a88e0e35e79c30236ee15ca7f268c6

Contents?: true

Size: 652 Bytes

Versions: 12

Compression:

Stored size: 652 Bytes

Contents

module NetSuite
  module Records
    class DepositOtherList
      include Support::Fields
      include Namespaces::TranBank

      fields :deposit_other

      def initialize(attributes = {})
        initialize_from_attributes_hash(attributes)
      end

      def other=(others)
        case others
        when Hash
          self.others << DepositOther.new(others)
        when Array
          others.each { |cb| self.others << DepositOther.new(cb) }
        end
      end

      def others
        @others ||= []
      end

      def to_record
        { "#{record_namespace}:depositOther" => others.map(&:to_record) }
      end

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
netsuite-0.4.5 lib/netsuite/records/deposit_other_list.rb
netsuite-0.4.4 lib/netsuite/records/deposit_other_list.rb
netsuite-0.4.3 lib/netsuite/records/deposit_other_list.rb
netsuite-0.4.2 lib/netsuite/records/deposit_other_list.rb
netsuite-0.4.1 lib/netsuite/records/deposit_other_list.rb
netsuite-0.4.0 lib/netsuite/records/deposit_other_list.rb
netsuite-0.3.3 lib/netsuite/records/deposit_other_list.rb
netsuite-0.3.2 lib/netsuite/records/deposit_other_list.rb
netsuite-0.3.1 lib/netsuite/records/deposit_other_list.rb
netsuite-0.3.0 lib/netsuite/records/deposit_other_list.rb
netsuite-0.2.6 lib/netsuite/records/deposit_other_list.rb
netsuite-0.2.5 lib/netsuite/records/deposit_other_list.rb