Class: Adyen::CheckoutLink

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

Constructor Details

#initialize(client, version = DEFAULT_VERSION) ⇒ CheckoutLink

Returns a new instance of CheckoutLink.



95
96
97
98
99
# File 'lib/adyen/services/checkout.rb', line 95

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

Instance Method Details

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



101
102
103
104
# File 'lib/adyen/services/checkout.rb', line 101

def get(linkId, headers = {})
  action = { method: 'get', url: "paymentLinks/" + linkId }
  @client.call_adyen_api(@service, action, {}, headers, @version, true)
end

#update(linkId, request, headers = {}) ⇒ Object



106
107
108
109
# File 'lib/adyen/services/checkout.rb', line 106

def update(linkId, request, headers = {})
  action = { method: 'patch', url: "paymentLinks/" + linkId }
  @client.call_adyen_api(@service, action, request, headers, @version, false)
end