lib/finix/resources/identity.rb in finix-0.7 vs lib/finix/resources/identity.rb in finix-0.8

- old
+ new

@@ -4,25 +4,19 @@ include Finix::HypermediaRegistry include Finix::Verifiable define_hypermedia_types [:identities] - def provision_merchant_on(attrs={}) + def provision_merchant(attrs={}) self.merchants.create(attrs) end def create_payment_instrument(attrs={}) if attrs.is_a?(Finix::Resource) attrs.identity = self.id attrs = attrs.attributes else - attrs['identity'] = self.id # TODO might be error here - end - - if attrs['type'] == 'PAYMENT_CARD' - self.payment_instruments.resource_class = Finix::PaymentCard - elsif attrs['type'] == 'BANK_ACCOUNT' - self.payment_instruments.resource_class = Finix::BankAccount + attrs['identity'] = self.id end self.payment_instruments.create(attrs) end