Class: JeraPayment::Services::Iugu::SubAccounts::Update

Inherits:
Base
  • Object
show all
Defined in:
lib/jera_payment/services/iugu/sub_accounts/update.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from JeraPayment::Services::Iugu::Base

Instance Method Details

#callObject



6
7
8
9
10
11
12
13
# File 'lib/jera_payment/services/iugu/sub_accounts/update.rb', line 6

def call
  iugu_marketplace = JeraPayment::Api::Iugu::SubAccount.update(JeraPayment::Parsers::Iugu::SubAccountParser.(@resource),
                                                               @resource.user_token)

  add_error(iugu_marketplace[:errors]) if iugu_marketplace[:errors].present?

  @resource.errors.blank?
end