connect-sdk-ruby 4.6.0 → 5.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.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/connect-sdk-ruby.gemspec +6 -6
- data/lib/worldline/connect/sdk/communication/metadata_provider.rb +1 -1
- data/lib/worldline/connect/sdk/v1/domain/capture_payment_order.rb +9 -0
- data/lib/worldline/connect/sdk/v1/domain/capture_payment_shipping.rb +58 -0
- data/lib/worldline/connect/sdk/v1/domain/payment_product.rb +7 -0
- metadata +13 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8f1cb58509ee13a6f901b29e5da28837958cfcb1d574b3ebee1b908d654a89bb
|
|
4
|
+
data.tar.gz: d063c020e3995486220c4d72303905b98b0b6ef3c5eb6cbed9392d86798f6628
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c3d49a2225746da3328bc7f544510d3f652981ae3606a46a94102ed6a51577ce7ba0abc7429e43dc9654fcbd08c52f1f9180ba85b595a178df95cc90f3297d7d
|
|
7
|
+
data.tar.gz: 8243a73cc4b957b860a04863e28f8093ae252e8ab029216d86ce4458c940184dc66a1239a9cd99eb57888a4d0bb8d4a4ab2902bcb1fe3c509be7a1685f08531e
|
data/README.md
CHANGED
|
@@ -27,7 +27,7 @@ Note that the source code of the unit tests, integration tests and the examples
|
|
|
27
27
|
|
|
28
28
|
## Requirements
|
|
29
29
|
|
|
30
|
-
Ruby 2.
|
|
30
|
+
Ruby 2.7 or higher is required.
|
|
31
31
|
As for JRuby, version 9.0.0.0 and higher are supported.
|
|
32
32
|
In addition, the following packages are required:
|
|
33
33
|
|
|
@@ -91,11 +91,11 @@ In addition, to run the proxy integration tests, the proxy URI, username and pas
|
|
|
91
91
|
|
|
92
92
|
In order to run the unit and integration tests, some additional dependencies are required:
|
|
93
93
|
|
|
94
|
-
* [rake](https://ruby.github.io/rake/)
|
|
95
|
-
* [rspec](https://github.com/rspec/rspec) 3.
|
|
96
|
-
* [webmock](https://github.com/bblimke/webmock)
|
|
97
|
-
* [sinatra](https://github.com/sinatra/sinatra) 2
|
|
98
|
-
* [webrick](https://github.com/ruby/webrick) 1.
|
|
94
|
+
* [rake](https://ruby.github.io/rake/) 13.4 or higher
|
|
95
|
+
* [rspec](https://github.com/rspec/rspec) 3.13 or higher
|
|
96
|
+
* [webmock](https://github.com/bblimke/webmock) 3.26 or higher
|
|
97
|
+
* [sinatra](https://github.com/sinatra/sinatra) 4.2 or higher
|
|
98
|
+
* [webrick](https://github.com/ruby/webrick) 1.9 or higher
|
|
99
99
|
|
|
100
100
|
They can be installed using the following command:
|
|
101
101
|
|
|
@@ -127,7 +127,7 @@ The following commands can now be executed from the root directory of the SDK fo
|
|
|
127
127
|
|
|
128
128
|
Documentation can be generated with YARD. YARD can be installed as a gem. The gems required to generate documentation are:
|
|
129
129
|
|
|
130
|
-
* [rake](https://ruby.github.io/rake/)
|
|
130
|
+
* [rake](https://ruby.github.io/rake/) 13.4 or higher
|
|
131
131
|
* [yard](https://github.com/lsegal/yard) 0.9.5 or higher
|
|
132
132
|
|
|
133
133
|
They can be installed using the following command:
|
data/connect-sdk-ruby.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |spec|
|
|
2
2
|
spec.name = 'connect-sdk-ruby'
|
|
3
|
-
spec.version = '
|
|
3
|
+
spec.version = '5.0.0'
|
|
4
4
|
spec.authors = ['Worldline Global Collect']
|
|
5
5
|
spec.email = ['github.connect@worldline.com']
|
|
6
6
|
spec.summary = %q{SDK to communicate with the Worldline Global Collect platform using the Worldline Connect Server API}
|
|
@@ -21,10 +21,10 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.add_dependency 'concurrent-ruby', '~>1.0'
|
|
22
22
|
|
|
23
23
|
spec.add_development_dependency 'yard', '~> 0.9'
|
|
24
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
|
25
|
-
spec.add_development_dependency 'webmock', '~>
|
|
26
|
-
spec.add_development_dependency 'sinatra', '~> 2
|
|
27
|
-
spec.add_development_dependency 'webrick', '~> 1.
|
|
28
|
-
spec.add_development_dependency 'rake', '~>
|
|
24
|
+
spec.add_development_dependency 'rspec', '~> 3.13'
|
|
25
|
+
spec.add_development_dependency 'webmock', '~> 3.26'
|
|
26
|
+
spec.add_development_dependency 'sinatra', '~> 4.2'
|
|
27
|
+
spec.add_development_dependency 'webrick', '~> 1.9'
|
|
28
|
+
spec.add_development_dependency 'rake', '~> 13.4'
|
|
29
29
|
# spec.metadata['yard.run'] = 'yri' # compiles yard doc on install
|
|
30
30
|
end
|
|
@@ -14,7 +14,7 @@ module Worldline
|
|
|
14
14
|
class MetadataProvider
|
|
15
15
|
private
|
|
16
16
|
|
|
17
|
-
SDK_VERSION = '
|
|
17
|
+
SDK_VERSION = '5.0.0'.freeze
|
|
18
18
|
SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'.freeze
|
|
19
19
|
PROHIBITED_HEADERS = [SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key','Date', 'Content-Type', 'Authorization'].sort!.freeze
|
|
20
20
|
CHARSET = 'utf-8'.freeze
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
require 'worldline/connect/sdk/domain/data_object'
|
|
6
6
|
require 'worldline/connect/sdk/v1/domain/capture_payment_order_additional_input'
|
|
7
7
|
require 'worldline/connect/sdk/v1/domain/capture_payment_order_references'
|
|
8
|
+
require 'worldline/connect/sdk/v1/domain/capture_payment_shipping'
|
|
8
9
|
|
|
9
10
|
module Worldline
|
|
10
11
|
module Connect
|
|
@@ -13,17 +14,21 @@ module Worldline
|
|
|
13
14
|
module Domain
|
|
14
15
|
# @attr [Worldline::Connect::SDK::V1::Domain::CapturePaymentOrderAdditionalInput] additional_input
|
|
15
16
|
# @attr [Worldline::Connect::SDK::V1::Domain::CapturePaymentOrderReferences] references
|
|
17
|
+
# @attr [Worldline::Connect::SDK::V1::Domain::CapturePaymentShipping] shipping
|
|
16
18
|
class CapturePaymentOrder < Worldline::Connect::SDK::Domain::DataObject
|
|
17
19
|
|
|
18
20
|
attr_accessor :additional_input
|
|
19
21
|
|
|
20
22
|
attr_accessor :references
|
|
21
23
|
|
|
24
|
+
attr_accessor :shipping
|
|
25
|
+
|
|
22
26
|
# @return (Hash)
|
|
23
27
|
def to_h
|
|
24
28
|
hash = super
|
|
25
29
|
hash['additionalInput'] = @additional_input.to_h unless @additional_input.nil?
|
|
26
30
|
hash['references'] = @references.to_h unless @references.nil?
|
|
31
|
+
hash['shipping'] = @shipping.to_h unless @shipping.nil?
|
|
27
32
|
hash
|
|
28
33
|
end
|
|
29
34
|
|
|
@@ -37,6 +42,10 @@ module Worldline
|
|
|
37
42
|
raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
|
|
38
43
|
@references = Worldline::Connect::SDK::V1::Domain::CapturePaymentOrderReferences.new_from_hash(hash['references'])
|
|
39
44
|
end
|
|
45
|
+
if hash.has_key? 'shipping'
|
|
46
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['shipping']] unless hash['shipping'].is_a? Hash
|
|
47
|
+
@shipping = Worldline::Connect::SDK::V1::Domain::CapturePaymentShipping.new_from_hash(hash['shipping'])
|
|
48
|
+
end
|
|
40
49
|
end
|
|
41
50
|
end
|
|
42
51
|
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This class was auto-generated from the API references found at
|
|
3
|
+
# https://apireference.connect.worldline-solutions.com/
|
|
4
|
+
#
|
|
5
|
+
require 'worldline/connect/sdk/domain/data_object'
|
|
6
|
+
require 'worldline/connect/sdk/v1/domain/address_personal'
|
|
7
|
+
|
|
8
|
+
module Worldline
|
|
9
|
+
module Connect
|
|
10
|
+
module SDK
|
|
11
|
+
module V1
|
|
12
|
+
module Domain
|
|
13
|
+
# @attr [Worldline::Connect::SDK::V1::Domain::AddressPersonal] address
|
|
14
|
+
# @attr [String] email_address
|
|
15
|
+
# @attr [String] shipped_from_zip
|
|
16
|
+
# @attr [String] tracking_number
|
|
17
|
+
class CapturePaymentShipping < Worldline::Connect::SDK::Domain::DataObject
|
|
18
|
+
|
|
19
|
+
attr_accessor :address
|
|
20
|
+
|
|
21
|
+
attr_accessor :email_address
|
|
22
|
+
|
|
23
|
+
attr_accessor :shipped_from_zip
|
|
24
|
+
|
|
25
|
+
attr_accessor :tracking_number
|
|
26
|
+
|
|
27
|
+
# @return (Hash)
|
|
28
|
+
def to_h
|
|
29
|
+
hash = super
|
|
30
|
+
hash['address'] = @address.to_h unless @address.nil?
|
|
31
|
+
hash['emailAddress'] = @email_address unless @email_address.nil?
|
|
32
|
+
hash['shippedFromZip'] = @shipped_from_zip unless @shipped_from_zip.nil?
|
|
33
|
+
hash['trackingNumber'] = @tracking_number unless @tracking_number.nil?
|
|
34
|
+
hash
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def from_hash(hash)
|
|
38
|
+
super
|
|
39
|
+
if hash.has_key? 'address'
|
|
40
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['address']] unless hash['address'].is_a? Hash
|
|
41
|
+
@address = Worldline::Connect::SDK::V1::Domain::AddressPersonal.new_from_hash(hash['address'])
|
|
42
|
+
end
|
|
43
|
+
if hash.has_key? 'emailAddress'
|
|
44
|
+
@email_address = hash['emailAddress']
|
|
45
|
+
end
|
|
46
|
+
if hash.has_key? 'shippedFromZip'
|
|
47
|
+
@shipped_from_zip = hash['shippedFromZip']
|
|
48
|
+
end
|
|
49
|
+
if hash.has_key? 'trackingNumber'
|
|
50
|
+
@tracking_number = hash['trackingNumber']
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -21,6 +21,7 @@ module Worldline
|
|
|
21
21
|
# @attr [String] acquirer_country
|
|
22
22
|
# @attr [true/false] allows_click_to_pay
|
|
23
23
|
# @attr [true/false] allows_installments
|
|
24
|
+
# @attr [true/false] allows_multiple_partial_captures
|
|
24
25
|
# @attr [true/false] allows_recurring
|
|
25
26
|
# @attr [true/false] allows_tokenization
|
|
26
27
|
# @attr [Worldline::Connect::SDK::V1::Domain::AuthenticationIndicator] authentication_indicator
|
|
@@ -54,6 +55,8 @@ module Worldline
|
|
|
54
55
|
|
|
55
56
|
attr_accessor :allows_installments
|
|
56
57
|
|
|
58
|
+
attr_accessor :allows_multiple_partial_captures
|
|
59
|
+
|
|
57
60
|
attr_accessor :allows_recurring
|
|
58
61
|
|
|
59
62
|
attr_accessor :allows_tokenization
|
|
@@ -107,6 +110,7 @@ module Worldline
|
|
|
107
110
|
hash['acquirerCountry'] = @acquirer_country unless @acquirer_country.nil?
|
|
108
111
|
hash['allowsClickToPay'] = @allows_click_to_pay unless @allows_click_to_pay.nil?
|
|
109
112
|
hash['allowsInstallments'] = @allows_installments unless @allows_installments.nil?
|
|
113
|
+
hash['allowsMultiplePartialCaptures'] = @allows_multiple_partial_captures unless @allows_multiple_partial_captures.nil?
|
|
110
114
|
hash['allowsRecurring'] = @allows_recurring unless @allows_recurring.nil?
|
|
111
115
|
hash['allowsTokenization'] = @allows_tokenization unless @allows_tokenization.nil?
|
|
112
116
|
hash['authenticationIndicator'] = @authentication_indicator.to_h unless @authentication_indicator.nil?
|
|
@@ -151,6 +155,9 @@ module Worldline
|
|
|
151
155
|
if hash.has_key? 'allowsInstallments'
|
|
152
156
|
@allows_installments = hash['allowsInstallments']
|
|
153
157
|
end
|
|
158
|
+
if hash.has_key? 'allowsMultiplePartialCaptures'
|
|
159
|
+
@allows_multiple_partial_captures = hash['allowsMultiplePartialCaptures']
|
|
160
|
+
end
|
|
154
161
|
if hash.has_key? 'allowsRecurring'
|
|
155
162
|
@allows_recurring = hash['allowsRecurring']
|
|
156
163
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: connect-sdk-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 5.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Worldline Global Collect
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-06-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httpclient
|
|
@@ -58,76 +58,70 @@ dependencies:
|
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '3.
|
|
61
|
+
version: '3.13'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '3.
|
|
68
|
+
version: '3.13'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: webmock
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - "~>"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '
|
|
75
|
+
version: '3.26'
|
|
76
76
|
type: :development
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '
|
|
82
|
+
version: '3.26'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: sinatra
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '2
|
|
89
|
+
version: '4.2'
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '2
|
|
96
|
+
version: '4.2'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: webrick
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '1.
|
|
103
|
+
version: '1.9'
|
|
104
104
|
type: :development
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '1.
|
|
110
|
+
version: '1.9'
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
112
|
name: rake
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
115
|
- - "~>"
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '
|
|
118
|
-
- - ">="
|
|
119
|
-
- !ruby/object:Gem::Version
|
|
120
|
-
version: 12.3.3
|
|
117
|
+
version: '13.4'
|
|
121
118
|
type: :development
|
|
122
119
|
prerelease: false
|
|
123
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
124
121
|
requirements:
|
|
125
122
|
- - "~>"
|
|
126
123
|
- !ruby/object:Gem::Version
|
|
127
|
-
version: '
|
|
128
|
-
- - ">="
|
|
129
|
-
- !ruby/object:Gem::Version
|
|
130
|
-
version: 12.3.3
|
|
124
|
+
version: '13.4'
|
|
131
125
|
description: SDK to communicate with the Worldline Global Collect platform using the
|
|
132
126
|
Worldline Connect Server API
|
|
133
127
|
email:
|
|
@@ -341,6 +335,7 @@ files:
|
|
|
341
335
|
- lib/worldline/connect/sdk/v1/domain/capture_payment_order_additional_input.rb
|
|
342
336
|
- lib/worldline/connect/sdk/v1/domain/capture_payment_order_references.rb
|
|
343
337
|
- lib/worldline/connect/sdk/v1/domain/capture_payment_request.rb
|
|
338
|
+
- lib/worldline/connect/sdk/v1/domain/capture_payment_shipping.rb
|
|
344
339
|
- lib/worldline/connect/sdk/v1/domain/capture_response.rb
|
|
345
340
|
- lib/worldline/connect/sdk/v1/domain/capture_status_output.rb
|
|
346
341
|
- lib/worldline/connect/sdk/v1/domain/captures_response.rb
|