class Adyen::Checkout
Constants
- DEFAULT_VERSION
Public Class Methods
new(client, version = DEFAULT_VERSION)
click to toggle source
Calls superclass method
# File lib/adyen/services/checkout.rb, line 7 def initialize(client, version = DEFAULT_VERSION) service = "Checkout" method_names = [ :payment_session, :origin_keys, ] with_application_info = [ :payment_session, ] super(client, version, service, method_names, with_application_info) end
Public Instance Methods
orders(*args)
click to toggle source
# File lib/adyen/services/checkout.rb, line 59 def orders(*args) case args.size when 0 Adyen::CheckoutOrder.new(@client, @version) else action = "orders" args[1] ||= {} # optional headers arg @client.call_adyen_api(@service, action, args[0], args[1], @version) end end
payment_links(*args)
click to toggle source
# File lib/adyen/services/checkout.rb, line 37 def payment_links(*args) case args.size when 0 Adyen::CheckoutLink.new(@client, @version) else action = "paymentLinks" args[1] ||= {} # optional headers arg @client.call_adyen_api(@service, action, args[0], args[1], @version, true) end end
payment_methods(*args)
click to toggle source
# File lib/adyen/services/checkout.rb, line 48 def payment_methods(*args) case args.size when 0 Adyen::CheckoutMethod.new(@client, @version) else action = "paymentMethods" args[1] ||= {} # optional headers arg @client.call_adyen_api(@service, action, args[0], args[1], @version) end end
payments(*args)
click to toggle source
This method can't be dynamically defined because it needs to be both a method and a class to enable payments() and payments.detail(), which is accomplished via an argument length checker and the CheckoutDetail
class below
# File lib/adyen/services/checkout.rb, line 26 def payments(*args) case args.size when 0 Adyen::CheckoutDetail.new(@client, @version) else action = "payments" args[1] ||= {} # optional headers arg @client.call_adyen_api(@service, action, args[0], args[1], @version, true) end end