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.5.1 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.5.0 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.4.9 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.4.8 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.4.7 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.4.6 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.4.5 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.4.4 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.4.3 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.4.2 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.4.1 lib/netsuite/records/vendor_payment_apply_list.rb
netsuite-0.4.0 lib/netsuite/records/vendor_payment_apply_list.rb