Class: Vpago::PayoutProfiles::Payway::PayoutProfileRequestUpdater

Inherits:
BasePayoutProfileRequest show all
Defined in:
app/services/vpago/payout_profiles/payway/payout_profile_request_updater.rb

Instance Attribute Summary

Attributes inherited from BasePayoutProfileRequest

#base_url, #error_messages, #profile

Instance Method Summary collapse

Methods inherited from BasePayoutProfileRequest

#connection, #initialize, #request_to_payway

Constructor Details

This class inherits a constructor from Vpago::PayoutProfiles::Payway::BasePayoutProfileRequest

Instance Method Details

#callObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/services/vpago/payout_profiles/payway/payout_profile_request_updater.rb', line 10

def call
  json_response = request_to_payway
  return false if error_messages.any?

  code = json_response['status']['code']

  if code == '00'
    profile.verify!(json_response['data'])
  else
    profile.reset_verification!
    @error_messages << json_response['status']
  end

  error_messages.empty?
end

#request_pathObject

override



6
7
8
# File 'app/services/vpago/payout_profiles/payway/payout_profile_request_updater.rb', line 6

def request_path
  'api/merchant-portal/merchant-access/whitelist-account/update-whitelist-status'
end