Class: Adyen::ClassicModificationsApi

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

Overview

NOTE: This class is auto generated by OpenAPI Generator Ref: openapi-generator.tech

Do not edit the class manually.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Service

action_for_method_name, #create_query_string

Constructor Details

#initialize(client, version = DEFAULT_VERSION) ⇒ ClassicModificationsApi

Returns a new instance of ClassicModificationsApi.



11
12
13
# File 'lib/adyen/services/payment/modifications_api.rb', line 11

def initialize(client, version = DEFAULT_VERSION)
  super(client, version, 'Payment')
end

Instance Attribute Details

#serviceObject

Returns the value of attribute service.



9
10
11
# File 'lib/adyen/services/payment/modifications_api.rb', line 9

def service
  @service
end

#versionObject

Returns the value of attribute version.



9
10
11
# File 'lib/adyen/services/payment/modifications_api.rb', line 9

def version
  @version
end

Instance Method Details

#adjust_authorisation(request, headers: {}) ⇒ Object

Change the authorised amount



16
17
18
19
20
21
# File 'lib/adyen/services/payment/modifications_api.rb', line 16

def adjust_authorisation(request, headers: {})
  endpoint = build_endpoint('/adjustAuthorisation')
  
  action = { method: 'post', url: endpoint }
  @client.call_adyen_api(@service, action, request, headers, @version)
end

#cancel(request, headers: {}) ⇒ Object

Cancel an authorisation



24
25
26
27
28
29
# File 'lib/adyen/services/payment/modifications_api.rb', line 24

def cancel(request, headers: {})
  endpoint = build_endpoint('/cancel')
  
  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



32
33
34
35
36
37
# File 'lib/adyen/services/payment/modifications_api.rb', line 32

def cancel_or_refund(request, headers: {})
  endpoint = build_endpoint('/cancelOrRefund')
  
  action = { method: 'post', url: endpoint }
  @client.call_adyen_api(@service, action, request, headers, @version)
end

#capture(request, headers: {}) ⇒ Object

Capture an authorisation



40
41
42
43
44
45
# File 'lib/adyen/services/payment/modifications_api.rb', line 40

def capture(request, headers: {})
  endpoint = build_endpoint('/capture')
  
  action = { method: 'post', url: endpoint }
  @client.call_adyen_api(@service, action, request, headers, @version)
end

Create a donation

Deprecated



50
51
52
53
54
55
# File 'lib/adyen/services/payment/modifications_api.rb', line 50

def donate(request, headers: {})
  endpoint = build_endpoint('/donate')
  
  action = { method: 'post', url: endpoint }
  @client.call_adyen_api(@service, action, request, headers, @version)
end

#refund(request, headers: {}) ⇒ Object

Refund a captured payment



58
59
60
61
62
63
# File 'lib/adyen/services/payment/modifications_api.rb', line 58

def refund(request, headers: {})
  endpoint = build_endpoint('/refund')
  
  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



66
67
68
69
70
71
# File 'lib/adyen/services/payment/modifications_api.rb', line 66

def technical_cancel(request, headers: {})
  endpoint = build_endpoint('/technicalCancel')
  
  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



74
75
76
77
78
79
# File 'lib/adyen/services/payment/modifications_api.rb', line 74

def void_pending_refund(request, headers: {})
  endpoint = build_endpoint('/voidPendingRefund')
  
  action = { method: 'post', url: endpoint }
  @client.call_adyen_api(@service, action, request, headers, @version)
end