connect-sdk-ruby 2.9.0 → 2.14.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 +4 -4
- data/connect-sdk-ruby.gemspec +2 -2
- data/examples/merchant/payments/create_payment_example.rb +5 -0
- data/examples/merchant/payments/get_payment_device_fingerprint_details_example.rb +22 -0
- data/examples/merchant/products/create_payment_product_session_example.rb +33 -0
- data/lib/ingenico/connect/sdk/communicator.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/capture/capture_output.rb +7 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_method_specific_input_hosted_checkout.rb +9 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_product302_specific_input_hosted_checkout.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb +9 -0
- data/lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb +11 -0
- data/lib/ingenico/connect/sdk/domain/payment/device_fingerprint_details.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/payment/installments.rb +55 -0
- data/lib/ingenico/connect/sdk/domain/payment/payment_output.rb +7 -0
- data/lib/ingenico/connect/sdk/domain/payment/three_d_secure_results.rb +9 -0
- data/lib/ingenico/connect/sdk/domain/product/create_payment_product_session_request.rb +34 -0
- data/lib/ingenico/connect/sdk/domain/product/create_payment_product_session_response.rb +34 -0
- data/lib/ingenico/connect/sdk/domain/product/mobile_payment_product_session302_specific_input.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/product/mobile_payment_product_session302_specific_output.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product.rb +7 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product_group.rb +7 -0
- data/lib/ingenico/connect/sdk/logging/logging_util.rb +1 -1
- data/lib/ingenico/connect/sdk/merchant/payments/payments_client.rb +31 -0
- data/lib/ingenico/connect/sdk/merchant/products/products_client.rb +33 -0
- data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
- data/spec/fixtures/resources/logging/bodyWithObjectObfuscated.json +2 -2
- data/spec/fixtures/resources/logging/bodyWithObjectOriginal.json +1 -1
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14f44856f93795c303784ff8b090d47a48351fe43c8ddb4cbb6a6a0834628d72
|
4
|
+
data.tar.gz: ff9a251e1cdb2fd53e67d74f96cc40ecbe161d9be7a998d03feaf6e305c5c490
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18cb534185d477d5009f849e87f87802e4877d5aa97c2c2139cf7282d16f7e2213f680d7c9893c9797364ab0d26b8a819b3ccce8effc0e9b07eba81e7db66af5
|
7
|
+
data.tar.gz: 752db6ff27d29118666bff3c748c350154eb3193cd90ed9864ec10eb6e08f1a364a42fd3bf3b5d9b1b184e7521924f058d70963f6951a860f875283136ef048f
|
data/README.md
CHANGED
@@ -27,9 +27,9 @@ 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.3 or higher is required.
|
31
31
|
As for JRuby, version 9.0.0.0 and higher are supported.
|
32
|
-
In addition, the following
|
32
|
+
In addition, the following packages are required:
|
33
33
|
|
34
34
|
* [httpclient](https://github.com/nahi/httpclient) 2.8 or higher
|
35
35
|
* [concurrent-ruby](https://github.com/ruby-concurrency/concurrent-ruby) 1.0 or higher
|
@@ -91,7 +91,7 @@ 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/)
|
94
|
+
* [rake](https://ruby.github.io/rake/) 12.3.3 or higher
|
95
95
|
* [rspec](https://github.com/rspec/rspec) 3.5 or higher
|
96
96
|
* [webmock](https://github.com/bblimke/webmock) 2.1 or higher
|
97
97
|
* [sinatra](https://github.com/sinatra/sinatra) 1.4 or higher
|
@@ -126,7 +126,7 @@ The following commands can now be executed from the root directory of the SDK fo
|
|
126
126
|
|
127
127
|
Documentation can be generated with YARD. YARD can be installed as a gem. The gems required to generate documentation are:
|
128
128
|
|
129
|
-
* [rake](https://ruby.github.io/rake/)
|
129
|
+
* [rake](https://ruby.github.io/rake/) 12.3.3 or higher
|
130
130
|
* [yard](https://github.com/lsegal/yard) 0.9.5 or higher
|
131
131
|
|
132
132
|
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 = '2.
|
3
|
+
spec.version = '2.14.0'
|
4
4
|
spec.authors = ['Ingenico ePayments']
|
5
5
|
spec.email = ['github@epay.ingenico.com']
|
6
6
|
spec.summary = %q{SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API}
|
@@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency 'rspec', '~> 3.5'
|
25
25
|
spec.add_development_dependency 'webmock', '~> 2.1'
|
26
26
|
spec.add_development_dependency 'sinatra', '~> 1.4'
|
27
|
-
spec.add_development_dependency 'rake', '~>
|
27
|
+
spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
|
28
28
|
# spec.metadata['yard.run'] = 'yri' # compiles yard doc on install
|
29
29
|
end
|
@@ -39,10 +39,15 @@ def example
|
|
39
39
|
card.cvv = '123'
|
40
40
|
card.expiry_date = '1220'
|
41
41
|
|
42
|
+
authentication_amount = Definitions::AmountOfMoney.new
|
43
|
+
authentication_amount.amount = 2980
|
44
|
+
authentication_amount.currency_code = 'EUR'
|
45
|
+
|
42
46
|
redirection_data = Payment::RedirectionData.new
|
43
47
|
redirection_data.return_url = 'https://hostname.myownwebsite.url'
|
44
48
|
|
45
49
|
three_d_secure = Payment::ThreeDSecure.new
|
50
|
+
three_d_secure.authentication_amount = authentication_amount
|
46
51
|
three_d_secure.authentication_flow = 'browser'
|
47
52
|
three_d_secure.challenge_canvas_size = '600x400'
|
48
53
|
three_d_secure.challenge_indicator = 'challenge-requested'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/factory'
|
6
|
+
|
7
|
+
|
8
|
+
def example
|
9
|
+
get_client do |client|
|
10
|
+
response = client.merchant('merchantId').payments.devicefingerprint('paymentId')
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def get_client
|
15
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
16
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
17
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
18
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
19
|
+
ensure
|
20
|
+
# Free networking resources when done
|
21
|
+
client.close unless client.nil?
|
22
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/factory'
|
6
|
+
require 'ingenico/connect/sdk/domain/product/create_payment_product_session_request'
|
7
|
+
require 'ingenico/connect/sdk/domain/product/mobile_payment_product_session302_specific_input'
|
8
|
+
|
9
|
+
Product = Ingenico::Connect::SDK::Domain::Product
|
10
|
+
|
11
|
+
def example
|
12
|
+
get_client do |client|
|
13
|
+
payment_product_session302_specific_input = Product::MobilePaymentProductSession302SpecificInput.new
|
14
|
+
payment_product_session302_specific_input.display_name = 'Ingenico'
|
15
|
+
payment_product_session302_specific_input.domain_name = 'pay1.secured-by-ingenico.com'
|
16
|
+
payment_product_session302_specific_input.validation_url = 'https://apple-pay-gateway-cert.apple.com/paymentservices/startSession'
|
17
|
+
|
18
|
+
body = Product::CreatePaymentProductSessionRequest.new
|
19
|
+
body.payment_product_session302_specific_input = payment_product_session302_specific_input
|
20
|
+
|
21
|
+
response = client.merchant('merchantId').products.sessions(302, body)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def get_client
|
26
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
27
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
28
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
29
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
30
|
+
ensure
|
31
|
+
# Free networking resources when done
|
32
|
+
client.close unless client.nil?
|
33
|
+
end
|
@@ -182,6 +182,10 @@ module Ingenico::Connect::SDK
|
|
182
182
|
elsif !request_body.nil?
|
183
183
|
request_headers.push(RequestHeader.new('Content-Type', 'application/json'))
|
184
184
|
body = @marshaller.marshal(request_body)
|
185
|
+
else
|
186
|
+
# Set the content-type, even though there is no body, to prevent the httpClient from
|
187
|
+
# adding a content-type header after authentication has been generated.
|
188
|
+
request_headers.push(RequestHeader.new('Content-Type', 'text/plain'))
|
185
189
|
end
|
186
190
|
|
187
191
|
add_generic_headers('POST', uri, request_headers, context)
|
@@ -227,6 +231,10 @@ module Ingenico::Connect::SDK
|
|
227
231
|
elsif !request_body.nil?
|
228
232
|
request_headers.push(RequestHeader.new('Content-Type', 'application/json'))
|
229
233
|
body = @marshaller.marshal(request_body)
|
234
|
+
else
|
235
|
+
# Set the content-type, even though there is no body, to prevent the httpClient from
|
236
|
+
# adding a content-type header after authentication has been generated.
|
237
|
+
request_headers.push(RequestHeader.new('Content-Type', 'text/plain'))
|
230
238
|
end
|
231
239
|
add_generic_headers('POST', uri, request_headers, context)
|
232
240
|
|
@@ -274,6 +282,10 @@ module Ingenico::Connect::SDK
|
|
274
282
|
elsif !request_body.nil?
|
275
283
|
request_headers.push(RequestHeader.new('Content-Type', 'application/json'))
|
276
284
|
body = @marshaller.marshal(request_body)
|
285
|
+
else
|
286
|
+
# Set the content-type, even though there is no body, to prevent the httpClient from
|
287
|
+
# adding a content-type header after authentication has been generated.
|
288
|
+
request_headers.push(RequestHeader.new('Content-Type', 'text/plain'))
|
277
289
|
end
|
278
290
|
add_generic_headers('PUT', uri, request_headers, context)
|
279
291
|
|
@@ -318,6 +330,10 @@ module Ingenico::Connect::SDK
|
|
318
330
|
elsif !request_body.nil?
|
319
331
|
request_headers.push(RequestHeader.new('Content-Type', 'application/json'))
|
320
332
|
body = @marshaller.marshal(request_body)
|
333
|
+
else
|
334
|
+
# Set the content-type, even though there is no body, to prevent the httpClient from
|
335
|
+
# adding a content-type header after authentication has been generated.
|
336
|
+
request_headers.push(RequestHeader.new('Content-Type', 'text/plain'))
|
321
337
|
end
|
322
338
|
add_generic_headers('PUT', uri, request_headers, context)
|
323
339
|
|
@@ -28,6 +28,7 @@ module Ingenico::Connect::SDK
|
|
28
28
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::MobilePaymentMethodSpecificOutput] mobile_payment_method_specific_output
|
29
29
|
# @attr [String] payment_method
|
30
30
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentMethodSpecificOutput] redirect_payment_method_specific_output
|
31
|
+
# @attr [String] reversal_reason
|
31
32
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::SepaDirectDebitPaymentMethodSpecificOutput] sepa_direct_debit_payment_method_specific_output
|
32
33
|
class CaptureOutput < Ingenico::Connect::SDK::Domain::Payment::OrderOutput
|
33
34
|
|
@@ -53,6 +54,8 @@ module Ingenico::Connect::SDK
|
|
53
54
|
|
54
55
|
attr_accessor :redirect_payment_method_specific_output
|
55
56
|
|
57
|
+
attr_accessor :reversal_reason
|
58
|
+
|
56
59
|
attr_accessor :sepa_direct_debit_payment_method_specific_output
|
57
60
|
|
58
61
|
# @return (Hash)
|
@@ -69,6 +72,7 @@ module Ingenico::Connect::SDK
|
|
69
72
|
hash['mobilePaymentMethodSpecificOutput'] = @mobile_payment_method_specific_output.to_h unless @mobile_payment_method_specific_output.nil?
|
70
73
|
hash['paymentMethod'] = @payment_method unless @payment_method.nil?
|
71
74
|
hash['redirectPaymentMethodSpecificOutput'] = @redirect_payment_method_specific_output.to_h unless @redirect_payment_method_specific_output.nil?
|
75
|
+
hash['reversalReason'] = @reversal_reason unless @reversal_reason.nil?
|
72
76
|
hash['sepaDirectDebitPaymentMethodSpecificOutput'] = @sepa_direct_debit_payment_method_specific_output.to_h unless @sepa_direct_debit_payment_method_specific_output.nil?
|
73
77
|
hash
|
74
78
|
end
|
@@ -116,6 +120,9 @@ module Ingenico::Connect::SDK
|
|
116
120
|
raise TypeError, "value '%s' is not a Hash" % [hash['redirectPaymentMethodSpecificOutput']] unless hash['redirectPaymentMethodSpecificOutput'].is_a? Hash
|
117
121
|
@redirect_payment_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentMethodSpecificOutput.new_from_hash(hash['redirectPaymentMethodSpecificOutput'])
|
118
122
|
end
|
123
|
+
if hash.has_key? 'reversalReason'
|
124
|
+
@reversal_reason = hash['reversalReason']
|
125
|
+
end
|
119
126
|
if hash.has_key? 'sepaDirectDebitPaymentMethodSpecificOutput'
|
120
127
|
raise TypeError, "value '%s' is not a Hash" % [hash['sepaDirectDebitPaymentMethodSpecificOutput']] unless hash['sepaDirectDebitPaymentMethodSpecificOutput'].is_a? Hash
|
121
128
|
@sepa_direct_debit_payment_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::SepaDirectDebitPaymentMethodSpecificOutput.new_from_hash(hash['sepaDirectDebitPaymentMethodSpecificOutput'])
|
@@ -3,26 +3,35 @@
|
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/domain/definitions/abstract_payment_method_specific_input'
|
6
|
+
require 'ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_product302_specific_input_hosted_checkout'
|
6
7
|
require 'ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_product320_specific_input_hosted_checkout'
|
7
8
|
|
8
9
|
module Ingenico::Connect::SDK
|
9
10
|
module Domain
|
10
11
|
module Hostedcheckout
|
11
12
|
|
13
|
+
# @attr [Ingenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentProduct302SpecificInputHostedCheckout] payment_product302_specific_input
|
12
14
|
# @attr [Ingenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentProduct320SpecificInputHostedCheckout] payment_product320_specific_input
|
13
15
|
class MobilePaymentMethodSpecificInputHostedCheckout < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
|
14
16
|
|
17
|
+
attr_accessor :payment_product302_specific_input
|
18
|
+
|
15
19
|
attr_accessor :payment_product320_specific_input
|
16
20
|
|
17
21
|
# @return (Hash)
|
18
22
|
def to_h
|
19
23
|
hash = super
|
24
|
+
hash['paymentProduct302SpecificInput'] = @payment_product302_specific_input.to_h unless @payment_product302_specific_input.nil?
|
20
25
|
hash['paymentProduct320SpecificInput'] = @payment_product320_specific_input.to_h unless @payment_product320_specific_input.nil?
|
21
26
|
hash
|
22
27
|
end
|
23
28
|
|
24
29
|
def from_hash(hash)
|
25
30
|
super
|
31
|
+
if hash.has_key? 'paymentProduct302SpecificInput'
|
32
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct302SpecificInput']] unless hash['paymentProduct302SpecificInput'].is_a? Hash
|
33
|
+
@payment_product302_specific_input = Ingenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentProduct302SpecificInputHostedCheckout.new_from_hash(hash['paymentProduct302SpecificInput'])
|
34
|
+
end
|
26
35
|
if hash.has_key? 'paymentProduct320SpecificInput'
|
27
36
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct320SpecificInput']] unless hash['paymentProduct320SpecificInput'].is_a? Hash
|
28
37
|
@payment_product320_specific_input = Ingenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentProduct320SpecificInputHostedCheckout.new_from_hash(hash['paymentProduct320SpecificInput'])
|
@@ -0,0 +1,32 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Hostedcheckout
|
10
|
+
|
11
|
+
# @attr [String] business_name
|
12
|
+
class MobilePaymentProduct302SpecificInputHostedCheckout < Ingenico::Connect::SDK::DataObject
|
13
|
+
|
14
|
+
attr_accessor :business_name
|
15
|
+
|
16
|
+
# @return (Hash)
|
17
|
+
def to_h
|
18
|
+
hash = super
|
19
|
+
hash['businessName'] = @business_name unless @business_name.nil?
|
20
|
+
hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def from_hash(hash)
|
24
|
+
super
|
25
|
+
if hash.has_key? 'businessName'
|
26
|
+
@business_name = hash['businessName']
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/definitions/amount_of_money'
|
6
7
|
require 'ingenico/connect/sdk/domain/payment/sdk_data_input'
|
7
8
|
require 'ingenico/connect/sdk/domain/payment/three_d_secure_data'
|
8
9
|
|
@@ -10,6 +11,7 @@ module Ingenico::Connect::SDK
|
|
10
11
|
module Domain
|
11
12
|
module Payment
|
12
13
|
|
14
|
+
# @attr [Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney] authentication_amount
|
13
15
|
# @attr [String] authentication_flow
|
14
16
|
# @attr [String] challenge_canvas_size
|
15
17
|
# @attr [String] challenge_indicator
|
@@ -19,6 +21,8 @@ module Ingenico::Connect::SDK
|
|
19
21
|
# @attr [true/false] skip_authentication
|
20
22
|
class AbstractThreeDSecure < Ingenico::Connect::SDK::DataObject
|
21
23
|
|
24
|
+
attr_accessor :authentication_amount
|
25
|
+
|
22
26
|
attr_accessor :authentication_flow
|
23
27
|
|
24
28
|
attr_accessor :challenge_canvas_size
|
@@ -36,6 +40,7 @@ module Ingenico::Connect::SDK
|
|
36
40
|
# @return (Hash)
|
37
41
|
def to_h
|
38
42
|
hash = super
|
43
|
+
hash['authenticationAmount'] = @authentication_amount.to_h unless @authentication_amount.nil?
|
39
44
|
hash['authenticationFlow'] = @authentication_flow unless @authentication_flow.nil?
|
40
45
|
hash['challengeCanvasSize'] = @challenge_canvas_size unless @challenge_canvas_size.nil?
|
41
46
|
hash['challengeIndicator'] = @challenge_indicator unless @challenge_indicator.nil?
|
@@ -48,6 +53,10 @@ module Ingenico::Connect::SDK
|
|
48
53
|
|
49
54
|
def from_hash(hash)
|
50
55
|
super
|
56
|
+
if hash.has_key? 'authenticationAmount'
|
57
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['authenticationAmount']] unless hash['authenticationAmount'].is_a? Hash
|
58
|
+
@authentication_amount = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['authenticationAmount'])
|
59
|
+
end
|
51
60
|
if hash.has_key? 'authenticationFlow'
|
52
61
|
@authentication_flow = hash['authenticationFlow']
|
53
62
|
end
|
@@ -4,6 +4,7 @@
|
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/data_object'
|
6
6
|
require 'ingenico/connect/sdk/domain/definitions/airline_data'
|
7
|
+
require 'ingenico/connect/sdk/domain/payment/installments'
|
7
8
|
require 'ingenico/connect/sdk/domain/payment/level3_summary_data'
|
8
9
|
require 'ingenico/connect/sdk/domain/payment/loan_recipient'
|
9
10
|
require 'ingenico/connect/sdk/domain/payment/order_type_information'
|
@@ -13,6 +14,7 @@ module Ingenico::Connect::SDK
|
|
13
14
|
module Payment
|
14
15
|
|
15
16
|
# @attr [Ingenico::Connect::SDK::Domain::Definitions::AirlineData] airline_data
|
17
|
+
# @attr [Ingenico::Connect::SDK::Domain::Payment::Installments] installments
|
16
18
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::Level3SummaryData] level3_summary_data
|
17
19
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::LoanRecipient] loan_recipient
|
18
20
|
# @attr [Integer] number_of_installments
|
@@ -22,12 +24,16 @@ module Ingenico::Connect::SDK
|
|
22
24
|
|
23
25
|
attr_accessor :airline_data
|
24
26
|
|
27
|
+
attr_accessor :installments
|
28
|
+
|
25
29
|
#
|
26
30
|
# @deprecated Use Order.shoppingCart.amountBreakdown instead
|
27
31
|
attr_accessor :level3_summary_data
|
28
32
|
|
29
33
|
attr_accessor :loan_recipient
|
30
34
|
|
35
|
+
#
|
36
|
+
# @deprecated Use installments.numberOfInstallments instead
|
31
37
|
attr_accessor :number_of_installments
|
32
38
|
|
33
39
|
attr_accessor :order_date
|
@@ -38,6 +44,7 @@ module Ingenico::Connect::SDK
|
|
38
44
|
def to_h
|
39
45
|
hash = super
|
40
46
|
hash['airlineData'] = @airline_data.to_h unless @airline_data.nil?
|
47
|
+
hash['installments'] = @installments.to_h unless @installments.nil?
|
41
48
|
hash['level3SummaryData'] = @level3_summary_data.to_h unless @level3_summary_data.nil?
|
42
49
|
hash['loanRecipient'] = @loan_recipient.to_h unless @loan_recipient.nil?
|
43
50
|
hash['numberOfInstallments'] = @number_of_installments unless @number_of_installments.nil?
|
@@ -52,6 +59,10 @@ module Ingenico::Connect::SDK
|
|
52
59
|
raise TypeError, "value '%s' is not a Hash" % [hash['airlineData']] unless hash['airlineData'].is_a? Hash
|
53
60
|
@airline_data = Ingenico::Connect::SDK::Domain::Definitions::AirlineData.new_from_hash(hash['airlineData'])
|
54
61
|
end
|
62
|
+
if hash.has_key? 'installments'
|
63
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['installments']] unless hash['installments'].is_a? Hash
|
64
|
+
@installments = Ingenico::Connect::SDK::Domain::Payment::Installments.new_from_hash(hash['installments'])
|
65
|
+
end
|
55
66
|
if hash.has_key? 'level3SummaryData'
|
56
67
|
raise TypeError, "value '%s' is not a Hash" % [hash['level3SummaryData']] unless hash['level3SummaryData'].is_a? Hash
|
57
68
|
@level3_summary_data = Ingenico::Connect::SDK::Domain::Payment::Level3SummaryData.new_from_hash(hash['level3SummaryData'])
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Payment
|
10
|
+
|
11
|
+
# @attr [String] payment_id
|
12
|
+
# @attr [String] raw_device_fingerprint_output
|
13
|
+
class DeviceFingerprintDetails < Ingenico::Connect::SDK::DataObject
|
14
|
+
|
15
|
+
attr_accessor :payment_id
|
16
|
+
|
17
|
+
attr_accessor :raw_device_fingerprint_output
|
18
|
+
|
19
|
+
# @return (Hash)
|
20
|
+
def to_h
|
21
|
+
hash = super
|
22
|
+
hash['paymentId'] = @payment_id unless @payment_id.nil?
|
23
|
+
hash['rawDeviceFingerprintOutput'] = @raw_device_fingerprint_output unless @raw_device_fingerprint_output.nil?
|
24
|
+
hash
|
25
|
+
end
|
26
|
+
|
27
|
+
def from_hash(hash)
|
28
|
+
super
|
29
|
+
if hash.has_key? 'paymentId'
|
30
|
+
@payment_id = hash['paymentId']
|
31
|
+
end
|
32
|
+
if hash.has_key? 'rawDeviceFingerprintOutput'
|
33
|
+
@raw_device_fingerprint_output = hash['rawDeviceFingerprintOutput']
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/definitions/amount_of_money'
|
7
|
+
|
8
|
+
module Ingenico::Connect::SDK
|
9
|
+
module Domain
|
10
|
+
module Payment
|
11
|
+
|
12
|
+
# @attr [Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney] amount_of_money_per_installment
|
13
|
+
# @attr [String] frequency_of_installments
|
14
|
+
# @attr [String] interest_rate
|
15
|
+
# @attr [Integer] number_of_installments
|
16
|
+
class Installments < Ingenico::Connect::SDK::DataObject
|
17
|
+
|
18
|
+
attr_accessor :amount_of_money_per_installment
|
19
|
+
|
20
|
+
attr_accessor :frequency_of_installments
|
21
|
+
|
22
|
+
attr_accessor :interest_rate
|
23
|
+
|
24
|
+
attr_accessor :number_of_installments
|
25
|
+
|
26
|
+
# @return (Hash)
|
27
|
+
def to_h
|
28
|
+
hash = super
|
29
|
+
hash['amountOfMoneyPerInstallment'] = @amount_of_money_per_installment.to_h unless @amount_of_money_per_installment.nil?
|
30
|
+
hash['frequencyOfInstallments'] = @frequency_of_installments unless @frequency_of_installments.nil?
|
31
|
+
hash['interestRate'] = @interest_rate unless @interest_rate.nil?
|
32
|
+
hash['numberOfInstallments'] = @number_of_installments unless @number_of_installments.nil?
|
33
|
+
hash
|
34
|
+
end
|
35
|
+
|
36
|
+
def from_hash(hash)
|
37
|
+
super
|
38
|
+
if hash.has_key? 'amountOfMoneyPerInstallment'
|
39
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoneyPerInstallment']] unless hash['amountOfMoneyPerInstallment'].is_a? Hash
|
40
|
+
@amount_of_money_per_installment = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['amountOfMoneyPerInstallment'])
|
41
|
+
end
|
42
|
+
if hash.has_key? 'frequencyOfInstallments'
|
43
|
+
@frequency_of_installments = hash['frequencyOfInstallments']
|
44
|
+
end
|
45
|
+
if hash.has_key? 'interestRate'
|
46
|
+
@interest_rate = hash['interestRate']
|
47
|
+
end
|
48
|
+
if hash.has_key? 'numberOfInstallments'
|
49
|
+
@number_of_installments = hash['numberOfInstallments']
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -28,6 +28,7 @@ module Ingenico::Connect::SDK
|
|
28
28
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::MobilePaymentMethodSpecificOutput] mobile_payment_method_specific_output
|
29
29
|
# @attr [String] payment_method
|
30
30
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentMethodSpecificOutput] redirect_payment_method_specific_output
|
31
|
+
# @attr [String] reversal_reason
|
31
32
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::SepaDirectDebitPaymentMethodSpecificOutput] sepa_direct_debit_payment_method_specific_output
|
32
33
|
class PaymentOutput < Ingenico::Connect::SDK::Domain::Payment::OrderOutput
|
33
34
|
|
@@ -53,6 +54,8 @@ module Ingenico::Connect::SDK
|
|
53
54
|
|
54
55
|
attr_accessor :redirect_payment_method_specific_output
|
55
56
|
|
57
|
+
attr_accessor :reversal_reason
|
58
|
+
|
56
59
|
attr_accessor :sepa_direct_debit_payment_method_specific_output
|
57
60
|
|
58
61
|
# @return (Hash)
|
@@ -69,6 +72,7 @@ module Ingenico::Connect::SDK
|
|
69
72
|
hash['mobilePaymentMethodSpecificOutput'] = @mobile_payment_method_specific_output.to_h unless @mobile_payment_method_specific_output.nil?
|
70
73
|
hash['paymentMethod'] = @payment_method unless @payment_method.nil?
|
71
74
|
hash['redirectPaymentMethodSpecificOutput'] = @redirect_payment_method_specific_output.to_h unless @redirect_payment_method_specific_output.nil?
|
75
|
+
hash['reversalReason'] = @reversal_reason unless @reversal_reason.nil?
|
72
76
|
hash['sepaDirectDebitPaymentMethodSpecificOutput'] = @sepa_direct_debit_payment_method_specific_output.to_h unless @sepa_direct_debit_payment_method_specific_output.nil?
|
73
77
|
hash
|
74
78
|
end
|
@@ -116,6 +120,9 @@ module Ingenico::Connect::SDK
|
|
116
120
|
raise TypeError, "value '%s' is not a Hash" % [hash['redirectPaymentMethodSpecificOutput']] unless hash['redirectPaymentMethodSpecificOutput'].is_a? Hash
|
117
121
|
@redirect_payment_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentMethodSpecificOutput.new_from_hash(hash['redirectPaymentMethodSpecificOutput'])
|
118
122
|
end
|
123
|
+
if hash.has_key? 'reversalReason'
|
124
|
+
@reversal_reason = hash['reversalReason']
|
125
|
+
end
|
119
126
|
if hash.has_key? 'sepaDirectDebitPaymentMethodSpecificOutput'
|
120
127
|
raise TypeError, "value '%s' is not a Hash" % [hash['sepaDirectDebitPaymentMethodSpecificOutput']] unless hash['sepaDirectDebitPaymentMethodSpecificOutput'].is_a? Hash
|
121
128
|
@sepa_direct_debit_payment_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::SepaDirectDebitPaymentMethodSpecificOutput.new_from_hash(hash['sepaDirectDebitPaymentMethodSpecificOutput'])
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/definitions/amount_of_money'
|
6
7
|
require 'ingenico/connect/sdk/domain/payment/sdk_data_output'
|
7
8
|
require 'ingenico/connect/sdk/domain/payment/three_d_secure_data'
|
8
9
|
|
@@ -12,6 +13,7 @@ module Ingenico::Connect::SDK
|
|
12
13
|
|
13
14
|
# @attr [String] acs_transaction_id
|
14
15
|
# @attr [String] applied_exemption
|
16
|
+
# @attr [Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney] authentication_amount
|
15
17
|
# @attr [String] cavv
|
16
18
|
# @attr [String] directory_server_transaction_id
|
17
19
|
# @attr [String] eci
|
@@ -27,6 +29,8 @@ module Ingenico::Connect::SDK
|
|
27
29
|
|
28
30
|
attr_accessor :applied_exemption
|
29
31
|
|
32
|
+
attr_accessor :authentication_amount
|
33
|
+
|
30
34
|
attr_accessor :cavv
|
31
35
|
|
32
36
|
attr_accessor :directory_server_transaction_id
|
@@ -50,6 +54,7 @@ module Ingenico::Connect::SDK
|
|
50
54
|
hash = super
|
51
55
|
hash['acsTransactionId'] = @acs_transaction_id unless @acs_transaction_id.nil?
|
52
56
|
hash['appliedExemption'] = @applied_exemption unless @applied_exemption.nil?
|
57
|
+
hash['authenticationAmount'] = @authentication_amount.to_h unless @authentication_amount.nil?
|
53
58
|
hash['cavv'] = @cavv unless @cavv.nil?
|
54
59
|
hash['directoryServerTransactionId'] = @directory_server_transaction_id unless @directory_server_transaction_id.nil?
|
55
60
|
hash['eci'] = @eci unless @eci.nil?
|
@@ -70,6 +75,10 @@ module Ingenico::Connect::SDK
|
|
70
75
|
if hash.has_key? 'appliedExemption'
|
71
76
|
@applied_exemption = hash['appliedExemption']
|
72
77
|
end
|
78
|
+
if hash.has_key? 'authenticationAmount'
|
79
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['authenticationAmount']] unless hash['authenticationAmount'].is_a? Hash
|
80
|
+
@authentication_amount = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['authenticationAmount'])
|
81
|
+
end
|
73
82
|
if hash.has_key? 'cavv'
|
74
83
|
@cavv = hash['cavv']
|
75
84
|
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/product/mobile_payment_product_session302_specific_input'
|
7
|
+
|
8
|
+
module Ingenico::Connect::SDK
|
9
|
+
module Domain
|
10
|
+
module Product
|
11
|
+
|
12
|
+
# @attr [Ingenico::Connect::SDK::Domain::Product::MobilePaymentProductSession302SpecificInput] payment_product_session302_specific_input
|
13
|
+
class CreatePaymentProductSessionRequest < Ingenico::Connect::SDK::DataObject
|
14
|
+
|
15
|
+
attr_accessor :payment_product_session302_specific_input
|
16
|
+
|
17
|
+
# @return (Hash)
|
18
|
+
def to_h
|
19
|
+
hash = super
|
20
|
+
hash['paymentProductSession302SpecificInput'] = @payment_product_session302_specific_input.to_h unless @payment_product_session302_specific_input.nil?
|
21
|
+
hash
|
22
|
+
end
|
23
|
+
|
24
|
+
def from_hash(hash)
|
25
|
+
super
|
26
|
+
if hash.has_key? 'paymentProductSession302SpecificInput'
|
27
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProductSession302SpecificInput']] unless hash['paymentProductSession302SpecificInput'].is_a? Hash
|
28
|
+
@payment_product_session302_specific_input = Ingenico::Connect::SDK::Domain::Product::MobilePaymentProductSession302SpecificInput.new_from_hash(hash['paymentProductSession302SpecificInput'])
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/product/mobile_payment_product_session302_specific_output'
|
7
|
+
|
8
|
+
module Ingenico::Connect::SDK
|
9
|
+
module Domain
|
10
|
+
module Product
|
11
|
+
|
12
|
+
# @attr [Ingenico::Connect::SDK::Domain::Product::MobilePaymentProductSession302SpecificOutput] payment_product_session302_specific_output
|
13
|
+
class CreatePaymentProductSessionResponse < Ingenico::Connect::SDK::DataObject
|
14
|
+
|
15
|
+
attr_accessor :payment_product_session302_specific_output
|
16
|
+
|
17
|
+
# @return (Hash)
|
18
|
+
def to_h
|
19
|
+
hash = super
|
20
|
+
hash['paymentProductSession302SpecificOutput'] = @payment_product_session302_specific_output.to_h unless @payment_product_session302_specific_output.nil?
|
21
|
+
hash
|
22
|
+
end
|
23
|
+
|
24
|
+
def from_hash(hash)
|
25
|
+
super
|
26
|
+
if hash.has_key? 'paymentProductSession302SpecificOutput'
|
27
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProductSession302SpecificOutput']] unless hash['paymentProductSession302SpecificOutput'].is_a? Hash
|
28
|
+
@payment_product_session302_specific_output = Ingenico::Connect::SDK::Domain::Product::MobilePaymentProductSession302SpecificOutput.new_from_hash(hash['paymentProductSession302SpecificOutput'])
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/lib/ingenico/connect/sdk/domain/product/mobile_payment_product_session302_specific_input.rb
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Product
|
10
|
+
|
11
|
+
# @attr [String] display_name
|
12
|
+
# @attr [String] domain_name
|
13
|
+
# @attr [String] validation_url
|
14
|
+
class MobilePaymentProductSession302SpecificInput < Ingenico::Connect::SDK::DataObject
|
15
|
+
|
16
|
+
attr_accessor :display_name
|
17
|
+
|
18
|
+
attr_accessor :domain_name
|
19
|
+
|
20
|
+
attr_accessor :validation_url
|
21
|
+
|
22
|
+
# @return (Hash)
|
23
|
+
def to_h
|
24
|
+
hash = super
|
25
|
+
hash['displayName'] = @display_name unless @display_name.nil?
|
26
|
+
hash['domainName'] = @domain_name unless @domain_name.nil?
|
27
|
+
hash['validationUrl'] = @validation_url unless @validation_url.nil?
|
28
|
+
hash
|
29
|
+
end
|
30
|
+
|
31
|
+
def from_hash(hash)
|
32
|
+
super
|
33
|
+
if hash.has_key? 'displayName'
|
34
|
+
@display_name = hash['displayName']
|
35
|
+
end
|
36
|
+
if hash.has_key? 'domainName'
|
37
|
+
@domain_name = hash['domainName']
|
38
|
+
end
|
39
|
+
if hash.has_key? 'validationUrl'
|
40
|
+
@validation_url = hash['validationUrl']
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/ingenico/connect/sdk/domain/product/mobile_payment_product_session302_specific_output.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Product
|
10
|
+
|
11
|
+
# @attr [String] session_object
|
12
|
+
class MobilePaymentProductSession302SpecificOutput < Ingenico::Connect::SDK::DataObject
|
13
|
+
|
14
|
+
attr_accessor :session_object
|
15
|
+
|
16
|
+
# @return (Hash)
|
17
|
+
def to_h
|
18
|
+
hash = super
|
19
|
+
hash['sessionObject'] = @session_object unless @session_object.nil?
|
20
|
+
hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def from_hash(hash)
|
24
|
+
super
|
25
|
+
if hash.has_key? 'sessionObject'
|
26
|
+
@session_object = hash['sessionObject']
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -16,6 +16,7 @@ module Ingenico::Connect::SDK
|
|
16
16
|
module Product
|
17
17
|
|
18
18
|
# @attr [Array<Ingenico::Connect::SDK::Domain::Product::AccountOnFile>] accounts_on_file
|
19
|
+
# @attr [true/false] allows_installments
|
19
20
|
# @attr [true/false] allows_recurring
|
20
21
|
# @attr [true/false] allows_tokenization
|
21
22
|
# @attr [Ingenico::Connect::SDK::Domain::Product::AuthenticationIndicator] authentication_indicator
|
@@ -40,6 +41,8 @@ module Ingenico::Connect::SDK
|
|
40
41
|
|
41
42
|
attr_accessor :accounts_on_file
|
42
43
|
|
44
|
+
attr_accessor :allows_installments
|
45
|
+
|
43
46
|
attr_accessor :allows_recurring
|
44
47
|
|
45
48
|
attr_accessor :allows_tokenization
|
@@ -84,6 +87,7 @@ module Ingenico::Connect::SDK
|
|
84
87
|
def to_h
|
85
88
|
hash = super
|
86
89
|
hash['accountsOnFile'] = @accounts_on_file.collect{|val| val.to_h} unless @accounts_on_file.nil?
|
90
|
+
hash['allowsInstallments'] = @allows_installments unless @allows_installments.nil?
|
87
91
|
hash['allowsRecurring'] = @allows_recurring unless @allows_recurring.nil?
|
88
92
|
hash['allowsTokenization'] = @allows_tokenization unless @allows_tokenization.nil?
|
89
93
|
hash['authenticationIndicator'] = @authentication_indicator.to_h unless @authentication_indicator.nil?
|
@@ -116,6 +120,9 @@ module Ingenico::Connect::SDK
|
|
116
120
|
@accounts_on_file << Ingenico::Connect::SDK::Domain::Product::AccountOnFile.new_from_hash(e)
|
117
121
|
end
|
118
122
|
end
|
123
|
+
if hash.has_key? 'allowsInstallments'
|
124
|
+
@allows_installments = hash['allowsInstallments']
|
125
|
+
end
|
119
126
|
if hash.has_key? 'allowsRecurring'
|
120
127
|
@allows_recurring = hash['allowsRecurring']
|
121
128
|
end
|
@@ -12,6 +12,7 @@ module Ingenico::Connect::SDK
|
|
12
12
|
module Product
|
13
13
|
|
14
14
|
# @attr [Array<Ingenico::Connect::SDK::Domain::Product::AccountOnFile>] accounts_on_file
|
15
|
+
# @attr [true/false] allows_installments
|
15
16
|
# @attr [true/false] device_fingerprint_enabled
|
16
17
|
# @attr [Ingenico::Connect::SDK::Domain::Product::PaymentProductDisplayHints] display_hints
|
17
18
|
# @attr [Array<Ingenico::Connect::SDK::Domain::Product::PaymentProductField>] fields
|
@@ -20,6 +21,8 @@ module Ingenico::Connect::SDK
|
|
20
21
|
|
21
22
|
attr_accessor :accounts_on_file
|
22
23
|
|
24
|
+
attr_accessor :allows_installments
|
25
|
+
|
23
26
|
attr_accessor :device_fingerprint_enabled
|
24
27
|
|
25
28
|
attr_accessor :display_hints
|
@@ -32,6 +35,7 @@ module Ingenico::Connect::SDK
|
|
32
35
|
def to_h
|
33
36
|
hash = super
|
34
37
|
hash['accountsOnFile'] = @accounts_on_file.collect{|val| val.to_h} unless @accounts_on_file.nil?
|
38
|
+
hash['allowsInstallments'] = @allows_installments unless @allows_installments.nil?
|
35
39
|
hash['deviceFingerprintEnabled'] = @device_fingerprint_enabled unless @device_fingerprint_enabled.nil?
|
36
40
|
hash['displayHints'] = @display_hints.to_h unless @display_hints.nil?
|
37
41
|
hash['fields'] = @fields.collect{|val| val.to_h} unless @fields.nil?
|
@@ -48,6 +52,9 @@ module Ingenico::Connect::SDK
|
|
48
52
|
@accounts_on_file << Ingenico::Connect::SDK::Domain::Product::AccountOnFile.new_from_hash(e)
|
49
53
|
end
|
50
54
|
end
|
55
|
+
if hash.has_key? 'allowsInstallments'
|
56
|
+
@allows_installments = hash['allowsInstallments']
|
57
|
+
end
|
51
58
|
if hash.has_key? 'deviceFingerprintEnabled'
|
52
59
|
@device_fingerprint_enabled = hash['deviceFingerprintEnabled']
|
53
60
|
end
|
@@ -206,7 +206,7 @@ module Ingenico::Connect::SDK
|
|
206
206
|
# the value. What this does not allow currently is having values end
|
207
207
|
# with a \ (which would be escaped to \\).
|
208
208
|
regex = pn.inject("([\"'])(") { |r, p| "#{r}#{Regexp.quote(p)}|"}.chop <<
|
209
|
-
")\\1\\s*:\\s*(?:([\"'])(.*?)(?<!\\\\)\\3|([^\"'\\s\\[\\{]\\S*))"
|
209
|
+
")\\1\\s*:\\s*(?:([\"'])(.*?)(?<!\\\\)\\3|([^\"'\\s\\[\\{]((?!,)\\S)*))"
|
210
210
|
/#{regex}/m # dotall mode
|
211
211
|
end
|
212
212
|
|
@@ -13,6 +13,7 @@ require 'ingenico/connect/sdk/domain/payment/cancel_approval_payment_response'
|
|
13
13
|
require 'ingenico/connect/sdk/domain/payment/cancel_payment_response'
|
14
14
|
require 'ingenico/connect/sdk/domain/payment/complete_payment_response'
|
15
15
|
require 'ingenico/connect/sdk/domain/payment/create_payment_response'
|
16
|
+
require 'ingenico/connect/sdk/domain/payment/device_fingerprint_details'
|
16
17
|
require 'ingenico/connect/sdk/domain/payment/find_payments_response'
|
17
18
|
require 'ingenico/connect/sdk/domain/payment/payment_approval_response'
|
18
19
|
require 'ingenico/connect/sdk/domain/payment/payment_error_response'
|
@@ -527,6 +528,36 @@ module Ingenico::Connect::SDK
|
|
527
528
|
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
528
529
|
raise create_exception(e.status_code, e.body, error_object, context)
|
529
530
|
end
|
531
|
+
|
532
|
+
# Resource /!{merchantId}/payments/!{paymentId}/devicefingerprint - {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/devicefingerprint.html Get Device Fingerprint details}
|
533
|
+
# @param payment_id [String]
|
534
|
+
# @param context [Ingenico::Connect::SDK::CallContext]
|
535
|
+
# @return [Ingenico::Connect::SDK::Domain::Payment::DeviceFingerprintDetails]
|
536
|
+
# @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
537
|
+
# @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
538
|
+
# @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
539
|
+
# @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
540
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
541
|
+
# @raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
|
542
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
543
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
544
|
+
# @raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error
|
545
|
+
def devicefingerprint(payment_id, context=nil)
|
546
|
+
path_context = {
|
547
|
+
'paymentId'.freeze => payment_id,
|
548
|
+
}
|
549
|
+
uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/devicefingerprint', path_context)
|
550
|
+
return @communicator.get(
|
551
|
+
uri,
|
552
|
+
client_headers,
|
553
|
+
nil,
|
554
|
+
Ingenico::Connect::SDK::Domain::Payment::DeviceFingerprintDetails,
|
555
|
+
context)
|
556
|
+
rescue ResponseException => e
|
557
|
+
error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
|
558
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
559
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
560
|
+
end
|
530
561
|
end
|
531
562
|
end
|
532
563
|
end
|
@@ -5,6 +5,7 @@
|
|
5
5
|
require 'ingenico/connect/sdk/api_resource'
|
6
6
|
require 'ingenico/connect/sdk/response_exception'
|
7
7
|
require 'ingenico/connect/sdk/domain/errors/error_response'
|
8
|
+
require 'ingenico/connect/sdk/domain/product/create_payment_product_session_response'
|
8
9
|
require 'ingenico/connect/sdk/domain/product/device_fingerprint_response'
|
9
10
|
require 'ingenico/connect/sdk/domain/product/directory'
|
10
11
|
require 'ingenico/connect/sdk/domain/product/get_customer_details_response'
|
@@ -208,6 +209,38 @@ module Ingenico::Connect::SDK
|
|
208
209
|
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
209
210
|
raise create_exception(e.status_code, e.body, error_object, context)
|
210
211
|
end
|
212
|
+
|
213
|
+
# Resource /!{merchantId}/products/!{paymentProductId}/sessions - {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/products/sessions.html Create session for payment product}
|
214
|
+
# @param payment_product_id [Integer]
|
215
|
+
# @param body [Ingenico::Connect::SDK::Domain::Product::CreatePaymentProductSessionRequest]
|
216
|
+
# @param context [Ingenico::Connect::SDK::CallContext]
|
217
|
+
# @return [Ingenico::Connect::SDK::Domain::Product::CreatePaymentProductSessionResponse]
|
218
|
+
# @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
219
|
+
# @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
220
|
+
# @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
221
|
+
# @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
222
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
223
|
+
# @raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
|
224
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
225
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
226
|
+
# @raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error
|
227
|
+
def sessions(payment_product_id, body, context=nil)
|
228
|
+
path_context = {
|
229
|
+
'paymentProductId'.freeze => payment_product_id.to_s,
|
230
|
+
}
|
231
|
+
uri = instantiate_uri('/v1/{merchantId}/products/{paymentProductId}/sessions', path_context)
|
232
|
+
return @communicator.post(
|
233
|
+
uri,
|
234
|
+
client_headers,
|
235
|
+
nil,
|
236
|
+
body,
|
237
|
+
Ingenico::Connect::SDK::Domain::Product::CreatePaymentProductSessionResponse,
|
238
|
+
context)
|
239
|
+
rescue ResponseException => e
|
240
|
+
error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
|
241
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
242
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
243
|
+
end
|
211
244
|
end
|
212
245
|
end
|
213
246
|
end
|
@@ -7,7 +7,7 @@ module Ingenico::Connect::SDK
|
|
7
7
|
#
|
8
8
|
# @attr_reader [Array<Ingenico::Connect::SDK::RequestHeader>] meta_data_headers List of headers that should be used in all requests.
|
9
9
|
class MetaDataProvider
|
10
|
-
@@SDK_VERSION = '2.
|
10
|
+
@@SDK_VERSION = '2.14.0'
|
11
11
|
@@SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'
|
12
12
|
@@PROHIBITED_HEADERS = [@@SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key',
|
13
13
|
'Date', 'Content-Type', 'Authorization'].sort!.freeze
|
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: 2.
|
4
|
+
version: 2.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ingenico ePayments
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -100,14 +100,20 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '12.3'
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: 12.3.3
|
104
107
|
type: :development
|
105
108
|
prerelease: false
|
106
109
|
version_requirements: !ruby/object:Gem::Requirement
|
107
110
|
requirements:
|
108
111
|
- - "~>"
|
109
112
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
113
|
+
version: '12.3'
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: 12.3.3
|
111
117
|
description: SDK to communicate with the Ingenico ePayments platform using the Ingenico
|
112
118
|
Connect Server API
|
113
119
|
email:
|
@@ -147,6 +153,7 @@ files:
|
|
147
153
|
- examples/merchant/payments/create_payment_example.rb
|
148
154
|
- examples/merchant/payments/find_payments_example.rb
|
149
155
|
- examples/merchant/payments/get_payment_captures_example.rb
|
156
|
+
- examples/merchant/payments/get_payment_device_fingerprint_details_example.rb
|
150
157
|
- examples/merchant/payments/get_payment_disputes_example.rb
|
151
158
|
- examples/merchant/payments/get_payment_example.rb
|
152
159
|
- examples/merchant/payments/get_refunds_example.rb
|
@@ -163,6 +170,7 @@ files:
|
|
163
170
|
- examples/merchant/productgroups/get_device_fingerprint_for_groups_example.rb
|
164
171
|
- examples/merchant/productgroups/get_payment_product_group_example.rb
|
165
172
|
- examples/merchant/productgroups/get_payment_product_groups_example.rb
|
173
|
+
- examples/merchant/products/create_payment_product_session_example.rb
|
166
174
|
- examples/merchant/products/get_customer_details_example.rb
|
167
175
|
- examples/merchant/products/get_device_fingerprint_example.rb
|
168
176
|
- examples/merchant/products/get_directory_example.rb
|
@@ -265,6 +273,7 @@ files:
|
|
265
273
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/get_hosted_checkout_response.rb
|
266
274
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb
|
267
275
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_method_specific_input_hosted_checkout.rb
|
276
|
+
- lib/ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_product302_specific_input_hosted_checkout.rb
|
268
277
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_product320_specific_input_hosted_checkout.rb
|
269
278
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/payment_product_filters_hosted_checkout.rb
|
270
279
|
- lib/ingenico/connect/sdk/domain/hostedmandatemanagement/create_hosted_mandate_management_request.rb
|
@@ -343,6 +352,7 @@ files:
|
|
343
352
|
- lib/ingenico/connect/sdk/domain/payment/customer_device.rb
|
344
353
|
- lib/ingenico/connect/sdk/domain/payment/customer_payment_activity.rb
|
345
354
|
- lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb
|
355
|
+
- lib/ingenico/connect/sdk/domain/payment/device_fingerprint_details.rb
|
346
356
|
- lib/ingenico/connect/sdk/domain/payment/device_render_options.rb
|
347
357
|
- lib/ingenico/connect/sdk/domain/payment/e_invoice_payment_method_specific_input.rb
|
348
358
|
- lib/ingenico/connect/sdk/domain/payment/e_invoice_payment_method_specific_input_base.rb
|
@@ -353,6 +363,7 @@ files:
|
|
353
363
|
- lib/ingenico/connect/sdk/domain/payment/find_payments_response.rb
|
354
364
|
- lib/ingenico/connect/sdk/domain/payment/gift_card_purchase.rb
|
355
365
|
- lib/ingenico/connect/sdk/domain/payment/hosted_checkout_specific_output.rb
|
366
|
+
- lib/ingenico/connect/sdk/domain/payment/installments.rb
|
356
367
|
- lib/ingenico/connect/sdk/domain/payment/invoice_payment_method_specific_input.rb
|
357
368
|
- lib/ingenico/connect/sdk/domain/payment/invoice_payment_method_specific_output.rb
|
358
369
|
- lib/ingenico/connect/sdk/domain/payment/level3_summary_data.rb
|
@@ -456,6 +467,8 @@ files:
|
|
456
467
|
- lib/ingenico/connect/sdk/domain/product/account_on_file_display_hints.rb
|
457
468
|
- lib/ingenico/connect/sdk/domain/product/authentication_indicator.rb
|
458
469
|
- lib/ingenico/connect/sdk/domain/product/boleto_bancario_requiredness_validator.rb
|
470
|
+
- lib/ingenico/connect/sdk/domain/product/create_payment_product_session_request.rb
|
471
|
+
- lib/ingenico/connect/sdk/domain/product/create_payment_product_session_response.rb
|
459
472
|
- lib/ingenico/connect/sdk/domain/product/device_fingerprint_request.rb
|
460
473
|
- lib/ingenico/connect/sdk/domain/product/device_fingerprint_response.rb
|
461
474
|
- lib/ingenico/connect/sdk/domain/product/directory.rb
|
@@ -466,6 +479,8 @@ files:
|
|
466
479
|
- lib/ingenico/connect/sdk/domain/product/get_customer_details_response.rb
|
467
480
|
- lib/ingenico/connect/sdk/domain/product/label_template_element.rb
|
468
481
|
- lib/ingenico/connect/sdk/domain/product/length_validator.rb
|
482
|
+
- lib/ingenico/connect/sdk/domain/product/mobile_payment_product_session302_specific_input.rb
|
483
|
+
- lib/ingenico/connect/sdk/domain/product/mobile_payment_product_session302_specific_output.rb
|
469
484
|
- lib/ingenico/connect/sdk/domain/product/payment_product.rb
|
470
485
|
- lib/ingenico/connect/sdk/domain/product/payment_product302_specific_data.rb
|
471
486
|
- lib/ingenico/connect/sdk/domain/product/payment_product320_specific_data.rb
|
@@ -710,8 +725,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
710
725
|
- !ruby/object:Gem::Version
|
711
726
|
version: '0'
|
712
727
|
requirements: []
|
713
|
-
|
714
|
-
rubygems_version: 2.7.6
|
728
|
+
rubygems_version: 3.0.3
|
715
729
|
signing_key:
|
716
730
|
specification_version: 4
|
717
731
|
summary: SDK to communicate with the Ingenico ePayments platform using the Ingenico
|