adyen-ruby-api-library 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 231b46c2247176df71d2d893aff31a84e8db8e30
4
- data.tar.gz: 097565c20054e485ed2765a6dec518067517608a
2
+ SHA256:
3
+ metadata.gz: 7629975d9074cd7d0d82d7dded2a501e0710f03cd87c07626debfe41c371af4c
4
+ data.tar.gz: e99a011f237d33a9ff8cea696cce57939dd51ab4ac4934e941aafcca09991478
5
5
  SHA512:
6
- metadata.gz: 357904495d8ec8afab0a4aef8151cf8d976572a4827c62070fb6737a9dda6f041892974688c6cd2412af6d1b9339adaaafb6799af9ffab93487be9903c6b16bc
7
- data.tar.gz: 8132cc3af9c35ac41c4e5431ca783ba4c7f1fe05be5f9e30b62f65b85203c827617f8a460162dd071ef153fbb5f97c1ccd89f86886205c86bb75dd4106a2f596
6
+ metadata.gz: f1975246c7db5330a5a1159ff7992a731cccfb31eac58a1dae7314528b90bb290802180a1ae3b4ca05d425682abc8ef10def9a5ccb1523b36c80213b3e3dabae
7
+ data.tar.gz: 63cec76ed9eb1126281fa4a43b74c1dbbf832fda0d9a02848b2a0bb6e004caec3c10bfca4818b4b67af42089b68fb171874a76de2814714694e928450e02176d
@@ -138,14 +138,17 @@ module Adyen
138
138
 
139
139
  # add application_info for analytics
140
140
  def add_application_info(request_data)
141
- external_platform = {
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] = external_platform
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
@@ -1,4 +1,4 @@
1
1
  module Adyen
2
2
  NAME = "adyen-ruby-api-library"
3
- VERSION = "3.0.0".freeze
3
+ VERSION = "3.0.1".freeze
4
4
  end
@@ -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.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-08-09 00:00:00.000000000 Z
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.2.0
245
+ rubygems_version: 2.7.8
246
246
  signing_key:
247
247
  specification_version: 4
248
248
  summary: Official Adyen Ruby API Library