lib/finix/resources/payment_instrument.rb in finix-0.14 vs lib/finix/resources/payment_instrument.rb in finix-0.15
- old
+ new
@@ -8,16 +8,14 @@
class << self
def hypermedia_subtype(response)
unless response.nil?
type = response['instrument_type'] || response['type']
- name = self.name.sub! 'PaymentInstrument', 'PaymentCard'
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
end