Class: Adyen::Payment
Overview
NOTE: This class is auto generated by OpenAPI Generator Ref: openapi-generator.tech
Do not edit the class manually.
Constant Summary collapse
- DEFAULT_VERSION =
68
Instance Attribute Summary collapse
-
#service ⇒ Object
Returns the value of attribute service.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#adjust_authorisation(request, headers: {}) ⇒ Object
Change the authorised amount.
-
#authorise(request, headers: {}) ⇒ Object
Create an authorisation.
-
#authorise3d(request, headers: {}) ⇒ Object
Complete a 3DS authorisation.
-
#authorise3ds2(request, headers: {}) ⇒ Object
Complete a 3DS2 authorisation.
-
#cancel(request, headers: {}) ⇒ Object
Cancel an authorisation.
-
#cancel_or_refund(request, headers: {}) ⇒ Object
Cancel or refund a payment.
-
#capture(request, headers: {}) ⇒ Object
Capture an authorisation.
-
#donate(request, headers: {}) ⇒ Object
Create a donation.
-
#get_authentication_result(request, headers: {}) ⇒ Object
Get the 3DS authentication result.
-
#initialize(client, version = DEFAULT_VERSION) ⇒ Payment
constructor
A new instance of Payment.
-
#refund(request, headers: {}) ⇒ Object
Refund a captured payment.
-
#retrieve3ds2_result(request, headers: {}) ⇒ Object
Get the 3DS2 authentication result.
-
#technical_cancel(request, headers: {}) ⇒ Object
Cancel an authorisation using your reference.
-
#void_pending_refund(request, headers: {}) ⇒ Object
Cancel an in-person refund.
Methods inherited from Service
action_for_method_name, #create_query_string
Constructor Details
#initialize(client, version = DEFAULT_VERSION) ⇒ Payment
Returns a new instance of Payment.
12 13 14 |
# File 'lib/adyen/services/payment.rb', line 12 def initialize(client, version = DEFAULT_VERSION) super(client, version, 'Payment') end |
Instance Attribute Details
#service ⇒ Object
Returns the value of attribute service.
9 10 11 |
# File 'lib/adyen/services/payment.rb', line 9 def service @service end |
#version ⇒ Object
Returns the value of attribute version.
9 10 11 |
# File 'lib/adyen/services/payment.rb', line 9 def version @version end |
Instance Method Details
#adjust_authorisation(request, headers: {}) ⇒ Object
Change the authorised amount
17 18 19 20 21 22 23 24 |
# File 'lib/adyen/services/payment.rb', line 17 def (request, headers: {}) endpoint = '/adjustAuthorisation'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#authorise(request, headers: {}) ⇒ Object
Create an authorisation
27 28 29 30 31 32 33 34 |
# File 'lib/adyen/services/payment.rb', line 27 def (request, headers: {}) endpoint = '/authorise'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#authorise3d(request, headers: {}) ⇒ Object
Complete a 3DS authorisation
37 38 39 40 41 42 43 44 |
# File 'lib/adyen/services/payment.rb', line 37 def (request, headers: {}) endpoint = '/authorise3d'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#authorise3ds2(request, headers: {}) ⇒ Object
Complete a 3DS2 authorisation
47 48 49 50 51 52 53 54 |
# File 'lib/adyen/services/payment.rb', line 47 def (request, headers: {}) endpoint = '/authorise3ds2'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#cancel(request, headers: {}) ⇒ Object
Cancel an authorisation
57 58 59 60 61 62 63 64 |
# File 'lib/adyen/services/payment.rb', line 57 def cancel(request, headers: {}) endpoint = '/cancel'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#cancel_or_refund(request, headers: {}) ⇒ Object
Cancel or refund a payment
67 68 69 70 71 72 73 74 |
# File 'lib/adyen/services/payment.rb', line 67 def cancel_or_refund(request, headers: {}) endpoint = '/cancelOrRefund'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#capture(request, headers: {}) ⇒ Object
Capture an authorisation
77 78 79 80 81 82 83 84 |
# File 'lib/adyen/services/payment.rb', line 77 def capture(request, headers: {}) endpoint = '/capture'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#donate(request, headers: {}) ⇒ Object
Create a donation
Deprecated
89 90 91 92 93 94 95 96 |
# File 'lib/adyen/services/payment.rb', line 89 def donate(request, headers: {}) endpoint = '/donate'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#get_authentication_result(request, headers: {}) ⇒ Object
Get the 3DS authentication result
99 100 101 102 103 104 105 106 |
# File 'lib/adyen/services/payment.rb', line 99 def get_authentication_result(request, headers: {}) endpoint = '/getAuthenticationResult'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#refund(request, headers: {}) ⇒ Object
Refund a captured payment
109 110 111 112 113 114 115 116 |
# File 'lib/adyen/services/payment.rb', line 109 def refund(request, headers: {}) endpoint = '/refund'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#retrieve3ds2_result(request, headers: {}) ⇒ Object
Get the 3DS2 authentication result
119 120 121 122 123 124 125 126 |
# File 'lib/adyen/services/payment.rb', line 119 def retrieve3ds2_result(request, headers: {}) endpoint = '/retrieve3ds2Result'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#technical_cancel(request, headers: {}) ⇒ Object
Cancel an authorisation using your reference
129 130 131 132 133 134 135 136 |
# File 'lib/adyen/services/payment.rb', line 129 def technical_cancel(request, headers: {}) endpoint = '/technicalCancel'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#void_pending_refund(request, headers: {}) ⇒ Object
Cancel an in-person refund
139 140 141 142 143 144 145 146 |
# File 'lib/adyen/services/payment.rb', line 139 def void_pending_refund(request, headers: {}) endpoint = '/voidPendingRefund'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |