Class: Adyen::Disputes

Inherits:
Service show all
Defined in:
lib/adyen/services/disputes.rb

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 =
30

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) ⇒ Disputes

Returns a new instance of Disputes.



12
13
14
# File 'lib/adyen/services/disputes.rb', line 12

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

Instance Attribute Details

#serviceObject

Returns the value of attribute service.



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

def service
  @service
end

#versionObject

Returns the value of attribute version.



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

def version
  @version
end

Instance Method Details

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

Accept a dispute



17
18
19
20
21
22
23
24
# File 'lib/adyen/services/disputes.rb', line 17

def accept_dispute(request, headers: {})
  endpoint = '/acceptDispute'.gsub(/{.+?}/, '%s')
  endpoint = endpoint.gsub(%r{^/}, '')
  endpoint = format(endpoint)
  
  action = { method: 'post', url: endpoint }
  @client.call_adyen_api(@service, action, request, headers, @version)
end

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

Defend a dispute



27
28
29
30
31
32
33
34
# File 'lib/adyen/services/disputes.rb', line 27

def defend_dispute(request, headers: {})
  endpoint = '/defendDispute'.gsub(/{.+?}/, '%s')
  endpoint = endpoint.gsub(%r{^/}, '')
  endpoint = format(endpoint)
  
  action = { method: 'post', url: endpoint }
  @client.call_adyen_api(@service, action, request, headers, @version)
end

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

Delete a defense document



37
38
39
40
41
42
43
44
# File 'lib/adyen/services/disputes.rb', line 37

def delete_dispute_defense_document(request, headers: {})
  endpoint = '/deleteDisputeDefenseDocument'.gsub(/{.+?}/, '%s')
  endpoint = endpoint.gsub(%r{^/}, '')
  endpoint = format(endpoint)
  
  action = { method: 'post', url: endpoint }
  @client.call_adyen_api(@service, action, request, headers, @version)
end

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

Get applicable defense reasons



47
48
49
50
51
52
53
54
# File 'lib/adyen/services/disputes.rb', line 47

def retrieve_applicable_defense_reasons(request, headers: {})
  endpoint = '/retrieveApplicableDefenseReasons'.gsub(/{.+?}/, '%s')
  endpoint = endpoint.gsub(%r{^/}, '')
  endpoint = format(endpoint)
  
  action = { method: 'post', url: endpoint }
  @client.call_adyen_api(@service, action, request, headers, @version)
end

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

Supply a defense document



57
58
59
60
61
62
63
64
# File 'lib/adyen/services/disputes.rb', line 57

def supply_defense_document(request, headers: {})
  endpoint = '/supplyDefenseDocument'.gsub(/{.+?}/, '%s')
  endpoint = endpoint.gsub(%r{^/}, '')
  endpoint = format(endpoint)
  
  action = { method: 'post', url: endpoint }
  @client.call_adyen_api(@service, action, request, headers, @version)
end