lib/adyen/services/payout/instant_payouts_api.rb in adyen-ruby-api-library-7.0.1 vs lib/adyen/services/payout/instant_payouts_api.rb in adyen-ruby-api-library-7.0.2
- old
+ new
@@ -1,26 +1,19 @@
require_relative '../service'
module Adyen
-
-
class InstantPayoutsApi < Service
attr_accessor :service, :version
def initialize(client, version = DEFAULT_VERSION)
- @service = "Payout"
- @client = client
- @version = version
+ super(client, version, 'Payout')
end
- def payout(request, headers: {} )
- """
- Make an instant card payout
- """
- endpoint = "/payout".gsub(/{.+?}/, '%s')
- endpoint = endpoint.gsub(/^\//, "")
- endpoint = endpoint % []
+ def payout(request, headers: {})
+ endpoint = '/payout'.gsub(/{.+?}/, '%s')
+ endpoint = endpoint.gsub(%r{^/}, '')
+ endpoint = format(endpoint)
- action = { method: "post", url: endpoint}
+ action = { method: 'post', url: endpoint }
@client.call_adyen_api(@service, action, request, headers, @version)
end
end
end