Sha256: aa0af7edb8d79301fe79a4aba76e1401bd4f255fdc8d26e6486a8b8cce8d3bce

Contents?: true

Size: 557 Bytes

Versions: 3

Compression:

Stored size: 557 Bytes

Contents

module Finix
  class PaymentInstrument
    include Finix::Resource
    include Finix::HypermediaRegistry
    include Finix::Verifiable

    define_hypermedia_types [:payment_instruments]

    class << self
      def hypermedia_subtype(response)
        unless response.nil?
          type = response['instrument_type'] || response['type']
          if type == 'PAYMENT_CARD'
            return Finix::PaymentCard
          elsif type == 'BANK_ACCOUNT'
            return Finix::BankAccount
          end
        end
        self
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
finix-0.10 lib/finix/resources/payment_instrument.rb
finix-0.9 lib/finix/resources/payment_instrument.rb
finix-0.8 lib/finix/resources/payment_instrument.rb