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.



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

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

Instance Method Details

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



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

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



110
111
112
113
# File 'lib/adyen/services/checkout.rb', line 110

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