Class: Adyen::StoredPaymentMethods

Inherits:
Service
  • Object
show all
Defined in:
lib/adyen/services/checkout.rb

Instance Attribute Summary

Attributes inherited from Service

#service, #version

Instance Method Summary collapse

Methods inherited from Service

action_for_method_name, #create_query_string

Constructor Details

#initialize(client, version = DEFAULT_VERSION) ⇒ StoredPaymentMethods

Returns a new instance of StoredPaymentMethods.



208
209
210
211
212
# File 'lib/adyen/services/checkout.rb', line 208

def initialize(client, version = DEFAULT_VERSION)
  @service = "Checkout"
  @client = client
  @version = version
end

Instance Method Details

#delete(recurringId, query_array = {}, headers = {}) ⇒ Object



219
220
221
222
# File 'lib/adyen/services/checkout.rb', line 219

def delete(recurringId, query_array={}, headers = {})
  action = { method: 'delete', url: "storedPaymentMethods/%s" % recurringId + create_query_string(query_array)}
  @client.call_adyen_api(@service, action, {}, headers, @version)
end

#get(query_array = {}, headers = {}) ⇒ Object



214
215
216
217
# File 'lib/adyen/services/checkout.rb', line 214

def get(query_array={}, headers = {})
  action = { method: 'get', url: "storedPaymentMethods" + create_query_string(query_array)}
  @client.call_adyen_api(@service, action, {}, headers, @version)
end