Sha256: b9e333298552127bba82225d0cba869f2c819440a2d200d8779525ff84a0de0f

Contents?: true

Size: 595 Bytes

Versions: 12

Compression:

Stored size: 595 Bytes

Contents

module NetSuite
  module Records
    class CustomerPaymentApplyList
      include Namespaces::TranCust

      def initialize(attributes = {})
        case attributes[:apply]
        when Hash
          applies << CustomerPaymentApply.new(attributes[:apply])
        when Array
          attributes[:apply].each { |apply| applies << CustomerPaymentApply.new(apply) }
        end
      end

      def applies
        @applies ||= []
      end

      def to_record
        applies.map do |apply|
          { "#{record_namespace}:apply" => apply.to_record }
        end
      end

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
netsuite-0.3.3 lib/netsuite/records/customer_payment_apply_list.rb
netsuite-0.3.2 lib/netsuite/records/customer_payment_apply_list.rb
netsuite-0.3.1 lib/netsuite/records/customer_payment_apply_list.rb
netsuite-0.3.0 lib/netsuite/records/customer_payment_apply_list.rb
netsuite-0.2.6 lib/netsuite/records/customer_payment_apply_list.rb
netsuite-0.2.5 lib/netsuite/records/customer_payment_apply_list.rb
netsuite-0.2.4 lib/netsuite/records/customer_payment_apply_list.rb
netsuite-0.2.3 lib/netsuite/records/customer_payment_apply_list.rb
netsuite-0.2.2 lib/netsuite/records/customer_payment_apply_list.rb
netsuite-0.2.1 lib/netsuite/records/customer_payment_apply_list.rb
netsuite-0.2.0 lib/netsuite/records/customer_payment_apply_list.rb
netsuite-0.1.0 lib/netsuite/records/customer_payment_apply_list.rb