adyen-ruby-api-library 3.0.0 → 3.0.1
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.
- checksums.yaml +5 -5
- data/lib/adyen/client.rb +7 -4
- data/lib/adyen/version.rb +1 -1
- data/spec/checkout_spec.rb +12 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7629975d9074cd7d0d82d7dded2a501e0710f03cd87c07626debfe41c371af4c
|
4
|
+
data.tar.gz: e99a011f237d33a9ff8cea696cce57939dd51ab4ac4934e941aafcca09991478
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1975246c7db5330a5a1159ff7992a731cccfb31eac58a1dae7314528b90bb290802180a1ae3b4ca05d425682abc8ef10def9a5ccb1523b36c80213b3e3dabae
|
7
|
+
data.tar.gz: 63cec76ed9eb1126281fa4a43b74c1dbbf832fda0d9a02848b2a0bb6e004caec3c10bfca4818b4b67af42089b68fb171874a76de2814714694e928450e02176d
|
data/lib/adyen/client.rb
CHANGED
@@ -138,14 +138,17 @@ module Adyen
|
|
138
138
|
|
139
139
|
# add application_info for analytics
|
140
140
|
def add_application_info(request_data)
|
141
|
-
|
142
|
-
:adyenLibrary => {
|
141
|
+
adyenLibrary = {
|
143
142
|
:name => Adyen::NAME,
|
144
143
|
:version => Adyen::VERSION.to_s
|
145
|
-
}
|
146
144
|
}
|
147
145
|
|
148
|
-
request_data[:applicationInfo]
|
146
|
+
if request_data[:applicationInfo].nil?
|
147
|
+
request_data[:applicationInfo] = {};
|
148
|
+
end
|
149
|
+
|
150
|
+
request_data[:applicationInfo][:adyenLibrary] = adyenLibrary
|
151
|
+
request_data[:applicationInfo][:adyenLibraryTest] = adyenLibrary
|
149
152
|
end
|
150
153
|
|
151
154
|
# services
|
data/lib/adyen/version.rb
CHANGED
data/spec/checkout_spec.rb
CHANGED
@@ -21,6 +21,12 @@ RSpec.describe Adyen::Checkout, service: "checkout" do
|
|
21
21
|
# must be created manually due to payments/details format
|
22
22
|
it "makes a payments/details call" do
|
23
23
|
request_body = JSON.parse(json_from_file("mocks/requests/Checkout/payment-details.json"))
|
24
|
+
request_body[:applicationInfo] = {}
|
25
|
+
request_body[:applicationInfo][:adyenPaymentSource] = {
|
26
|
+
:name => "adyen-test",
|
27
|
+
:version => "1.0.0",
|
28
|
+
}
|
29
|
+
|
24
30
|
@shared_values[:client].add_application_info(request_body)
|
25
31
|
|
26
32
|
response_body = json_from_file("mocks/responses/Checkout/payment-details.json")
|
@@ -38,6 +44,12 @@ RSpec.describe Adyen::Checkout, service: "checkout" do
|
|
38
44
|
)
|
39
45
|
response = @shared_values[:client].checkout.payments.details(request_body)
|
40
46
|
|
47
|
+
expect(request_body[:applicationInfo][:adyenLibrary][:name]).
|
48
|
+
to eq(Adyen::NAME)
|
49
|
+
expect(request_body[:applicationInfo][:adyenLibrary][:version]).
|
50
|
+
to eq(Adyen::VERSION)
|
51
|
+
expect(request_body[:applicationInfo][:adyenPaymentSource][:name]).
|
52
|
+
to eq("adyen-test")
|
41
53
|
expect(response.status).
|
42
54
|
to eq(200)
|
43
55
|
expect(response.body).
|
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: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -242,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
242
242
|
version: '0'
|
243
243
|
requirements: []
|
244
244
|
rubyforge_project:
|
245
|
-
rubygems_version: 2.
|
245
|
+
rubygems_version: 2.7.8
|
246
246
|
signing_key:
|
247
247
|
specification_version: 4
|
248
248
|
summary: Official Adyen Ruby API Library
|