Class: JeraPayment::Services::Iugu::SubAccounts::Verify
- Defined in:
- lib/jera_payment/services/iugu/sub_accounts/verify.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(resource, attributes) ⇒ Verify
constructor
A new instance of Verify.
Constructor Details
#initialize(resource, attributes) ⇒ Verify
Returns a new instance of Verify.
6 7 8 9 |
# File 'lib/jera_payment/services/iugu/sub_accounts/verify.rb', line 6 def initialize(resource, attributes) @resource = resource @attributes = attributes end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/jera_payment/services/iugu/sub_accounts/verify.rb', line 11 def call iugu_marketplace = JeraPayment::Api::Iugu::SubAccount.verify(@resource.account_id, @attributes, @resource.user_token) add_error(iugu_marketplace[:errors]) and return @resource if iugu_marketplace[:errors].present? set_api_attributes(iugu_marketplace) @resource end |