adyen-ruby-api-library 10.3.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +1 -1
  3. data/.github/workflows/codeql.yml +1 -1
  4. data/.github/workflows/release.yml +3 -2
  5. data/.github/workflows/ruby.yml +1 -1
  6. data/.github/workflows/rubygems_release.yml +1 -1
  7. data/Gemfile +1 -1
  8. data/README.md +4 -10
  9. data/VERSION +1 -1
  10. data/lib/adyen/client.rb +61 -15
  11. data/lib/adyen/errors.rb +8 -6
  12. data/lib/adyen/services/{balanceControlService.rb → balanceControl/balance_control_api.rb} +5 -4
  13. data/lib/adyen/services/balanceControl.rb +24 -0
  14. data/lib/adyen/services/balancePlatform/authorized_card_users_api.rb +56 -0
  15. data/lib/adyen/services/balancePlatform/balances_api.rb +2 -2
  16. data/lib/adyen/services/balancePlatform/payment_instruments_api.rb +20 -0
  17. data/lib/adyen/services/balancePlatform/transfer_limits_balance_account_level_api.rb +76 -0
  18. data/lib/adyen/services/balancePlatform/transfer_limits_balance_platform_level_api.rb +56 -0
  19. data/lib/adyen/services/balancePlatform.rb +15 -0
  20. data/lib/adyen/services/binLookup/bin_lookup_api.rb +36 -0
  21. data/lib/adyen/services/binLookup.rb +8 -21
  22. data/lib/adyen/services/checkout/donations_api.rb +1 -1
  23. data/lib/adyen/services/checkout/utility_api.rb +10 -0
  24. data/lib/adyen/services/dataProtection/data_protection_api.rb +26 -0
  25. data/lib/adyen/services/dataProtection.rb +8 -11
  26. data/lib/adyen/services/disputes/disputes_api.rb +66 -0
  27. data/lib/adyen/services/disputes.rb +8 -51
  28. data/lib/adyen/services/legalEntityManagement.rb +1 -1
  29. data/lib/adyen/services/management/split_configuration_merchant_level_api.rb +7 -7
  30. data/lib/adyen/services/openBanking/account_verification_api.rb +36 -0
  31. data/lib/adyen/services/openBanking.rb +24 -0
  32. data/lib/adyen/services/payment/modifications_api.rb +98 -0
  33. data/lib/adyen/services/payment/payments_api.rb +66 -0
  34. data/lib/adyen/services/payment.rb +11 -131
  35. data/lib/adyen/services/paymentsApp/payments_app_api.rb +66 -0
  36. data/lib/adyen/services/paymentsApp.rb +8 -51
  37. data/lib/adyen/services/posMobile/pos_mobile_api.rb +26 -0
  38. data/lib/adyen/services/posMobile.rb +8 -11
  39. data/lib/adyen/services/recurring/recurring_api.rb +80 -0
  40. data/lib/adyen/services/recurring.rb +8 -61
  41. data/lib/adyen/services/sessionAuthentication/session_authentication_api.rb +1 -1
  42. data/lib/adyen/services/storedValue/stored_value_api.rb +76 -0
  43. data/lib/adyen/services/storedValue.rb +8 -61
  44. data/lib/adyen/version.rb +1 -1
  45. data/lib/adyen-ruby-api-library.rb +4 -1
  46. data/spec/balance_control_spec.rb +7 -5
  47. data/spec/balance_platform_spec.rb +344 -63
  48. data/spec/bin_lookup_spec.rb +4 -3
  49. data/spec/client_spec.rb +120 -3
  50. data/spec/data_protection_spec.rb +1 -1
  51. data/spec/disputes_spec.rb +2 -1
  52. data/spec/mocks/requests/BalancePlatform/create_transfer_limit.json +14 -0
  53. data/spec/mocks/requests/BalancePlatform/create_webhook_setting.json +16 -0
  54. data/spec/mocks/requests/OpenBanking/create_account_verification_routes.json +6 -0
  55. data/spec/mocks/requests/SessionAuthentication/create_authentication_session.json +16 -0
  56. data/spec/mocks/responses/BalancePlatform/create_transfer_limit.json +16 -0
  57. data/spec/mocks/responses/BalancePlatform/create_webhook_setting.json +17 -0
  58. data/spec/mocks/responses/BalancePlatform/get_all_authorised_card_users.json +6 -0
  59. data/spec/mocks/responses/BalancePlatform/get_all_webhook_settings.json +38 -0
  60. data/spec/mocks/responses/BalancePlatform/get_specific_transfer_limit.json +17 -0
  61. data/spec/mocks/responses/BalancePlatform/get_transfer_limits.json +38 -0
  62. data/spec/mocks/responses/OpenBanking/create_account_verification_routes.json +11 -0
  63. data/spec/mocks/responses/OpenBanking/get_account_verification_report.json +30 -0
  64. data/spec/mocks/responses/SessionAuthentication/create_authentication_session.json +4 -0
  65. data/spec/open_banking_spec.rb +68 -0
  66. data/spec/payments_spec.rb +1 -1
  67. data/spec/recurring_spec.rb +1 -1
  68. data/spec/session_authentication_spec.rb +40 -0
  69. data/spec/stored_value_spec.rb +1 -1
  70. data/templates/api.mustache +1 -1
  71. metadata +33 -3
@@ -1,36 +1,23 @@
1
- require_relative './service'
1
+ require_relative 'binLookup/bin_lookup_api'
2
+
2
3
  module Adyen
3
4
 
4
5
  # NOTE: This class is auto generated by OpenAPI Generator
5
6
  # Ref: https://openapi-generator.tech
6
7
  #
7
8
  # Do not edit the class manually.
8
- class BinLookup < Service
9
+ class BinLookup
9
10
  attr_accessor :service, :version
10
11
 
11
12
  DEFAULT_VERSION = 54
12
13
  def initialize(client, version = DEFAULT_VERSION)
13
- super(client, version, 'BinLookup')
14
- end
15
-
16
- # Check if 3D Secure is available
17
- def get3ds_availability(request, headers: {})
18
- endpoint = '/get3dsAvailability'.gsub(/{.+?}/, '%s')
19
- endpoint = endpoint.gsub(%r{^/}, '')
20
- endpoint = format(endpoint)
21
-
22
- action = { method: 'post', url: endpoint }
23
- @client.call_adyen_api(@service, action, request, headers, @version)
14
+ @service = 'BinLookup'
15
+ @client = client
16
+ @version = version
24
17
  end
25
18
 
26
- # Get a fees cost estimate
27
- def get_cost_estimate(request, headers: {})
28
- endpoint = '/getCostEstimate'.gsub(/{.+?}/, '%s')
29
- endpoint = endpoint.gsub(%r{^/}, '')
30
- endpoint = format(endpoint)
31
-
32
- action = { method: 'post', url: endpoint }
33
- @client.call_adyen_api(@service, action, request, headers, @version)
19
+ def bin_lookup_api
20
+ @bin_lookup_api ||= Adyen::BinLookupApi.new(@client, @version)
34
21
  end
35
22
 
36
23
  end
@@ -22,7 +22,7 @@ module Adyen
22
22
  @client.call_adyen_api(@service, action, request, headers, @version)
23
23
  end
24
24
 
25
- # Start a transaction for donations
25
+ # Make a donation
26
26
  def donations(request, headers: {})
27
27
  endpoint = '/donations'.gsub(/{.+?}/, '%s')
28
28
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -44,5 +44,15 @@ module Adyen
44
44
  @client.call_adyen_api(@service, action, request, headers, @version)
45
45
  end
46
46
 
47
+ # Validates shopper Id
48
+ def validate_shopper_id(request, headers: {})
49
+ endpoint = '/validateShopperId'.gsub(/{.+?}/, '%s')
50
+ endpoint = endpoint.gsub(%r{^/}, '')
51
+ endpoint = format(endpoint)
52
+
53
+ action = { method: 'post', url: endpoint }
54
+ @client.call_adyen_api(@service, action, request, headers, @version)
55
+ end
56
+
47
57
  end
48
58
  end
@@ -0,0 +1,26 @@
1
+ require_relative '../service'
2
+ module Adyen
3
+
4
+ # NOTE: This class is auto generated by OpenAPI Generator
5
+ # Ref: https://openapi-generator.tech
6
+ #
7
+ # Do not edit the class manually.
8
+ class DataProtectionApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'DataProtection')
13
+ end
14
+
15
+ # Submit a Subject Erasure Request.
16
+ def request_subject_erasure(request, headers: {})
17
+ endpoint = '/requestSubjectErasure'.gsub(/{.+?}/, '%s')
18
+ endpoint = endpoint.gsub(%r{^/}, '')
19
+ endpoint = format(endpoint)
20
+
21
+ action = { method: 'post', url: endpoint }
22
+ @client.call_adyen_api(@service, action, request, headers, @version)
23
+ end
24
+
25
+ end
26
+ end
@@ -1,26 +1,23 @@
1
- require_relative './service'
1
+ require_relative 'dataProtection/data_protection_api'
2
+
2
3
  module Adyen
3
4
 
4
5
  # NOTE: This class is auto generated by OpenAPI Generator
5
6
  # Ref: https://openapi-generator.tech
6
7
  #
7
8
  # Do not edit the class manually.
8
- class DataProtection < Service
9
+ class DataProtection
9
10
  attr_accessor :service, :version
10
11
 
11
12
  DEFAULT_VERSION = 1
12
13
  def initialize(client, version = DEFAULT_VERSION)
13
- super(client, version, 'DataProtectionService')
14
+ @service = 'DataProtection'
15
+ @client = client
16
+ @version = version
14
17
  end
15
18
 
16
- # Submit a Subject Erasure Request.
17
- def request_subject_erasure(request, headers: {})
18
- endpoint = '/requestSubjectErasure'.gsub(/{.+?}/, '%s')
19
- endpoint = endpoint.gsub(%r{^/}, '')
20
- endpoint = format(endpoint)
21
-
22
- action = { method: 'post', url: endpoint }
23
- @client.call_adyen_api(@service, action, request, headers, @version)
19
+ def data_protection_api
20
+ @data_protection_api ||= Adyen::DataProtectionApi.new(@client, @version)
24
21
  end
25
22
 
26
23
  end
@@ -0,0 +1,66 @@
1
+ require_relative '../service'
2
+ module Adyen
3
+
4
+ # NOTE: This class is auto generated by OpenAPI Generator
5
+ # Ref: https://openapi-generator.tech
6
+ #
7
+ # Do not edit the class manually.
8
+ class DisputesApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Disputes')
13
+ end
14
+
15
+ # Accept a dispute
16
+ def accept_dispute(request, headers: {})
17
+ endpoint = '/acceptDispute'.gsub(/{.+?}/, '%s')
18
+ endpoint = endpoint.gsub(%r{^/}, '')
19
+ endpoint = format(endpoint)
20
+
21
+ action = { method: 'post', url: endpoint }
22
+ @client.call_adyen_api(@service, action, request, headers, @version)
23
+ end
24
+
25
+ # Defend a dispute
26
+ def defend_dispute(request, headers: {})
27
+ endpoint = '/defendDispute'.gsub(/{.+?}/, '%s')
28
+ endpoint = endpoint.gsub(%r{^/}, '')
29
+ endpoint = format(endpoint)
30
+
31
+ action = { method: 'post', url: endpoint }
32
+ @client.call_adyen_api(@service, action, request, headers, @version)
33
+ end
34
+
35
+ # Delete a defense document
36
+ def delete_dispute_defense_document(request, headers: {})
37
+ endpoint = '/deleteDisputeDefenseDocument'.gsub(/{.+?}/, '%s')
38
+ endpoint = endpoint.gsub(%r{^/}, '')
39
+ endpoint = format(endpoint)
40
+
41
+ action = { method: 'post', url: endpoint }
42
+ @client.call_adyen_api(@service, action, request, headers, @version)
43
+ end
44
+
45
+ # Get applicable defense reasons
46
+ def retrieve_applicable_defense_reasons(request, headers: {})
47
+ endpoint = '/retrieveApplicableDefenseReasons'.gsub(/{.+?}/, '%s')
48
+ endpoint = endpoint.gsub(%r{^/}, '')
49
+ endpoint = format(endpoint)
50
+
51
+ action = { method: 'post', url: endpoint }
52
+ @client.call_adyen_api(@service, action, request, headers, @version)
53
+ end
54
+
55
+ # Supply a defense document
56
+ def supply_defense_document(request, headers: {})
57
+ endpoint = '/supplyDefenseDocument'.gsub(/{.+?}/, '%s')
58
+ endpoint = endpoint.gsub(%r{^/}, '')
59
+ endpoint = format(endpoint)
60
+
61
+ action = { method: 'post', url: endpoint }
62
+ @client.call_adyen_api(@service, action, request, headers, @version)
63
+ end
64
+
65
+ end
66
+ end
@@ -1,66 +1,23 @@
1
- require_relative './service'
1
+ require_relative 'disputes/disputes_api'
2
+
2
3
  module Adyen
3
4
 
4
5
  # NOTE: This class is auto generated by OpenAPI Generator
5
6
  # Ref: https://openapi-generator.tech
6
7
  #
7
8
  # Do not edit the class manually.
8
- class Disputes < Service
9
+ class Disputes
9
10
  attr_accessor :service, :version
10
11
 
11
12
  DEFAULT_VERSION = 30
12
13
  def initialize(client, version = DEFAULT_VERSION)
13
- super(client, version, 'Disputes')
14
- end
15
-
16
- # Accept a dispute
17
- def accept_dispute(request, headers: {})
18
- endpoint = '/acceptDispute'.gsub(/{.+?}/, '%s')
19
- endpoint = endpoint.gsub(%r{^/}, '')
20
- endpoint = format(endpoint)
21
-
22
- action = { method: 'post', url: endpoint }
23
- @client.call_adyen_api(@service, action, request, headers, @version)
24
- end
25
-
26
- # Defend a dispute
27
- def defend_dispute(request, headers: {})
28
- endpoint = '/defendDispute'.gsub(/{.+?}/, '%s')
29
- endpoint = endpoint.gsub(%r{^/}, '')
30
- endpoint = format(endpoint)
31
-
32
- action = { method: 'post', url: endpoint }
33
- @client.call_adyen_api(@service, action, request, headers, @version)
34
- end
35
-
36
- # Delete a defense document
37
- def delete_dispute_defense_document(request, headers: {})
38
- endpoint = '/deleteDisputeDefenseDocument'.gsub(/{.+?}/, '%s')
39
- endpoint = endpoint.gsub(%r{^/}, '')
40
- endpoint = format(endpoint)
41
-
42
- action = { method: 'post', url: endpoint }
43
- @client.call_adyen_api(@service, action, request, headers, @version)
44
- end
45
-
46
- # Get applicable defense reasons
47
- def retrieve_applicable_defense_reasons(request, headers: {})
48
- endpoint = '/retrieveApplicableDefenseReasons'.gsub(/{.+?}/, '%s')
49
- endpoint = endpoint.gsub(%r{^/}, '')
50
- endpoint = format(endpoint)
51
-
52
- action = { method: 'post', url: endpoint }
53
- @client.call_adyen_api(@service, action, request, headers, @version)
14
+ @service = 'Disputes'
15
+ @client = client
16
+ @version = version
54
17
  end
55
18
 
56
- # Supply a defense document
57
- def supply_defense_document(request, headers: {})
58
- endpoint = '/supplyDefenseDocument'.gsub(/{.+?}/, '%s')
59
- endpoint = endpoint.gsub(%r{^/}, '')
60
- endpoint = format(endpoint)
61
-
62
- action = { method: 'post', url: endpoint }
63
- @client.call_adyen_api(@service, action, request, headers, @version)
19
+ def disputes_api
20
+ @disputes_api ||= Adyen::DisputesApi.new(@client, @version)
64
21
  end
65
22
 
66
23
  end
@@ -16,7 +16,7 @@ module Adyen
16
16
  class LegalEntityManagement
17
17
  attr_accessor :service, :version
18
18
 
19
- DEFAULT_VERSION = 3
19
+ DEFAULT_VERSION = 4
20
20
  def initialize(client, version = DEFAULT_VERSION)
21
21
  @service = 'LegalEntityManagement'
22
22
  @client = client
@@ -22,7 +22,7 @@ module Adyen
22
22
  @client.call_adyen_api(@service, action, request, headers, @version)
23
23
  end
24
24
 
25
- # Create a split configuration
25
+ # Create a split configuration profile
26
26
  def create_split_configuration(request, merchant_id, headers: {})
27
27
  endpoint = '/merchants/{merchantId}/splitConfigurations'.gsub(/{.+?}/, '%s')
28
28
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -32,7 +32,7 @@ module Adyen
32
32
  @client.call_adyen_api(@service, action, request, headers, @version)
33
33
  end
34
34
 
35
- # Delete a split configuration
35
+ # Delete a split configuration profile
36
36
  def delete_split_configuration(merchant_id, split_configuration_id, headers: {})
37
37
  endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}'.gsub(/{.+?}/, '%s')
38
38
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -42,7 +42,7 @@ module Adyen
42
42
  @client.call_adyen_api(@service, action, {}, headers, @version)
43
43
  end
44
44
 
45
- # Delete a split configuration rule
45
+ # Delete a rule
46
46
  def delete_split_configuration_rule(merchant_id, split_configuration_id, rule_id, headers: {})
47
47
  endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}'.gsub(/{.+?}/, '%s')
48
48
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -52,7 +52,7 @@ module Adyen
52
52
  @client.call_adyen_api(@service, action, {}, headers, @version)
53
53
  end
54
54
 
55
- # Get a split configuration
55
+ # Get a split configuration profile
56
56
  def get_split_configuration(merchant_id, split_configuration_id, headers: {})
57
57
  endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}'.gsub(/{.+?}/, '%s')
58
58
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -62,7 +62,7 @@ module Adyen
62
62
  @client.call_adyen_api(@service, action, {}, headers, @version)
63
63
  end
64
64
 
65
- # Get a list of split configurations
65
+ # Get a list of split configuration profiles
66
66
  def list_split_configurations(merchant_id, headers: {})
67
67
  endpoint = '/merchants/{merchantId}/splitConfigurations'.gsub(/{.+?}/, '%s')
68
68
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -72,7 +72,7 @@ module Adyen
72
72
  @client.call_adyen_api(@service, action, {}, headers, @version)
73
73
  end
74
74
 
75
- # Update split conditions
75
+ # Update the split conditions
76
76
  def update_split_conditions(request, merchant_id, split_configuration_id, rule_id, headers: {})
77
77
  endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}'.gsub(/{.+?}/, '%s')
78
78
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -82,7 +82,7 @@ module Adyen
82
82
  @client.call_adyen_api(@service, action, request, headers, @version)
83
83
  end
84
84
 
85
- # Update split configuration description
85
+ # Update the description of the split configuration profile
86
86
  def update_split_configuration_description(request, merchant_id, split_configuration_id, headers: {})
87
87
  endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}'.gsub(/{.+?}/, '%s')
88
88
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -0,0 +1,36 @@
1
+ require_relative '../service'
2
+ module Adyen
3
+
4
+ # NOTE: This class is auto generated by OpenAPI Generator
5
+ # Ref: https://openapi-generator.tech
6
+ #
7
+ # Do not edit the class manually.
8
+ class AccountVerificationApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'OpenBanking')
13
+ end
14
+
15
+ # Create routes for account verification
16
+ def create_account_verification_routes(request, headers: {})
17
+ endpoint = '/accountVerification/routes'.gsub(/{.+?}/, '%s')
18
+ endpoint = endpoint.gsub(%r{^/}, '')
19
+ endpoint = format(endpoint)
20
+
21
+ action = { method: 'post', url: endpoint }
22
+ @client.call_adyen_api(@service, action, request, headers, @version)
23
+ end
24
+
25
+ # Get account verification report
26
+ def get_account_verification_report(code, headers: {})
27
+ endpoint = '/accountVerification/reports/{code}'.gsub(/{.+?}/, '%s')
28
+ endpoint = endpoint.gsub(%r{^/}, '')
29
+ endpoint = format(endpoint, code)
30
+
31
+ action = { method: 'get', url: endpoint }
32
+ @client.call_adyen_api(@service, action, {}, headers, @version)
33
+ end
34
+
35
+ end
36
+ end
@@ -0,0 +1,24 @@
1
+ require_relative 'openBanking/account_verification_api'
2
+
3
+ module Adyen
4
+
5
+ # NOTE: This class is auto generated by OpenAPI Generator
6
+ # Ref: https://openapi-generator.tech
7
+ #
8
+ # Do not edit the class manually.
9
+ class OpenBanking
10
+ attr_accessor :service, :version
11
+
12
+ DEFAULT_VERSION = 1
13
+ def initialize(client, version = DEFAULT_VERSION)
14
+ @service = 'OpenBanking'
15
+ @client = client
16
+ @version = version
17
+ end
18
+
19
+ def account_verification_api
20
+ @account_verification_api ||= Adyen::AccountVerificationApi.new(@client, @version)
21
+ end
22
+
23
+ end
24
+ end
@@ -0,0 +1,98 @@
1
+ require_relative '../service'
2
+ module Adyen
3
+
4
+ # NOTE: This class is auto generated by OpenAPI Generator
5
+ # Ref: https://openapi-generator.tech
6
+ #
7
+ # Do not edit the class manually.
8
+ class ModificationsApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Payment')
13
+ end
14
+
15
+ # Change the authorised amount
16
+ def adjust_authorisation(request, headers: {})
17
+ endpoint = '/adjustAuthorisation'.gsub(/{.+?}/, '%s')
18
+ endpoint = endpoint.gsub(%r{^/}, '')
19
+ endpoint = format(endpoint)
20
+
21
+ action = { method: 'post', url: endpoint }
22
+ @client.call_adyen_api(@service, action, request, headers, @version)
23
+ end
24
+
25
+ # Cancel an authorisation
26
+ def cancel(request, headers: {})
27
+ endpoint = '/cancel'.gsub(/{.+?}/, '%s')
28
+ endpoint = endpoint.gsub(%r{^/}, '')
29
+ endpoint = format(endpoint)
30
+
31
+ action = { method: 'post', url: endpoint }
32
+ @client.call_adyen_api(@service, action, request, headers, @version)
33
+ end
34
+
35
+ # Cancel or refund a payment
36
+ def cancel_or_refund(request, headers: {})
37
+ endpoint = '/cancelOrRefund'.gsub(/{.+?}/, '%s')
38
+ endpoint = endpoint.gsub(%r{^/}, '')
39
+ endpoint = format(endpoint)
40
+
41
+ action = { method: 'post', url: endpoint }
42
+ @client.call_adyen_api(@service, action, request, headers, @version)
43
+ end
44
+
45
+ # Capture an authorisation
46
+ def capture(request, headers: {})
47
+ endpoint = '/capture'.gsub(/{.+?}/, '%s')
48
+ endpoint = endpoint.gsub(%r{^/}, '')
49
+ endpoint = format(endpoint)
50
+
51
+ action = { method: 'post', url: endpoint }
52
+ @client.call_adyen_api(@service, action, request, headers, @version)
53
+ end
54
+
55
+ # Create a donation
56
+ #
57
+ # Deprecated
58
+ def donate(request, headers: {})
59
+ endpoint = '/donate'.gsub(/{.+?}/, '%s')
60
+ endpoint = endpoint.gsub(%r{^/}, '')
61
+ endpoint = format(endpoint)
62
+
63
+ action = { method: 'post', url: endpoint }
64
+ @client.call_adyen_api(@service, action, request, headers, @version)
65
+ end
66
+
67
+ # Refund a captured payment
68
+ def refund(request, headers: {})
69
+ endpoint = '/refund'.gsub(/{.+?}/, '%s')
70
+ endpoint = endpoint.gsub(%r{^/}, '')
71
+ endpoint = format(endpoint)
72
+
73
+ action = { method: 'post', url: endpoint }
74
+ @client.call_adyen_api(@service, action, request, headers, @version)
75
+ end
76
+
77
+ # Cancel an authorisation using your reference
78
+ def technical_cancel(request, headers: {})
79
+ endpoint = '/technicalCancel'.gsub(/{.+?}/, '%s')
80
+ endpoint = endpoint.gsub(%r{^/}, '')
81
+ endpoint = format(endpoint)
82
+
83
+ action = { method: 'post', url: endpoint }
84
+ @client.call_adyen_api(@service, action, request, headers, @version)
85
+ end
86
+
87
+ # Cancel an in-person refund
88
+ def void_pending_refund(request, headers: {})
89
+ endpoint = '/voidPendingRefund'.gsub(/{.+?}/, '%s')
90
+ endpoint = endpoint.gsub(%r{^/}, '')
91
+ endpoint = format(endpoint)
92
+
93
+ action = { method: 'post', url: endpoint }
94
+ @client.call_adyen_api(@service, action, request, headers, @version)
95
+ end
96
+
97
+ end
98
+ end
@@ -0,0 +1,66 @@
1
+ require_relative '../service'
2
+ module Adyen
3
+
4
+ # NOTE: This class is auto generated by OpenAPI Generator
5
+ # Ref: https://openapi-generator.tech
6
+ #
7
+ # Do not edit the class manually.
8
+ class PaymentsApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Payment')
13
+ end
14
+
15
+ # Create an authorisation
16
+ def authorise(request, headers: {})
17
+ endpoint = '/authorise'.gsub(/{.+?}/, '%s')
18
+ endpoint = endpoint.gsub(%r{^/}, '')
19
+ endpoint = format(endpoint)
20
+
21
+ action = { method: 'post', url: endpoint }
22
+ @client.call_adyen_api(@service, action, request, headers, @version)
23
+ end
24
+
25
+ # Complete a 3DS authorisation
26
+ def authorise3d(request, headers: {})
27
+ endpoint = '/authorise3d'.gsub(/{.+?}/, '%s')
28
+ endpoint = endpoint.gsub(%r{^/}, '')
29
+ endpoint = format(endpoint)
30
+
31
+ action = { method: 'post', url: endpoint }
32
+ @client.call_adyen_api(@service, action, request, headers, @version)
33
+ end
34
+
35
+ # Complete a 3DS2 authorisation
36
+ def authorise3ds2(request, headers: {})
37
+ endpoint = '/authorise3ds2'.gsub(/{.+?}/, '%s')
38
+ endpoint = endpoint.gsub(%r{^/}, '')
39
+ endpoint = format(endpoint)
40
+
41
+ action = { method: 'post', url: endpoint }
42
+ @client.call_adyen_api(@service, action, request, headers, @version)
43
+ end
44
+
45
+ # Get the 3DS authentication result
46
+ def get_authentication_result(request, headers: {})
47
+ endpoint = '/getAuthenticationResult'.gsub(/{.+?}/, '%s')
48
+ endpoint = endpoint.gsub(%r{^/}, '')
49
+ endpoint = format(endpoint)
50
+
51
+ action = { method: 'post', url: endpoint }
52
+ @client.call_adyen_api(@service, action, request, headers, @version)
53
+ end
54
+
55
+ # Get the 3DS2 authentication result
56
+ def retrieve3ds2_result(request, headers: {})
57
+ endpoint = '/retrieve3ds2Result'.gsub(/{.+?}/, '%s')
58
+ endpoint = endpoint.gsub(%r{^/}, '')
59
+ endpoint = format(endpoint)
60
+
61
+ action = { method: 'post', url: endpoint }
62
+ @client.call_adyen_api(@service, action, request, headers, @version)
63
+ end
64
+
65
+ end
66
+ end