adyen-ruby-api-library 6.1.0 → 6.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rubygems_release.yml +19 -0
- data/lib/adyen/client.rb +4 -3
- data/lib/adyen/services/checkout.rb +42 -0
- data/lib/adyen/version.rb +1 -1
- data/spec/checkout_spec.rb +192 -0
- data/spec/client_spec.rb +27 -0
- data/spec/mocks/requests/Checkout/amount_updates.json +22 -0
- data/spec/mocks/requests/Checkout/capture.json +34 -0
- data/spec/mocks/requests/Checkout/generic_cancel.json +5 -0
- data/spec/mocks/requests/Checkout/modifications_request.json +0 -0
- data/spec/mocks/requests/Checkout/psp_cancel.json +4 -0
- data/spec/mocks/requests/Checkout/refund.json +34 -0
- data/spec/mocks/responses/Checkout/amount_updates.json +24 -0
- data/spec/mocks/responses/Checkout/capture.json +37 -0
- data/spec/mocks/responses/Checkout/generic_cancel.json +7 -0
- data/spec/mocks/responses/Checkout/modifications.json +0 -0
- data/spec/mocks/responses/Checkout/psp_cancel.json +7 -0
- data/spec/mocks/responses/Checkout/refund.json +37 -0
- metadata +16 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b091a2aaf201f3a22b41a22c069321d1d181daee6e33da275d94ab970b9b9ab
|
4
|
+
data.tar.gz: 1806d42c9f609c9ff3b6e84e31ff1be9f4d4503d15f5a0c300a664a779a5c295
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9c9221b5d0c164cd4a90c5d7e6531e6361c116e00139662fcff37588309c07c21740d8a3c277ec4b7febbad4d5af752a772eab0df5625430f66b3b47fcbfc92
|
7
|
+
data.tar.gz: 4b89bec481b6b2e900325a9f9bc11a69e87b42d61a1358205e53d3a17f90c722377e4fdf7accafc11124ac2e4d70d88b36cdd214cb5f9b7d576e216d9ca6b31b
|
@@ -0,0 +1,19 @@
|
|
1
|
+
name: Publish Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
release:
|
5
|
+
types: [published]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
build:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v1
|
13
|
+
|
14
|
+
- name: Release Gem on RubyGems
|
15
|
+
if: contains(github.ref, 'refs/tags/v')
|
16
|
+
uses: cadwallion/publish-rubygems-action@master
|
17
|
+
env:
|
18
|
+
GITHUB_TOKEN: ${{secrets.TOKEN_RUBYGEMS_RELEASES_WITH_EXPIRATION}}
|
19
|
+
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
|
data/lib/adyen/client.rb
CHANGED
@@ -6,9 +6,9 @@ require_relative "./result"
|
|
6
6
|
module Adyen
|
7
7
|
class Client
|
8
8
|
attr_accessor :ws_user, :ws_password, :api_key, :client, :adapter, :live_url_prefix
|
9
|
-
attr_reader :env
|
9
|
+
attr_reader :env, :connection_options
|
10
10
|
|
11
|
-
def initialize(ws_user: nil, ws_password: nil, api_key: nil, env: :live, adapter: nil, mock_port: 3001, live_url_prefix: nil, mock_service_url_base: nil)
|
11
|
+
def initialize(ws_user: nil, ws_password: nil, api_key: nil, env: :live, adapter: nil, mock_port: 3001, live_url_prefix: nil, mock_service_url_base: nil, connection_options: nil)
|
12
12
|
@ws_user = ws_user
|
13
13
|
@ws_password = ws_password
|
14
14
|
@api_key = api_key
|
@@ -16,6 +16,7 @@ module Adyen
|
|
16
16
|
@adapter = adapter || Faraday.default_adapter
|
17
17
|
@mock_service_url_base = mock_service_url_base || "http://localhost:#{mock_port}"
|
18
18
|
@live_url_prefix = live_url_prefix
|
19
|
+
@connection_options = connection_options || Faraday::ConnectionOptions.new
|
19
20
|
end
|
20
21
|
|
21
22
|
# make sure that env can only be :live, :test, or :mock
|
@@ -96,7 +97,7 @@ module Adyen
|
|
96
97
|
end
|
97
98
|
|
98
99
|
# initialize Faraday connection object
|
99
|
-
conn = Faraday.new(url
|
100
|
+
conn = Faraday.new(url, @connection_options) do |faraday|
|
100
101
|
faraday.adapter @adapter
|
101
102
|
faraday.headers["Content-Type"] = "application/json"
|
102
103
|
faraday.headers["User-Agent"] = Adyen::NAME + "/" + Adyen::VERSION
|
@@ -71,6 +71,10 @@ module Adyen
|
|
71
71
|
def apple_pay
|
72
72
|
@apple_pay ||= Adyen::CheckoutApplePay.new(@client, @version)
|
73
73
|
end
|
74
|
+
|
75
|
+
def modifications
|
76
|
+
@modifications ||= Adyen::Modifications.new(@client, @version)
|
77
|
+
end
|
74
78
|
end
|
75
79
|
|
76
80
|
class CheckoutDetail < Service
|
@@ -147,4 +151,42 @@ module Adyen
|
|
147
151
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
148
152
|
end
|
149
153
|
end
|
154
|
+
|
155
|
+
class Modifications < Service
|
156
|
+
def initialize(client, version = DEFAULT_VERSION)
|
157
|
+
@service = "Checkout"
|
158
|
+
@client = client
|
159
|
+
@version = version
|
160
|
+
end
|
161
|
+
|
162
|
+
def capture(linkId, request, headers = {})
|
163
|
+
action = "payments/" + linkId + "/captures"
|
164
|
+
@client.call_adyen_api(@service, action, request, headers, @version, false)
|
165
|
+
end
|
166
|
+
|
167
|
+
def cancel(linkId, request, headers = {})
|
168
|
+
action = "payments/" + linkId + "/cancels"
|
169
|
+
@client.call_adyen_api(@service, action, request, headers, @version, false)
|
170
|
+
end
|
171
|
+
|
172
|
+
def genericCancel(request, headers = {})
|
173
|
+
action = "cancels"
|
174
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
175
|
+
end
|
176
|
+
|
177
|
+
def refund(linkId, request, headers = {})
|
178
|
+
action = "payments/" + linkId + "/refunds"
|
179
|
+
@client.call_adyen_api(@service, action, request, headers, @version, false)
|
180
|
+
end
|
181
|
+
|
182
|
+
def reversal(linkId, request, headers = {})
|
183
|
+
action = "payments/" + linkId + "/reversals"
|
184
|
+
@client.call_adyen_api(@service, action, request, headers, @version, false)
|
185
|
+
end
|
186
|
+
|
187
|
+
def amountUpdate(linkId, request, headers = {})
|
188
|
+
action = "payments/" + linkId + "/amountUpdates"
|
189
|
+
@client.call_adyen_api(@service, action, request, headers, @version, false)
|
190
|
+
end
|
191
|
+
end
|
150
192
|
end
|
data/lib/adyen/version.rb
CHANGED
data/spec/checkout_spec.rb
CHANGED
@@ -405,6 +405,198 @@ RSpec.describe Adyen::Checkout, service: "checkout" do
|
|
405
405
|
to be_a_kind_of Hash
|
406
406
|
end
|
407
407
|
|
408
|
+
it "makes a capture call" do
|
409
|
+
request_body = JSON.parse(json_from_file("mocks/requests/Checkout/capture.json"))
|
410
|
+
|
411
|
+
response_body = json_from_file("mocks/responses/Checkout/capture.json")
|
412
|
+
|
413
|
+
url = @shared_values[:client].service_url(@shared_values[:service], "payments/12345/captures", @shared_values[:client].checkout.version)
|
414
|
+
WebMock.stub_request(:post, url).
|
415
|
+
with(
|
416
|
+
body: request_body,
|
417
|
+
headers: {
|
418
|
+
"x-api-key" => @shared_values[:client].api_key
|
419
|
+
}
|
420
|
+
)
|
421
|
+
.to_return(body: response_body, status: 201)
|
422
|
+
|
423
|
+
result = @shared_values[:client].checkout.modifications.capture("12345", request_body)
|
424
|
+
response_hash = result.response
|
425
|
+
|
426
|
+
expect(result.status).
|
427
|
+
to eq(201)
|
428
|
+
expect(response_hash).
|
429
|
+
to eq(JSON.parse(response_body))
|
430
|
+
expect(response_hash).
|
431
|
+
to be_a Adyen::HashWithAccessors
|
432
|
+
expect(response_hash).
|
433
|
+
to be_a_kind_of Hash
|
434
|
+
expect(response_hash.reference).
|
435
|
+
to eq("123456789")
|
436
|
+
expect(response_hash.pspReference).
|
437
|
+
to eq("12345")
|
438
|
+
end
|
439
|
+
|
440
|
+
it "makes a psp specific cancel call" do
|
441
|
+
request_body = JSON.parse(json_from_file("mocks/requests/Checkout/psp_cancel.json"))
|
442
|
+
|
443
|
+
response_body = json_from_file("mocks/responses/Checkout/psp_cancel.json")
|
444
|
+
|
445
|
+
url = @shared_values[:client].service_url(@shared_values[:service], "payments/12345/cancels", @shared_values[:client].checkout.version)
|
446
|
+
WebMock.stub_request(:post, url).
|
447
|
+
with(
|
448
|
+
body: request_body,
|
449
|
+
headers: {
|
450
|
+
"x-api-key" => @shared_values[:client].api_key
|
451
|
+
}
|
452
|
+
)
|
453
|
+
.to_return(body: response_body, status: 201)
|
454
|
+
|
455
|
+
result = @shared_values[:client].checkout.modifications.cancel("12345", request_body)
|
456
|
+
response_hash = result.response
|
457
|
+
|
458
|
+
expect(result.status).
|
459
|
+
to eq(201)
|
460
|
+
expect(response_hash).
|
461
|
+
to eq(JSON.parse(response_body))
|
462
|
+
expect(response_hash).
|
463
|
+
to be_a Adyen::HashWithAccessors
|
464
|
+
expect(response_hash).
|
465
|
+
to be_a_kind_of Hash
|
466
|
+
expect(response_hash.reference).
|
467
|
+
to eq("123456789")
|
468
|
+
expect(response_hash.pspReference).
|
469
|
+
to eq("12345")
|
470
|
+
end
|
471
|
+
|
472
|
+
it "makes a psp specific refunds call" do
|
473
|
+
request_body = JSON.parse(json_from_file("mocks/requests/Checkout/refund.json"))
|
474
|
+
|
475
|
+
response_body = json_from_file("mocks/responses/Checkout/refund.json")
|
476
|
+
|
477
|
+
url = @shared_values[:client].service_url(@shared_values[:service], "payments/12345/refunds", @shared_values[:client].checkout.version)
|
478
|
+
WebMock.stub_request(:post, url).
|
479
|
+
with(
|
480
|
+
body: request_body,
|
481
|
+
headers: {
|
482
|
+
"x-api-key" => @shared_values[:client].api_key
|
483
|
+
}
|
484
|
+
)
|
485
|
+
.to_return(body: response_body, status: 201)
|
486
|
+
|
487
|
+
result = @shared_values[:client].checkout.modifications.refund("12345", request_body)
|
488
|
+
response_hash = result.response
|
489
|
+
|
490
|
+
expect(result.status).
|
491
|
+
to eq(201)
|
492
|
+
expect(response_hash).
|
493
|
+
to eq(JSON.parse(response_body))
|
494
|
+
expect(response_hash).
|
495
|
+
to be_a Adyen::HashWithAccessors
|
496
|
+
expect(response_hash).
|
497
|
+
to be_a_kind_of Hash
|
498
|
+
expect(response_hash.reference).
|
499
|
+
to eq("123456789")
|
500
|
+
expect(response_hash.pspReference).
|
501
|
+
to eq("12345")
|
502
|
+
end
|
503
|
+
|
504
|
+
it "makes a psp specific reversals call" do
|
505
|
+
request_body = JSON.parse(json_from_file("mocks/requests/Checkout/psp_cancel.json"))
|
506
|
+
|
507
|
+
response_body = json_from_file("mocks/responses/Checkout/psp_cancel.json")
|
508
|
+
|
509
|
+
url = @shared_values[:client].service_url(@shared_values[:service], "payments/12345/reversals", @shared_values[:client].checkout.version)
|
510
|
+
WebMock.stub_request(:post, url).
|
511
|
+
with(
|
512
|
+
body: request_body,
|
513
|
+
headers: {
|
514
|
+
"x-api-key" => @shared_values[:client].api_key
|
515
|
+
}
|
516
|
+
)
|
517
|
+
.to_return(body: response_body, status: 201)
|
518
|
+
|
519
|
+
result = @shared_values[:client].checkout.modifications.reversal("12345", request_body)
|
520
|
+
response_hash = result.response
|
521
|
+
|
522
|
+
expect(result.status).
|
523
|
+
to eq(201)
|
524
|
+
expect(response_hash).
|
525
|
+
to eq(JSON.parse(response_body))
|
526
|
+
expect(response_hash).
|
527
|
+
to be_a Adyen::HashWithAccessors
|
528
|
+
expect(response_hash).
|
529
|
+
to be_a_kind_of Hash
|
530
|
+
expect(response_hash.reference).
|
531
|
+
to eq("123456789")
|
532
|
+
expect(response_hash.pspReference).
|
533
|
+
to eq("12345")
|
534
|
+
end
|
535
|
+
|
536
|
+
it "makes a psp specific amountUpdates call" do
|
537
|
+
request_body = JSON.parse(json_from_file("mocks/requests/Checkout/amount_updates.json"))
|
538
|
+
|
539
|
+
response_body = json_from_file("mocks/responses/Checkout/amount_updates.json")
|
540
|
+
|
541
|
+
url = @shared_values[:client].service_url(@shared_values[:service], "payments/12345/amountUpdates", @shared_values[:client].checkout.version)
|
542
|
+
WebMock.stub_request(:post, url).
|
543
|
+
with(
|
544
|
+
body: request_body,
|
545
|
+
headers: {
|
546
|
+
"x-api-key" => @shared_values[:client].api_key
|
547
|
+
}
|
548
|
+
)
|
549
|
+
.to_return(body: response_body, status: 201)
|
550
|
+
|
551
|
+
result = @shared_values[:client].checkout.modifications.amountUpdate("12345", request_body)
|
552
|
+
response_hash = result.response
|
553
|
+
|
554
|
+
expect(result.status).
|
555
|
+
to eq(201)
|
556
|
+
expect(response_hash).
|
557
|
+
to eq(JSON.parse(response_body))
|
558
|
+
expect(response_hash).
|
559
|
+
to be_a Adyen::HashWithAccessors
|
560
|
+
expect(response_hash).
|
561
|
+
to be_a_kind_of Hash
|
562
|
+
expect(response_hash.reference).
|
563
|
+
to eq("123456789")
|
564
|
+
expect(response_hash.pspReference).
|
565
|
+
to eq("12345")
|
566
|
+
end
|
567
|
+
|
568
|
+
it "makes a generic cancel call" do
|
569
|
+
request_body = JSON.parse(json_from_file("mocks/requests/Checkout/generic_cancel.json"))
|
570
|
+
|
571
|
+
response_body = json_from_file("mocks/responses/Checkout/generic_cancel.json")
|
572
|
+
|
573
|
+
url = @shared_values[:client].service_url(@shared_values[:service], "cancels", @shared_values[:client].checkout.version)
|
574
|
+
WebMock.stub_request(:post, url).
|
575
|
+
with(
|
576
|
+
body: request_body,
|
577
|
+
headers: {
|
578
|
+
"x-api-key" => @shared_values[:client].api_key
|
579
|
+
}
|
580
|
+
)
|
581
|
+
.to_return(body: response_body, status: 201)
|
582
|
+
|
583
|
+
result = @shared_values[:client].checkout.modifications.genericCancel(request_body)
|
584
|
+
response_hash = result.response
|
585
|
+
|
586
|
+
expect(result.status).
|
587
|
+
to eq(201)
|
588
|
+
expect(response_hash).
|
589
|
+
to eq(JSON.parse(response_body))
|
590
|
+
expect(response_hash).
|
591
|
+
to be_a Adyen::HashWithAccessors
|
592
|
+
expect(response_hash).
|
593
|
+
to be_a_kind_of Hash
|
594
|
+
expect(response_hash.reference).
|
595
|
+
to eq("123456789")
|
596
|
+
expect(response_hash.pspReference).
|
597
|
+
to eq("12345")
|
598
|
+
end
|
599
|
+
|
408
600
|
# create client for automated tests
|
409
601
|
client = create_client(:api_key)
|
410
602
|
|
data/spec/client_spec.rb
CHANGED
@@ -83,4 +83,31 @@ RSpec.describe Adyen do
|
|
83
83
|
expect(client.service_url_base("Payment")).
|
84
84
|
to eq("https://abcdef1234567890-TestCompany-pal-live.adyenpayments.com/pal/servlet")
|
85
85
|
end
|
86
|
+
|
87
|
+
it "generates a new set of ConnectionOptions when none are provided" do
|
88
|
+
expect(Faraday::ConnectionOptions).to receive(:new).and_call_original
|
89
|
+
client = Adyen::Client.new(env: :test)
|
90
|
+
end
|
91
|
+
|
92
|
+
it "uses the ConnectionOptions provided" do
|
93
|
+
connection_options = Faraday::ConnectionOptions.new
|
94
|
+
expect(Faraday::ConnectionOptions).not_to receive(:new)
|
95
|
+
client = Adyen::Client.new(env: :test, connection_options: connection_options)
|
96
|
+
end
|
97
|
+
|
98
|
+
it "initiates a Faraday connection with the provided options" do
|
99
|
+
connection_options = Faraday::ConnectionOptions.new
|
100
|
+
expect(Faraday::ConnectionOptions).not_to receive(:new)
|
101
|
+
client = Adyen::Client.new(api_key: "api_key", env: :mock, connection_options: connection_options)
|
102
|
+
|
103
|
+
mock_faraday_connection = double(Faraday::Connection)
|
104
|
+
url = client.service_url(@shared_values[:service], "payments/details", client.checkout.version)
|
105
|
+
request_body = JSON.parse(json_from_file("mocks/requests/Checkout/payment-details.json"))
|
106
|
+
mock_response = Faraday::Response.new(status: 200)
|
107
|
+
|
108
|
+
expect(Adyen::AdyenResult).to receive(:new)
|
109
|
+
expect(Faraday).to receive(:new).with("http://localhost:3001/v68/payments/details", connection_options).and_return(mock_faraday_connection)
|
110
|
+
expect(mock_faraday_connection).to receive(:post).and_return(mock_response)
|
111
|
+
client.checkout.payments.details(request_body)
|
112
|
+
end
|
86
113
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"amount": {
|
3
|
+
"currency": "str",
|
4
|
+
"value": 0
|
5
|
+
},
|
6
|
+
"merchantAccount": "TestMerchant",
|
7
|
+
"reason": "delayedCharge",
|
8
|
+
"reference": "123456789",
|
9
|
+
"splits": [
|
10
|
+
{
|
11
|
+
"account": "string",
|
12
|
+
"amount": {
|
13
|
+
"currency": "str",
|
14
|
+
"value": 0
|
15
|
+
},
|
16
|
+
"description": "string",
|
17
|
+
"reference": "string",
|
18
|
+
"type": "BalanceAccount"
|
19
|
+
}
|
20
|
+
]
|
21
|
+
}
|
22
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"amount": {
|
3
|
+
"currency": "str",
|
4
|
+
"value": 0
|
5
|
+
},
|
6
|
+
"lineItems": [
|
7
|
+
{
|
8
|
+
"amountExcludingTax": 0,
|
9
|
+
"amountIncludingTax": 0,
|
10
|
+
"description": "string",
|
11
|
+
"id": "string",
|
12
|
+
"imageUrl": "string",
|
13
|
+
"itemCategory": "string",
|
14
|
+
"productUrl": "string",
|
15
|
+
"quantity": 0,
|
16
|
+
"taxAmount": 0,
|
17
|
+
"taxPercentage": 0
|
18
|
+
}
|
19
|
+
],
|
20
|
+
"merchantAccount": "string",
|
21
|
+
"reference": "string",
|
22
|
+
"splits": [
|
23
|
+
{
|
24
|
+
"account": "string",
|
25
|
+
"amount": {
|
26
|
+
"currency": "str",
|
27
|
+
"value": 0
|
28
|
+
},
|
29
|
+
"description": "string",
|
30
|
+
"reference": "string",
|
31
|
+
"type": "BalanceAccount"
|
32
|
+
}
|
33
|
+
]
|
34
|
+
}
|
File without changes
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"amount": {
|
3
|
+
"currency": "str",
|
4
|
+
"value": 0
|
5
|
+
},
|
6
|
+
"lineItems": [
|
7
|
+
{
|
8
|
+
"amountExcludingTax": 0,
|
9
|
+
"amountIncludingTax": 0,
|
10
|
+
"description": "string",
|
11
|
+
"id": "string",
|
12
|
+
"imageUrl": "string",
|
13
|
+
"itemCategory": "string",
|
14
|
+
"productUrl": "string",
|
15
|
+
"quantity": 0,
|
16
|
+
"taxAmount": 0,
|
17
|
+
"taxPercentage": 0
|
18
|
+
}
|
19
|
+
],
|
20
|
+
"merchantAccount": "TestMerchant",
|
21
|
+
"reference": "123456789",
|
22
|
+
"splits": [
|
23
|
+
{
|
24
|
+
"account": "string",
|
25
|
+
"amount": {
|
26
|
+
"currency": "str",
|
27
|
+
"value": 0
|
28
|
+
},
|
29
|
+
"description": "string",
|
30
|
+
"reference": "string",
|
31
|
+
"type": "BalanceAccount"
|
32
|
+
}
|
33
|
+
]
|
34
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
{
|
2
|
+
"amount": {
|
3
|
+
"currency": "str",
|
4
|
+
"value": 0
|
5
|
+
},
|
6
|
+
"merchantAccount": "TestMerchant",
|
7
|
+
"paymentPspReference": "123456789",
|
8
|
+
"pspReference": "12345",
|
9
|
+
"reason": "delayedCharge",
|
10
|
+
"reference": "123456789",
|
11
|
+
"splits": [
|
12
|
+
{
|
13
|
+
"account": "string",
|
14
|
+
"amount": {
|
15
|
+
"currency": "str",
|
16
|
+
"value": 0
|
17
|
+
},
|
18
|
+
"description": "string",
|
19
|
+
"reference": "string",
|
20
|
+
"type": "BalanceAccount"
|
21
|
+
}
|
22
|
+
],
|
23
|
+
"status": "received"
|
24
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{
|
2
|
+
"amount": {
|
3
|
+
"currency": "str",
|
4
|
+
"value": 0
|
5
|
+
},
|
6
|
+
"lineItems": [
|
7
|
+
{
|
8
|
+
"amountExcludingTax": 0,
|
9
|
+
"amountIncludingTax": 0,
|
10
|
+
"description": "string",
|
11
|
+
"id": "string",
|
12
|
+
"imageUrl": "string",
|
13
|
+
"itemCategory": "string",
|
14
|
+
"productUrl": "string",
|
15
|
+
"quantity": 0,
|
16
|
+
"taxAmount": 0,
|
17
|
+
"taxPercentage": 0
|
18
|
+
}
|
19
|
+
],
|
20
|
+
"merchantAccount": "string",
|
21
|
+
"paymentPspReference": "string",
|
22
|
+
"pspReference": "12345",
|
23
|
+
"reference": "123456789",
|
24
|
+
"splits": [
|
25
|
+
{
|
26
|
+
"account": "string",
|
27
|
+
"amount": {
|
28
|
+
"currency": "str",
|
29
|
+
"value": 0
|
30
|
+
},
|
31
|
+
"description": "string",
|
32
|
+
"reference": "string",
|
33
|
+
"type": "BalanceAccount"
|
34
|
+
}
|
35
|
+
],
|
36
|
+
"status": "received"
|
37
|
+
}
|
File without changes
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{
|
2
|
+
"amount": {
|
3
|
+
"currency": "str",
|
4
|
+
"value": 0
|
5
|
+
},
|
6
|
+
"lineItems": [
|
7
|
+
{
|
8
|
+
"amountExcludingTax": 0,
|
9
|
+
"amountIncludingTax": 0,
|
10
|
+
"description": "string",
|
11
|
+
"id": "string",
|
12
|
+
"imageUrl": "string",
|
13
|
+
"itemCategory": "string",
|
14
|
+
"productUrl": "string",
|
15
|
+
"quantity": 0,
|
16
|
+
"taxAmount": 0,
|
17
|
+
"taxPercentage": 0
|
18
|
+
}
|
19
|
+
],
|
20
|
+
"merchantAccount": "TestMerchant",
|
21
|
+
"paymentPspReference": "123456789",
|
22
|
+
"pspReference": "12345",
|
23
|
+
"reference": "123456789",
|
24
|
+
"splits": [
|
25
|
+
{
|
26
|
+
"account": "string",
|
27
|
+
"amount": {
|
28
|
+
"currency": "str",
|
29
|
+
"value": 0
|
30
|
+
},
|
31
|
+
"description": "string",
|
32
|
+
"reference": "string",
|
33
|
+
"type": "BalanceAccount"
|
34
|
+
}
|
35
|
+
],
|
36
|
+
"status": "received"
|
37
|
+
}
|
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: 6.
|
4
|
+
version: 6.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
83
83
|
- ".github/dependabot.yml"
|
84
84
|
- ".github/workflows/ruby.yml"
|
85
|
+
- ".github/workflows/rubygems_release.yml"
|
85
86
|
- ".gitignore"
|
86
87
|
- CODE_OF_CONDUCT.md
|
87
88
|
- CONTRIBUTING.md
|
@@ -153,7 +154,11 @@ files:
|
|
153
154
|
- spec/mocks/requests/Account/upload_document.json
|
154
155
|
- spec/mocks/requests/BinLookup/get_3ds_availability.json
|
155
156
|
- spec/mocks/requests/BinLookup/get_cost_estimate.json
|
157
|
+
- spec/mocks/requests/Checkout/amount_updates.json
|
156
158
|
- spec/mocks/requests/Checkout/apple_pay_sessions.json
|
159
|
+
- spec/mocks/requests/Checkout/capture.json
|
160
|
+
- spec/mocks/requests/Checkout/generic_cancel.json
|
161
|
+
- spec/mocks/requests/Checkout/modifications_request.json
|
157
162
|
- spec/mocks/requests/Checkout/orders.json
|
158
163
|
- spec/mocks/requests/Checkout/orders_cancel.json
|
159
164
|
- spec/mocks/requests/Checkout/origin_keys.json
|
@@ -164,6 +169,8 @@ files:
|
|
164
169
|
- spec/mocks/requests/Checkout/payment_methods_balance.json
|
165
170
|
- spec/mocks/requests/Checkout/payment_session.json
|
166
171
|
- spec/mocks/requests/Checkout/payments.json
|
172
|
+
- spec/mocks/requests/Checkout/psp_cancel.json
|
173
|
+
- spec/mocks/requests/Checkout/refund.json
|
167
174
|
- spec/mocks/requests/Checkout/sessions.json
|
168
175
|
- spec/mocks/requests/Checkout/verify.json
|
169
176
|
- spec/mocks/requests/DataProtectionService/request_subject_erasure.json
|
@@ -230,8 +237,12 @@ files:
|
|
230
237
|
- spec/mocks/responses/Account/upload_document.json
|
231
238
|
- spec/mocks/responses/BinLookup/get_3ds_availability.json
|
232
239
|
- spec/mocks/responses/BinLookup/get_cost_estimate.json
|
240
|
+
- spec/mocks/responses/Checkout/amount_updates.json
|
233
241
|
- spec/mocks/responses/Checkout/apple_pay_sessions.json
|
242
|
+
- spec/mocks/responses/Checkout/capture.json
|
243
|
+
- spec/mocks/responses/Checkout/generic_cancel.json
|
234
244
|
- spec/mocks/responses/Checkout/get-payment-link.json
|
245
|
+
- spec/mocks/responses/Checkout/modifications.json
|
235
246
|
- spec/mocks/responses/Checkout/orders.json
|
236
247
|
- spec/mocks/responses/Checkout/orders_cancel.json
|
237
248
|
- spec/mocks/responses/Checkout/origin_keys.json
|
@@ -242,6 +253,8 @@ files:
|
|
242
253
|
- spec/mocks/responses/Checkout/payment_methods_balance.json
|
243
254
|
- spec/mocks/responses/Checkout/payment_session.json
|
244
255
|
- spec/mocks/responses/Checkout/payments.json
|
256
|
+
- spec/mocks/responses/Checkout/psp_cancel.json
|
257
|
+
- spec/mocks/responses/Checkout/refund.json
|
245
258
|
- spec/mocks/responses/Checkout/sessions-success.json
|
246
259
|
- spec/mocks/responses/Checkout/update-payment-link.json
|
247
260
|
- spec/mocks/responses/Checkout/verify.json
|
@@ -320,7 +333,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
320
333
|
- !ruby/object:Gem::Version
|
321
334
|
version: '0'
|
322
335
|
requirements: []
|
323
|
-
rubygems_version: 3.
|
336
|
+
rubygems_version: 3.3.7
|
324
337
|
signing_key:
|
325
338
|
specification_version: 4
|
326
339
|
summary: Official Adyen Ruby API Library
|