lib/finix/resources/payment_instrument.rb in finix-0.10 vs lib/finix/resources/payment_instrument.rb in finix-0.11

- old
+ new

@@ -8,14 +8,18 @@ class << self def hypermedia_subtype(response) unless response.nil? type = response['instrument_type'] || response['type'] + name = self.name.sub! 'PaymentInstrument', 'PaymentCard' + self.instance_eval name if type == 'PAYMENT_CARD' - return Finix::PaymentCard + name = self.name.sub! 'PaymentInstrument', 'PaymentCard' elsif type == 'BANK_ACCOUNT' - return Finix::BankAccount + name = self.name.sub! 'PaymentInstrument', 'BankAccount' end + + return self.instance_eval name unless name.nil? end self end end end