Class: Adyen::InstantPayoutsApi
- Defined in:
- lib/adyen/services/payout/instant_payouts_api.rb
Instance Attribute Summary collapse
-
#service ⇒ Object
Returns the value of attribute service.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes inherited from Service
Instance Method Summary collapse
-
#initialize(client, version = DEFAULT_VERSION) ⇒ InstantPayoutsApi
constructor
A new instance of InstantPayoutsApi.
- #payout(request, headers: {}) ⇒ Object
Methods inherited from Service
Constructor Details
#initialize(client, version = DEFAULT_VERSION) ⇒ InstantPayoutsApi
Returns a new instance of InstantPayoutsApi.
8 9 10 11 12 |
# File 'lib/adyen/services/payout/instant_payouts_api.rb', line 8 def initialize(client, version = DEFAULT_VERSION) @service = "Payout" @client = client @version = version end |
Instance Attribute Details
#service ⇒ Object
Returns the value of attribute service.
6 7 8 |
# File 'lib/adyen/services/payout/instant_payouts_api.rb', line 6 def service @service end |
#version ⇒ Object
Returns the value of attribute version.
6 7 8 |
# File 'lib/adyen/services/payout/instant_payouts_api.rb', line 6 def version @version end |
Instance Method Details
#payout(request, headers: {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/adyen/services/payout/instant_payouts_api.rb', line 14 def payout(request, headers: {} ) """ Make an instant card payout """ endpoint = "/payout".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [] action = { method: "post", url: endpoint} @client.call_adyen_api(@service, action, request, headers, @version) end |