class Finix::PaymentInstrument
Public Class Methods
hypermedia_subtype(response)
click to toggle source
# File lib/finix/resources/payment_instrument.rb, line 10 def hypermedia_subtype(response) unless response.nil? type = response['instrument_type'] || response['type'] if type == 'PAYMENT_CARD' name = self.name.sub 'PaymentInstrument', 'PaymentCard' elsif type == 'BANK_ACCOUNT' name = self.name.sub 'PaymentInstrument', 'BankAccount' end return self.instance_eval name unless name.nil? end self end