adyen-ruby-api-library 4.0.1 → 6.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 (105) hide show
  1. checksums.yaml +5 -5
  2. data/.github/CODEOWNERS +1 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
  5. data/.github/PULL_REQUEST_TEMPLATE.md +7 -0
  6. data/.github/dependabot.yml +8 -0
  7. data/.github/workflows/ruby.yml +20 -0
  8. data/.gitignore +4 -0
  9. data/CODE_OF_CONDUCT.md +76 -0
  10. data/Gemfile +2 -2
  11. data/README.md +72 -109
  12. data/docs/checkout.html +17 -0
  13. data/docs/marketpay.html +2 -0
  14. data/lib/adyen/client.rb +57 -24
  15. data/lib/adyen/errors.rb +44 -2
  16. data/lib/adyen/services/bin_lookup.rb +18 -0
  17. data/lib/adyen/services/checkout.rb +90 -8
  18. data/lib/adyen/services/{checkout_utility.rb → data_protection.rb} +4 -3
  19. data/lib/adyen/services/dispute.rb +20 -0
  20. data/lib/adyen/services/marketpay.rb +27 -6
  21. data/lib/adyen/services/payments.rb +15 -5
  22. data/lib/adyen/services/payouts.rb +3 -2
  23. data/lib/adyen/services/postfmapi.rb +19 -0
  24. data/lib/adyen/services/recurring.rb +3 -2
  25. data/lib/adyen/services/service.rb +2 -2
  26. data/lib/adyen/version.rb +1 -1
  27. data/lib/adyen-ruby-api-library.rb +4 -12
  28. data/renovate.json +5 -0
  29. data/spec/account_spec.rb +4 -1
  30. data/spec/bin_lookup_spec.rb +15 -0
  31. data/spec/checkout_spec.rb +275 -4
  32. data/spec/data_protection_spec.rb +14 -0
  33. data/spec/dispute_spec.rb +17 -0
  34. data/spec/errors_spec.rb +33 -3
  35. data/spec/fund_spec.rb +2 -1
  36. data/spec/hop_spec.rb +14 -0
  37. data/spec/mocks/requests/Account/check_account_holder.json +5 -0
  38. data/spec/mocks/requests/Account/delete_payout_methods.json +6 -0
  39. data/spec/mocks/requests/Account/delete_signatories.json +6 -0
  40. data/spec/mocks/requests/BinLookup/get_3ds_availability.json +4 -0
  41. data/spec/mocks/requests/BinLookup/get_cost_estimate.json +8 -0
  42. data/spec/mocks/requests/Checkout/orders.json +6 -0
  43. data/spec/mocks/requests/Checkout/orders_cancel.json +7 -0
  44. data/spec/mocks/requests/Checkout/origin_keys.json +3 -0
  45. data/spec/mocks/requests/Checkout/payment_links.json +9 -0
  46. data/spec/mocks/requests/Checkout/payment_methods_balance.json +9 -0
  47. data/spec/mocks/requests/Checkout/sessions.json +10 -0
  48. data/spec/mocks/requests/DataProtectionService/request_subject_erasure.json +5 -0
  49. data/spec/mocks/requests/DisputeService/defend_dispute.json +5 -0
  50. data/spec/mocks/requests/DisputeService/delete_dispute_defense_document.json +5 -0
  51. data/spec/mocks/requests/DisputeService/retrieve_applicable_defense_reasons.json +4 -0
  52. data/spec/mocks/requests/DisputeService/supply_defense_document.json +11 -0
  53. data/spec/mocks/requests/Fund/refund_funds_transfer.json +7 -0
  54. data/spec/mocks/requests/Hop/get_onboarding_url.json +4 -0
  55. data/spec/mocks/requests/Payment/donate.json +10 -0
  56. data/spec/mocks/requests/Payment/get_authentication_result.json +4 -0
  57. data/spec/mocks/requests/Payment/retrieve_3ds2_result.json +4 -0
  58. data/spec/mocks/requests/Payment/technical_cancel.json +4 -0
  59. data/spec/mocks/requests/Payment/void_pending_refund.json +4 -0
  60. data/spec/mocks/requests/Payout/payout.json +8 -0
  61. data/spec/mocks/requests/Recurring/schedule_account_updater.json +12 -0
  62. data/spec/mocks/requests/Terminal/assign_terminals.json +6 -0
  63. data/spec/mocks/requests/Terminal/find_terminal.json +3 -0
  64. data/spec/mocks/requests/Terminal/get_terminals_under_account.json +4 -0
  65. data/spec/mocks/responses/Account/check_account_holder.json +3 -0
  66. data/spec/mocks/responses/Account/delete_payout_methods.json +3 -0
  67. data/spec/mocks/responses/Account/delete_signatories.json +3 -0
  68. data/spec/mocks/responses/BinLookup/get_3ds_availability.json +8 -0
  69. data/spec/mocks/responses/BinLookup/get_cost_estimate.json +8 -0
  70. data/spec/mocks/responses/Checkout/get-payment-link.json +11 -0
  71. data/spec/mocks/responses/Checkout/orders.json +8 -0
  72. data/spec/mocks/responses/Checkout/orders_cancel.json +4 -0
  73. data/spec/mocks/responses/Checkout/origin_keys.json +5 -0
  74. data/spec/mocks/responses/Checkout/payment_links.json +9 -0
  75. data/spec/mocks/responses/Checkout/payment_methods_balance.json +3 -0
  76. data/spec/mocks/responses/Checkout/sessions-success.json +11 -0
  77. data/spec/mocks/responses/Checkout/update-payment-link.json +11 -0
  78. data/spec/mocks/responses/DataProtectionService/request_subject_erasure.json +3 -0
  79. data/spec/mocks/responses/DisputeService/defend_dispute.json +5 -0
  80. data/spec/mocks/responses/DisputeService/delete_dispute_defense_document.json +5 -0
  81. data/spec/mocks/responses/DisputeService/retrieve_applicable_defense_reasons.json +28 -0
  82. data/spec/mocks/responses/DisputeService/supply_defense_document.json +5 -0
  83. data/spec/mocks/responses/Fund/refund_funds_transfer.json +5 -0
  84. data/spec/mocks/responses/Hop/get_onboarding_url.json +7 -0
  85. data/spec/mocks/responses/Payment/donate.json +4 -0
  86. data/spec/mocks/responses/Payment/get_authentication_result.json +5 -0
  87. data/spec/mocks/responses/Payment/retrieve_3ds2_result.json +5 -0
  88. data/spec/mocks/responses/Payment/technical_cancel.json +3 -0
  89. data/spec/mocks/responses/Payment/void_pending_refund.json +3 -0
  90. data/spec/mocks/responses/Payout/payout.json +3 -0
  91. data/spec/mocks/responses/Recurring/schedule_account_updater.json +4 -0
  92. data/spec/mocks/responses/Terminal/assign_terminals.json +5 -0
  93. data/spec/mocks/responses/Terminal/find_terminal.json +6 -0
  94. data/spec/mocks/responses/Terminal/get_terminals_under_account.json +11 -0
  95. data/spec/payments_spec.rb +6 -1
  96. data/spec/payouts_spec.rb +2 -1
  97. data/spec/postfmapi_spec.rb +16 -0
  98. data/spec/recurring_spec.rb +2 -1
  99. data/spec/service_spec.rb +4 -0
  100. data/spec/spec_helper.rb +18 -12
  101. metadata +78 -9
  102. data/.travis.yml +0 -14
  103. data/spec/checkout_utility_spec.rb +0 -29
  104. data/spec/mocks/requests/CheckoutUtility/origin_keys.json +0 -7
  105. data/spec/mocks/responses/CheckoutUtility/origin_keys.json +0 -7
@@ -0,0 +1,8 @@
1
+ {
2
+ "costEstimateAmount": {
3
+ "currency": "EUR",
4
+ "value": 1000
5
+ },
6
+ "resultCode": "Success",
7
+ "surchargeType": "PASSTHROUGH"
8
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "amount": {
3
+ "currency": "USD",
4
+ "value": 1000
5
+ },
6
+ "id": "MockId",
7
+ "merchantAccount": "TestMerchant",
8
+ "reference": "Merchant Reference",
9
+ "status": "active",
10
+ "url": "https://adyen.com"
11
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "expiresAt": "1970-01-01",
3
+ "orderData": "mockedOrderData",
4
+ "remainingAmount": {
5
+ "currency": "USD",
6
+ "value": 100
7
+ }
8
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "pspReference": "mocked_psp_ref",
3
+ "resultCode": "cancelled"
4
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "originKeys": {
3
+ "https://adyen.com": "mocked_origin_key"
4
+ }
5
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "amount": {
3
+ "currency": "USD",
4
+ "value": 1000
5
+ },
6
+ "expiresAt": "2019-12-14T10:05:29Z",
7
+ "reference": "Merchant Reference",
8
+ "url": "https://checkoutshopper-test.adyen.com"
9
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "balance": "100"
3
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "session-test-id",
3
+ "amount": {
4
+ "currency": "EUR",
5
+ "value": 1000
6
+ },
7
+ "reference": "TestReference",
8
+ "returnUrl": "http://test-url.com",
9
+ "expiresAt": "2021-09-30T06:45:06Z",
10
+ "merchantAccount": "YourMerchantAccount"
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "amount": {
3
+ "currency": "USD",
4
+ "value": 1000
5
+ },
6
+ "id": "MockId",
7
+ "merchantAccount": "TestMerchant",
8
+ "reference": "Merchant Reference",
9
+ "status": "expired",
10
+ "url": "https://adyen.com"
11
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "result": "SUCCESS"
3
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "disputeServiceResult": {
3
+ "success": true
4
+ }
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "disputeServiceResult": {
3
+ "success": true
4
+ }
5
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "defenseReasons": [
3
+ {
4
+ "defenseDocumentTypes": [
5
+ {
6
+ "available": false,
7
+ "defenseDocumentTypeCode": "TIDorInvoice",
8
+ "requirementLevel": "Optional"
9
+ },
10
+ {
11
+ "available": false,
12
+ "defenseDocumentTypeCode": "DefenseMaterial",
13
+ "requirementLevel": "Required"
14
+ },
15
+ {
16
+ "available": false,
17
+ "defenseDocumentTypeCode": "AlternativeDefenseMaterial",
18
+ "requirementLevel": "AlternativeRequired"
19
+ }
20
+ ],
21
+ "defenseReasonCode": "SupplyDefenseMaterial",
22
+ "satisfied": false
23
+ }
24
+ ],
25
+ "disputeServiceResult": {
26
+ "success": true
27
+ }
28
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "disputeServiceResult": {
3
+ "success": true
4
+ }
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "pspReference": "9915090893984580",
3
+ "merchantReference": "MerchantReference",
4
+ "resultCode": "Received"
5
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "pspReference": "8815850625171183",
3
+ "resultCode": "Success",
4
+ "submittedAsync": "false",
5
+ "invalidFields": [],
6
+ "redirectUrl": "https://hop-test.adyen.com/hop/view/?token=BQABAQANDBQftSiV8pqlYYFRjIZmBIhE3Ls%2FgdLQ3kcTbflt4FDPves0B9kq7aSZUqKwRciwBEN3PX23ZPqGmYXTb7QklLY5YdEXvUdEgtFnJl9uDWK09texQ3djnTPW6JKrok5svw%2FGZyGHqF1NAbuqPPPLF8o5Jzzri8AqyQKig%2BtMmEibuCuZrIvMbJjcINfDk0OBHir8bNjHgMGFiDBOXdkiww%2FB1VXP2MMqSB1yqcXiKL1o%2B12czdB9wJ5wwsQLGlcuE2Z0%2BZNIQL3MdRomkphpkIWBPFN9YmyGS0Wel6trve6ghBl4q4e1C%2B9BMQKc4P0jrC9FrkBZvhtBYoN%2BfUfrEDbgXpXjXYa1tlfU53XoD%2FsAAA1n2PuQSyfTxEf8qpwAcB9oDN%2BrbpwxYwIk42kCGztAQShTwZzx%2B4VifKpjBdtHA4bSHEqOzGPvpQ6bk4viluLn9Ealv0ylf%2FC3w%2BZCmThg8%2B2EIiABmMK8Jbfijl%2FM%2FqE43F0QN9SveJjwkN5IYGra5QbErUdAPDMfDksPjy%2FY8j%2B2XT1kMwSOLbWTCfhP%2FM%2F68Ll50RuhfJOkgfdP%2BfSxbK9i9uAmEsJ980cABWPpB4MH27asGfZ17mCM3TavaiI9d9Gs3X1HIoEZehFKWEhoaGsEaoSBQ6ut6VnZoOCCBsvssg9aqi1LJKpwwWg4CjS9Ygrw1dnSYjyFO2HeKGXf4TUS7DSCF7tpUJlBen69Xaqbwg%2BHfNfmgcCoZwSgvg%3D%3D"
7
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "pspReference": "882594132885209C",
3
+ "response": "[donation-received]"
4
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "threeDS2Result": {
3
+ "transStatus": "Y"
4
+ }
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "threeDS2Result": {
3
+ "transStatus": "Y"
4
+ }
5
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "originalReference": "9914694372990637"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "pspReference": "9914694372990637"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "resultCode": "Success"
3
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "pspReference": "8815260599791117",
3
+ "result": "Success"
4
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "results": {
3
+ "e285-123456789": "Done"
4
+ }
5
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "companyAccount": "TestCompany",
3
+ "merchantAccount": "TestMerchant",
4
+ "merchantInventory": false,
5
+ "terminal": "e285-123456789"
6
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "companyAccount": "TestCompany",
3
+ "merchantAccounts": [
4
+ {
5
+ "merchantAccount": "TestMerchant",
6
+ "inStoreTerminals": [
7
+ "P400Plus-123456789"
8
+ ]
9
+ }
10
+ ]
11
+ }
@@ -14,7 +14,12 @@ RSpec.describe Adyen::Payments, service: "payments service" do
14
14
  ["cancel", "response", "[cancel-received]"],
15
15
  ["cancel_or_refund", "response", "[cancelOrRefund-received]"],
16
16
  ["capture", "response", "[capture-received]"],
17
- ["refund", "response", "[refund-received]"]
17
+ ["refund", "response", "[refund-received]"],
18
+ ["donate", "response", "[donation-received]"],
19
+ ["get_authentication_result", "threeDS2Result", {"transStatus" => "Y"}],
20
+ ["retrieve_3ds2_result", "threeDS2Result", {"transStatus" => "Y"}],
21
+ ["technical_cancel", "originalReference", "9914694372990637"],
22
+ ["void_pending_refund", "pspReference", "9914694372990637"]
18
23
  ]
19
24
 
20
25
  generate_tests(client, "Payment", test_sets, client.payments)
data/spec/payouts_spec.rb CHANGED
@@ -11,7 +11,8 @@ RSpec.describe Adyen::Payments, service: "payouts service" do
11
11
  ["store_detail_and_submit_third_party", "resultCode", "[payout-submit-received]"],
12
12
  ["submit_third_party", "resultCode", "[payout-submit-received]"],
13
13
  ["confirm_third_party", "response", "[payout-confirm-received]"],
14
- ["decline_third_party", "response", "[payout-decline-received]"]
14
+ ["decline_third_party", "response", "[payout-decline-received]"],
15
+ ["payout", "resultCode", "Success"]
15
16
  ]
16
17
 
17
18
  generate_tests(client, "Payout", test_sets, client.payouts)
@@ -0,0 +1,16 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Adyen::PosTerminalManagement, service: "POS Terminal Management service" do
4
+ # client instance to be used in dynamically generated tests
5
+ client = create_client(:basic)
6
+
7
+ # methods / values to test for
8
+ # format is defined in spec_helper
9
+ test_sets = [
10
+ ["find_terminal", "merchantAccount", "TestMerchant"],
11
+ ["get_terminals_under_account", "merchantAccounts", [{ "merchantAccount" => "TestMerchant", "inStoreTerminals" => ["P400Plus-123456789"] }]],
12
+ ["assign_terminals", "results", { "e285-123456789" => "Done" }]
13
+ ]
14
+
15
+ generate_tests(client, "Terminal", test_sets, client.postfmapi)
16
+ end
@@ -10,7 +10,8 @@ RSpec.describe Adyen::Payments, service: "recurring service" do
10
10
  test_sets = [
11
11
  ["list_recurring_details", "creationDate", "2017-03-01T11:53:11+01:00"],
12
12
  ["disable", "response", "[detail-successfully-disabled]"],
13
- ["store_token", "result", "Success"]
13
+ ["store_token", "result", "Success"],
14
+ ["schedule_account_updater", "result", "Success"]
14
15
  ]
15
16
 
16
17
  generate_tests(client, "Recurring", test_sets, client.recurring)
data/spec/service_spec.rb CHANGED
@@ -18,7 +18,9 @@ RSpec.describe Adyen::Service do
18
18
  expect(described_class.action_for_method_name(:decline_third_party)).to eq 'declineThirdParty'
19
19
  expect(described_class.action_for_method_name(:delete_bank_accounts)).to eq 'deleteBankAccounts'
20
20
  expect(described_class.action_for_method_name(:delete_shareholders)).to eq 'deleteShareholders'
21
+ expect(described_class.action_for_method_name(:delete_signatories)).to eq 'deleteSignatories'
21
22
  expect(described_class.action_for_method_name(:disable)).to eq 'disable'
23
+ expect(described_class.action_for_method_name(:donate)).to eq 'donate'
22
24
  expect(described_class.action_for_method_name(:get_account_holder)).to eq 'getAccountHolder'
23
25
  expect(described_class.action_for_method_name(:get_tier_configuration)).to eq 'getTierConfiguration'
24
26
  expect(described_class.action_for_method_name(:get_uploaded_documents)).to eq 'getUploadedDocuments'
@@ -26,6 +28,7 @@ RSpec.describe Adyen::Service do
26
28
  expect(described_class.action_for_method_name(:origin_keys)).to eq 'originKeys'
27
29
  expect(described_class.action_for_method_name(:payment_methods)).to eq 'paymentMethods'
28
30
  expect(described_class.action_for_method_name(:payment_session)).to eq 'paymentSession'
31
+ expect(described_class.action_for_method_name(:payment_links)).to eq 'paymentLinks'
29
32
  expect(described_class.action_for_method_name(:refund)).to eq 'refund'
30
33
  expect(described_class.action_for_method_name(:store_detail)).to eq 'storeDetail'
31
34
  expect(described_class.action_for_method_name(:store_detail_and_submit_third_party)).to eq 'storeDetailAndSubmitThirdParty'
@@ -37,6 +40,7 @@ RSpec.describe Adyen::Service do
37
40
  expect(described_class.action_for_method_name(:update_account_holder)).to eq 'updateAccountHolder'
38
41
  expect(described_class.action_for_method_name(:update_account_holder_state)).to eq 'updateAccountHolderState'
39
42
  expect(described_class.action_for_method_name(:upload_document)).to eq 'uploadDocument'
43
+ expect(described_class.action_for_method_name(:get_onboarding_url)).to eq 'getOnboardingUrl'
40
44
  end
41
45
  end
42
46
  end
data/spec/spec_helper.rb CHANGED
@@ -18,20 +18,26 @@ def create_test(client, service, method_name, parent_object)
18
18
  request_body = JSON.parse(json_from_file("mocks/requests/#{service}/#{method_name}.json"))
19
19
  response_body = json_from_file("mocks/responses/#{service}/#{method_name}.json")
20
20
 
21
-
22
- if service == 'Checkout' || service == 'CheckoutUtility'
21
+ with_application_info = [
22
+ "authorise",
23
+ "authorise3d",
24
+ "authorise3ds2",
25
+ "payments",
26
+ "payment_session",
27
+ ]
28
+ if with_application_info.include?(method_name)
23
29
  client.add_application_info(request_body)
24
30
  end
25
31
 
26
32
  # client-generated headers
27
33
  headers = {
28
- 'Content-Type'.to_sym => 'application/json'
34
+ "Content-Type".to_sym => "application/json",
29
35
  }
30
36
 
31
37
  # authentication headers
32
- if not client.api_key.nil? then
38
+ if not client.api_key.nil?
33
39
  headers["x-api-key"] = client.api_key
34
- elsif not client.ws_user.nil? and not client.ws_password.nil? then
40
+ elsif not client.ws_user.nil? and not client.ws_password.nil?
35
41
  auth_header = "Basic " + Base64::encode64("#{client.ws_user}:#{client.ws_password}")
36
42
  headers["Authorization"] = auth_header.strip
37
43
  else
@@ -43,12 +49,12 @@ def create_test(client, service, method_name, parent_object)
43
49
  url = client.service_url(service, action, parent_object.version)
44
50
  WebMock.stub_request(:post, url).
45
51
  with(
46
- body: request_body,
47
- headers: headers
48
- ).
52
+ body: request_body,
53
+ headers: headers,
54
+ ).
49
55
  to_return(
50
- body: response_body
51
- )
56
+ body: response_body,
57
+ )
52
58
  result = parent_object.public_send(method_name, request_body)
53
59
 
54
60
  # result.response is already a Ruby object (Adyen::HashWithAccessors) (rather than an unparsed JSON string)
@@ -86,10 +92,10 @@ def create_client(auth_type)
86
92
  client = Adyen::Client.new
87
93
  client.env = :mock
88
94
 
89
- if auth_type == :basic then
95
+ if auth_type == :basic
90
96
  client.ws_user = "user"
91
97
  client.ws_password = "password"
92
- elsif auth_type == :api_key then
98
+ elsif auth_type == :api_key
93
99
  client.api_key = "api_key"
94
100
  else
95
101
  raise ArgumentError "Invalid auth type for test client"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adyen-ruby-api-library
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-09 00:00:00.000000000 Z
11
+ date: 2021-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -76,8 +76,14 @@ executables: []
76
76
  extensions: []
77
77
  extra_rdoc_files: []
78
78
  files:
79
+ - ".github/CODEOWNERS"
80
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
81
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
82
+ - ".github/PULL_REQUEST_TEMPLATE.md"
83
+ - ".github/dependabot.yml"
84
+ - ".github/workflows/ruby.yml"
79
85
  - ".gitignore"
80
- - ".travis.yml"
86
+ - CODE_OF_CONDUCT.md
81
87
  - CONTRIBUTING.md
82
88
  - Gemfile
83
89
  - LICENSE
@@ -105,28 +111,38 @@ files:
105
111
  - lib/adyen/errors.rb
106
112
  - lib/adyen/hash_with_accessors.rb
107
113
  - lib/adyen/result.rb
114
+ - lib/adyen/services/bin_lookup.rb
108
115
  - lib/adyen/services/checkout.rb
109
- - lib/adyen/services/checkout_utility.rb
116
+ - lib/adyen/services/data_protection.rb
117
+ - lib/adyen/services/dispute.rb
110
118
  - lib/adyen/services/marketpay.rb
111
119
  - lib/adyen/services/payments.rb
112
120
  - lib/adyen/services/payouts.rb
121
+ - lib/adyen/services/postfmapi.rb
113
122
  - lib/adyen/services/recurring.rb
114
123
  - lib/adyen/services/service.rb
115
124
  - lib/adyen/utils/hmac_validator.rb
116
125
  - lib/adyen/version.rb
126
+ - renovate.json
117
127
  - spec/account_spec.rb
128
+ - spec/bin_lookup_spec.rb
118
129
  - spec/checkout_spec.rb
119
- - spec/checkout_utility_spec.rb
120
130
  - spec/client_spec.rb
131
+ - spec/data_protection_spec.rb
132
+ - spec/dispute_spec.rb
121
133
  - spec/errors_spec.rb
122
134
  - spec/fund_spec.rb
123
135
  - spec/hash_with_accessors_spec.rb
136
+ - spec/hop_spec.rb
137
+ - spec/mocks/requests/Account/check_account_holder.json
124
138
  - spec/mocks/requests/Account/close_account.json
125
139
  - spec/mocks/requests/Account/close_account_holder.json
126
140
  - spec/mocks/requests/Account/create_account.json
127
141
  - spec/mocks/requests/Account/create_account_holder.json
128
142
  - spec/mocks/requests/Account/delete_bank_accounts.json
143
+ - spec/mocks/requests/Account/delete_payout_methods.json
129
144
  - spec/mocks/requests/Account/delete_shareholders.json
145
+ - spec/mocks/requests/Account/delete_signatories.json
130
146
  - spec/mocks/requests/Account/get_account_holder.json
131
147
  - spec/mocks/requests/Account/get_uploaded_documents.json
132
148
  - spec/mocks/requests/Account/suspend_account_holder.json
@@ -135,19 +151,33 @@ files:
135
151
  - spec/mocks/requests/Account/update_account_holder.json
136
152
  - spec/mocks/requests/Account/update_account_holder_state.json
137
153
  - spec/mocks/requests/Account/upload_document.json
154
+ - spec/mocks/requests/BinLookup/get_3ds_availability.json
155
+ - spec/mocks/requests/BinLookup/get_cost_estimate.json
156
+ - spec/mocks/requests/Checkout/orders.json
157
+ - spec/mocks/requests/Checkout/orders_cancel.json
158
+ - spec/mocks/requests/Checkout/origin_keys.json
138
159
  - spec/mocks/requests/Checkout/payment-details.json
139
160
  - spec/mocks/requests/Checkout/payment-result.json
161
+ - spec/mocks/requests/Checkout/payment_links.json
140
162
  - spec/mocks/requests/Checkout/payment_methods.json
163
+ - spec/mocks/requests/Checkout/payment_methods_balance.json
141
164
  - spec/mocks/requests/Checkout/payment_session.json
142
165
  - spec/mocks/requests/Checkout/payments.json
166
+ - spec/mocks/requests/Checkout/sessions.json
143
167
  - spec/mocks/requests/Checkout/verify.json
144
- - spec/mocks/requests/CheckoutUtility/origin_keys.json
168
+ - spec/mocks/requests/DataProtectionService/request_subject_erasure.json
169
+ - spec/mocks/requests/DisputeService/defend_dispute.json
170
+ - spec/mocks/requests/DisputeService/delete_dispute_defense_document.json
171
+ - spec/mocks/requests/DisputeService/retrieve_applicable_defense_reasons.json
172
+ - spec/mocks/requests/DisputeService/supply_defense_document.json
145
173
  - spec/mocks/requests/Fund/account_holder_balance.json
146
174
  - spec/mocks/requests/Fund/account_holder_transaction_list.json
147
175
  - spec/mocks/requests/Fund/payout_account_holder.json
176
+ - spec/mocks/requests/Fund/refund_funds_transfer.json
148
177
  - spec/mocks/requests/Fund/refund_not_paid_out_transfers.json
149
178
  - spec/mocks/requests/Fund/setup_beneficiary.json
150
179
  - spec/mocks/requests/Fund/transfer_funds.json
180
+ - spec/mocks/requests/Hop/get_onboarding_url.json
151
181
  - spec/mocks/requests/Notification/create_notification_configuration.json
152
182
  - spec/mocks/requests/Notification/delete_notification_configurations.json
153
183
  - spec/mocks/requests/Notification/get_notification_configuration.json
@@ -161,21 +191,34 @@ files:
161
191
  - spec/mocks/requests/Payment/cancel.json
162
192
  - spec/mocks/requests/Payment/cancel_or_refund.json
163
193
  - spec/mocks/requests/Payment/capture.json
194
+ - spec/mocks/requests/Payment/donate.json
195
+ - spec/mocks/requests/Payment/get_authentication_result.json
164
196
  - spec/mocks/requests/Payment/refund.json
197
+ - spec/mocks/requests/Payment/retrieve_3ds2_result.json
198
+ - spec/mocks/requests/Payment/technical_cancel.json
199
+ - spec/mocks/requests/Payment/void_pending_refund.json
165
200
  - spec/mocks/requests/Payout/confirm_third_party.json
166
201
  - spec/mocks/requests/Payout/decline_third_party.json
202
+ - spec/mocks/requests/Payout/payout.json
167
203
  - spec/mocks/requests/Payout/store_detail.json
168
204
  - spec/mocks/requests/Payout/store_detail_and_submit_third_party.json
169
205
  - spec/mocks/requests/Payout/submit_third_party.json
170
206
  - spec/mocks/requests/Recurring/disable.json
171
207
  - spec/mocks/requests/Recurring/list_recurring_details.json
208
+ - spec/mocks/requests/Recurring/schedule_account_updater.json
172
209
  - spec/mocks/requests/Recurring/store_token.json
210
+ - spec/mocks/requests/Terminal/assign_terminals.json
211
+ - spec/mocks/requests/Terminal/find_terminal.json
212
+ - spec/mocks/requests/Terminal/get_terminals_under_account.json
213
+ - spec/mocks/responses/Account/check_account_holder.json
173
214
  - spec/mocks/responses/Account/close_account.json
174
215
  - spec/mocks/responses/Account/close_account_holder.json
175
216
  - spec/mocks/responses/Account/create_account.json
176
217
  - spec/mocks/responses/Account/create_account_holder.json
177
218
  - spec/mocks/responses/Account/delete_bank_accounts.json
219
+ - spec/mocks/responses/Account/delete_payout_methods.json
178
220
  - spec/mocks/responses/Account/delete_shareholders.json
221
+ - spec/mocks/responses/Account/delete_signatories.json
179
222
  - spec/mocks/responses/Account/get_account_holder.json
180
223
  - spec/mocks/responses/Account/get_uploaded_documents.json
181
224
  - spec/mocks/responses/Account/suspend_account_holder.json
@@ -184,19 +227,35 @@ files:
184
227
  - spec/mocks/responses/Account/update_account_holder.json
185
228
  - spec/mocks/responses/Account/update_account_holder_state.json
186
229
  - spec/mocks/responses/Account/upload_document.json
230
+ - spec/mocks/responses/BinLookup/get_3ds_availability.json
231
+ - spec/mocks/responses/BinLookup/get_cost_estimate.json
232
+ - spec/mocks/responses/Checkout/get-payment-link.json
233
+ - spec/mocks/responses/Checkout/orders.json
234
+ - spec/mocks/responses/Checkout/orders_cancel.json
235
+ - spec/mocks/responses/Checkout/origin_keys.json
187
236
  - spec/mocks/responses/Checkout/payment-details.json
188
237
  - spec/mocks/responses/Checkout/payment-result.json
238
+ - spec/mocks/responses/Checkout/payment_links.json
189
239
  - spec/mocks/responses/Checkout/payment_methods.json
240
+ - spec/mocks/responses/Checkout/payment_methods_balance.json
190
241
  - spec/mocks/responses/Checkout/payment_session.json
191
242
  - spec/mocks/responses/Checkout/payments.json
243
+ - spec/mocks/responses/Checkout/sessions-success.json
244
+ - spec/mocks/responses/Checkout/update-payment-link.json
192
245
  - spec/mocks/responses/Checkout/verify.json
193
- - spec/mocks/responses/CheckoutUtility/origin_keys.json
246
+ - spec/mocks/responses/DataProtectionService/request_subject_erasure.json
247
+ - spec/mocks/responses/DisputeService/defend_dispute.json
248
+ - spec/mocks/responses/DisputeService/delete_dispute_defense_document.json
249
+ - spec/mocks/responses/DisputeService/retrieve_applicable_defense_reasons.json
250
+ - spec/mocks/responses/DisputeService/supply_defense_document.json
194
251
  - spec/mocks/responses/Fund/account_holder_balance.json
195
252
  - spec/mocks/responses/Fund/account_holder_transaction_list.json
196
253
  - spec/mocks/responses/Fund/payout_account_holder.json
254
+ - spec/mocks/responses/Fund/refund_funds_transfer.json
197
255
  - spec/mocks/responses/Fund/refund_not_paid_out_transfers.json
198
256
  - spec/mocks/responses/Fund/setup_beneficiary.json
199
257
  - spec/mocks/responses/Fund/transfer_funds.json
258
+ - spec/mocks/responses/Hop/get_onboarding_url.json
200
259
  - spec/mocks/responses/Notification/create_notification_configuration.json
201
260
  - spec/mocks/responses/Notification/delete_notification_configurations.json
202
261
  - spec/mocks/responses/Notification/get_notification_configuration.json
@@ -210,18 +269,29 @@ files:
210
269
  - spec/mocks/responses/Payment/cancel.json
211
270
  - spec/mocks/responses/Payment/cancel_or_refund.json
212
271
  - spec/mocks/responses/Payment/capture.json
272
+ - spec/mocks/responses/Payment/donate.json
273
+ - spec/mocks/responses/Payment/get_authentication_result.json
213
274
  - spec/mocks/responses/Payment/refund.json
275
+ - spec/mocks/responses/Payment/retrieve_3ds2_result.json
276
+ - spec/mocks/responses/Payment/technical_cancel.json
277
+ - spec/mocks/responses/Payment/void_pending_refund.json
214
278
  - spec/mocks/responses/Payout/confirm_third_party.json
215
279
  - spec/mocks/responses/Payout/decline_third_party.json
280
+ - spec/mocks/responses/Payout/payout.json
216
281
  - spec/mocks/responses/Payout/store_detail.json
217
282
  - spec/mocks/responses/Payout/store_detail_and_submit_third_party.json
218
283
  - spec/mocks/responses/Payout/submit_third_party.json
219
284
  - spec/mocks/responses/Recurring/disable.json
220
285
  - spec/mocks/responses/Recurring/list_recurring_details.json
286
+ - spec/mocks/responses/Recurring/schedule_account_updater.json
221
287
  - spec/mocks/responses/Recurring/store_token.json
288
+ - spec/mocks/responses/Terminal/assign_terminals.json
289
+ - spec/mocks/responses/Terminal/find_terminal.json
290
+ - spec/mocks/responses/Terminal/get_terminals_under_account.json
222
291
  - spec/notification_spec.rb
223
292
  - spec/payments_spec.rb
224
293
  - spec/payouts_spec.rb
294
+ - spec/postfmapi_spec.rb
225
295
  - spec/recurring_spec.rb
226
296
  - spec/service_spec.rb
227
297
  - spec/spec_helper.rb
@@ -248,8 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
318
  - !ruby/object:Gem::Version
249
319
  version: '0'
250
320
  requirements: []
251
- rubyforge_project:
252
- rubygems_version: 2.2.0
321
+ rubygems_version: 3.2.3
253
322
  signing_key:
254
323
  specification_version: 4
255
324
  summary: Official Adyen Ruby API Library
data/.travis.yml DELETED
@@ -1,14 +0,0 @@
1
- sudo: false
2
- language: ruby
3
-
4
- rvm:
5
- - 2.5
6
- - 2.4
7
- - 2.3
8
- - 2.2
9
- - 2.1
10
-
11
- notifications:
12
- email: false
13
-
14
- script: bundle exec rspec
@@ -1,29 +0,0 @@
1
- require "spec_helper"
2
- require "json"
3
-
4
- # rubocop:disable Metrics/BlockLength
5
-
6
- RSpec.describe Adyen::CheckoutUtility, service: "checkout utility" do
7
- before(:all) do
8
- @shared_values = {
9
- client: create_client(:api_key),
10
- service: "CheckoutUtility",
11
- }
12
- end
13
-
14
- it "sets the correct service URL base" do
15
- client = Adyen::Client.new(env: :test)
16
- expect(client.service_url_base(@shared_values[:service])).to eq("https://checkout-test.adyen.com/checkout")
17
- end
18
-
19
- # must be created manually because every field in the response is an array
20
- it "makes an origin_keys call" do
21
- parsed_body = create_test(@shared_values[:client], @shared_values[:service], "origin_keys", @shared_values[:client].checkout_utility)
22
- expect(parsed_body["originKeys"]).
23
- to be_a Adyen::HashWithAccessors
24
- expect(parsed_body["originKeys"]).
25
- to be_a_kind_of Hash
26
- end
27
- end
28
-
29
- # rubocop:enable Metrics/BlockLength
@@ -1,7 +0,0 @@
1
- {
2
- "originDomains": [
3
- "https://www.your-domain1.com",
4
- "https://www.your-domain2.com",
5
- "https://www.your-domain3.com"
6
- ]
7
- }