Sha256: 1121cf6e38d8bd599c038bbb46f554469e578a16ea2be8b5de0f6d3287a43f17

Contents?: true

Size: 670 Bytes

Versions: 32

Compression:

Stored size: 670 Bytes

Contents

module NetSuite
  module Records
    class VendorPaymentApplyList
      include Support::Fields
      include Namespaces::TranPurch

      fields :apply

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

      def apply=(applies)
        case applies
          when Hash
            @applies = [VendorPaymentApply.new(applies)]
          when Array
            @applies = applies.map { |apply| VendorPaymentApply.new(apply) }
        end
      end

      def applies
        @applies ||= []
      end

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

    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
netsuite-0.7.1 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.7.0 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.6.9 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.6.8 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.6.7 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.6.6 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.6.5 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.6.4 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.6.3 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.6.2 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.6.1 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.6.0 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.5.9 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.5.8 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.5.7 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.5.6 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.5.5 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.5.4 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.5.3 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.5.2 lib/netsuite/records/vendor_payment_apply_list.rb