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, #create_query_string

Constructor Details

#initialize(client, version = DEFAULT_VERSION) ⇒ CheckoutLink

Returns a new instance of CheckoutLink.



113
114
115
116
117
# File 'lib/adyen/services/checkout.rb', line 113

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

Instance Method Details

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



119
120
121
122
# File 'lib/adyen/services/checkout.rb', line 119

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

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



124
125
126
127
# File 'lib/adyen/services/checkout.rb', line 124

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