connect-sdk-ruby 2.12.0 → 2.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/connect-sdk-ruby.gemspec +1 -1
  4. data/examples/merchant/payments/get_payment_device_fingerprint_details_example.rb +22 -0
  5. data/examples/merchant/products/create_payment_product_session_example.rb +33 -0
  6. data/lib/ingenico/connect/sdk/communicator.rb +16 -0
  7. data/lib/ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_method_specific_input_hosted_checkout.rb +37 -0
  8. data/lib/ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_product302_specific_input_hosted_checkout.rb +32 -0
  9. data/lib/ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_product320_specific_input_hosted_checkout.rb +9 -0
  10. data/lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb +11 -0
  11. data/lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb +7 -0
  12. data/lib/ingenico/connect/sdk/domain/payment/device_fingerprint_details.rb +39 -0
  13. data/lib/ingenico/connect/sdk/domain/payment/g_pay_three_d_secure.rb +62 -0
  14. data/lib/ingenico/connect/sdk/domain/payment/installments.rb +55 -0
  15. data/lib/ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_input.rb +16 -0
  16. data/lib/ingenico/connect/sdk/domain/payment/mobile_payment_product320_specific_input.rb +34 -0
  17. data/lib/ingenico/connect/sdk/domain/product/create_payment_product_session_request.rb +34 -0
  18. data/lib/ingenico/connect/sdk/domain/product/create_payment_product_session_response.rb +34 -0
  19. data/lib/ingenico/connect/sdk/domain/product/mobile_payment_product_session302_specific_input.rb +46 -0
  20. data/lib/ingenico/connect/sdk/domain/product/mobile_payment_product_session302_specific_output.rb +32 -0
  21. data/lib/ingenico/connect/sdk/domain/product/payment_product.rb +7 -0
  22. data/lib/ingenico/connect/sdk/domain/product/payment_product_group.rb +7 -0
  23. data/lib/ingenico/connect/sdk/merchant/payments/payments_client.rb +31 -0
  24. data/lib/ingenico/connect/sdk/merchant/products/products_client.rb +33 -0
  25. data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
  26. data/spec/integration/token_spec.rb +1 -1
  27. metadata +14 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d4a9ae210b8ddace94c5f9cd9923c0b4d849b22be757f1b8ef61b0e384654b0
4
- data.tar.gz: b5355f9d6ceab565e22ecec60e5c72a723568a7b317950550232a3145bab551f
3
+ metadata.gz: 1578be8e0951241f9329bcbbe406e2499b0c82a623087e70523c555b84529bf7
4
+ data.tar.gz: bcfd56aa824026c6eca3b9fc8c1079bb7b980b6be9ac799b6b8a567b2c0eb166
5
5
  SHA512:
6
- metadata.gz: 552d365906484b677d884d0fcff637830045d961d55a717e77fc3b3f29761044ed5f9775207328232bdae987b6c2386572f29f15630d947e79a6ce37a51a0cbd
7
- data.tar.gz: a3b66c17876a63c9921483e8e7f918887477054d9689216bce45112353b1b41197c4a1c21e948e1bbbfacf84b6b50c700f53f7cb5b6e1266cecb75c7b5c8e2cc
6
+ metadata.gz: 92a54c288db5e23a88221464e63ef300eadc27f5343d7cf8c2bf9b76141028bd39e372516135455505a1ce3d52f213e3fbf0e0bcb163e588496269d21bf5af1d
7
+ data.tar.gz: 438a20fecdc601f1edc834dfe7b76303a4d284aa9e260efbf3ded892bf6ebfedca6c23655078f98d91122a49dddf053d28a98f297f6f2d030800b8e2f8b47f65
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.2 or higher is required. Ruby 2.1.10 is also supported but is not suggested because official support has ended and security maintenance will end soon.
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 package is required:
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'connect-sdk-ruby'
3
- spec.version = '2.12.0'
3
+ spec.version = '2.17.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}
@@ -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 = '<VALIDATION URL RECEIVED FROM APPLE>'
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
 
@@ -3,30 +3,67 @@
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 [String] authorization_mode
14
+ # @attr [String] customer_reference
15
+ # @attr [Ingenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentProduct302SpecificInputHostedCheckout] payment_product302_specific_input
12
16
  # @attr [Ingenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentProduct320SpecificInputHostedCheckout] payment_product320_specific_input
17
+ # @attr [true/false] requires_approval
18
+ # @attr [true/false] skip_fraud_service
13
19
  class MobilePaymentMethodSpecificInputHostedCheckout < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
14
20
 
21
+ attr_accessor :authorization_mode
22
+
23
+ attr_accessor :customer_reference
24
+
25
+ attr_accessor :payment_product302_specific_input
26
+
15
27
  attr_accessor :payment_product320_specific_input
16
28
 
29
+ attr_accessor :requires_approval
30
+
31
+ attr_accessor :skip_fraud_service
32
+
17
33
  # @return (Hash)
18
34
  def to_h
19
35
  hash = super
36
+ hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
37
+ hash['customerReference'] = @customer_reference unless @customer_reference.nil?
38
+ hash['paymentProduct302SpecificInput'] = @payment_product302_specific_input.to_h unless @payment_product302_specific_input.nil?
20
39
  hash['paymentProduct320SpecificInput'] = @payment_product320_specific_input.to_h unless @payment_product320_specific_input.nil?
40
+ hash['requiresApproval'] = @requires_approval unless @requires_approval.nil?
41
+ hash['skipFraudService'] = @skip_fraud_service unless @skip_fraud_service.nil?
21
42
  hash
22
43
  end
23
44
 
24
45
  def from_hash(hash)
25
46
  super
47
+ if hash.has_key? 'authorizationMode'
48
+ @authorization_mode = hash['authorizationMode']
49
+ end
50
+ if hash.has_key? 'customerReference'
51
+ @customer_reference = hash['customerReference']
52
+ end
53
+ if hash.has_key? 'paymentProduct302SpecificInput'
54
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct302SpecificInput']] unless hash['paymentProduct302SpecificInput'].is_a? Hash
55
+ @payment_product302_specific_input = Ingenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentProduct302SpecificInputHostedCheckout.new_from_hash(hash['paymentProduct302SpecificInput'])
56
+ end
26
57
  if hash.has_key? 'paymentProduct320SpecificInput'
27
58
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct320SpecificInput']] unless hash['paymentProduct320SpecificInput'].is_a? Hash
28
59
  @payment_product320_specific_input = Ingenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentProduct320SpecificInputHostedCheckout.new_from_hash(hash['paymentProduct320SpecificInput'])
29
60
  end
61
+ if hash.has_key? 'requiresApproval'
62
+ @requires_approval = hash['requiresApproval']
63
+ end
64
+ if hash.has_key? 'skipFraudService'
65
+ @skip_fraud_service = hash['skipFraudService']
66
+ end
30
67
  end
31
68
  end
32
69
  end
@@ -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/payment/g_pay_three_d_secure'
6
7
 
7
8
  module Ingenico::Connect::SDK
8
9
  module Domain
@@ -10,17 +11,21 @@ module Ingenico::Connect::SDK
10
11
 
11
12
  # @attr [String] merchant_name
12
13
  # @attr [String] merchant_origin
14
+ # @attr [Ingenico::Connect::SDK::Domain::Payment::GPayThreeDSecure] three_d_secure
13
15
  class MobilePaymentProduct320SpecificInputHostedCheckout < Ingenico::Connect::SDK::DataObject
14
16
 
15
17
  attr_accessor :merchant_name
16
18
 
17
19
  attr_accessor :merchant_origin
18
20
 
21
+ attr_accessor :three_d_secure
22
+
19
23
  # @return (Hash)
20
24
  def to_h
21
25
  hash = super
22
26
  hash['merchantName'] = @merchant_name unless @merchant_name.nil?
23
27
  hash['merchantOrigin'] = @merchant_origin unless @merchant_origin.nil?
28
+ hash['threeDSecure'] = @three_d_secure.to_h unless @three_d_secure.nil?
24
29
  hash
25
30
  end
26
31
 
@@ -32,6 +37,10 @@ module Ingenico::Connect::SDK
32
37
  if hash.has_key? 'merchantOrigin'
33
38
  @merchant_origin = hash['merchantOrigin']
34
39
  end
40
+ if hash.has_key? 'threeDSecure'
41
+ raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecure']] unless hash['threeDSecure'].is_a? Hash
42
+ @three_d_secure = Ingenico::Connect::SDK::Domain::Payment::GPayThreeDSecure.new_from_hash(hash['threeDSecure'])
43
+ end
35
44
  end
36
45
  end
37
46
  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'])
@@ -8,6 +8,7 @@ module Ingenico::Connect::SDK
8
8
  module Domain
9
9
  module Payment
10
10
 
11
+ # @attr [String] auth_method
11
12
  # @attr [String] cardholder_name
12
13
  # @attr [String] cryptogram
13
14
  # @attr [String] dpan
@@ -17,6 +18,8 @@ module Ingenico::Connect::SDK
17
18
  # @attr [String] payment_method
18
19
  class DecryptedPaymentData < Ingenico::Connect::SDK::DataObject
19
20
 
21
+ attr_accessor :auth_method
22
+
20
23
  attr_accessor :cardholder_name
21
24
 
22
25
  attr_accessor :cryptogram
@@ -34,6 +37,7 @@ module Ingenico::Connect::SDK
34
37
  # @return (Hash)
35
38
  def to_h
36
39
  hash = super
40
+ hash['authMethod'] = @auth_method unless @auth_method.nil?
37
41
  hash['cardholderName'] = @cardholder_name unless @cardholder_name.nil?
38
42
  hash['cryptogram'] = @cryptogram unless @cryptogram.nil?
39
43
  hash['dpan'] = @dpan unless @dpan.nil?
@@ -46,6 +50,9 @@ module Ingenico::Connect::SDK
46
50
 
47
51
  def from_hash(hash)
48
52
  super
53
+ if hash.has_key? 'authMethod'
54
+ @auth_method = hash['authMethod']
55
+ end
49
56
  if hash.has_key? 'cardholderName'
50
57
  @cardholder_name = hash['cardholderName']
51
58
  end
@@ -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,62 @@
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/payment/redirection_data'
7
+
8
+ module Ingenico::Connect::SDK
9
+ module Domain
10
+ module Payment
11
+
12
+ # @attr [String] challenge_canvas_size
13
+ # @attr [String] challenge_indicator
14
+ # @attr [String] exemption_request
15
+ # @attr [Ingenico::Connect::SDK::Domain::Payment::RedirectionData] redirection_data
16
+ # @attr [true/false] skip_authentication
17
+ class GPayThreeDSecure < Ingenico::Connect::SDK::DataObject
18
+
19
+ attr_accessor :challenge_canvas_size
20
+
21
+ attr_accessor :challenge_indicator
22
+
23
+ attr_accessor :exemption_request
24
+
25
+ attr_accessor :redirection_data
26
+
27
+ attr_accessor :skip_authentication
28
+
29
+ # @return (Hash)
30
+ def to_h
31
+ hash = super
32
+ hash['challengeCanvasSize'] = @challenge_canvas_size unless @challenge_canvas_size.nil?
33
+ hash['challengeIndicator'] = @challenge_indicator unless @challenge_indicator.nil?
34
+ hash['exemptionRequest'] = @exemption_request unless @exemption_request.nil?
35
+ hash['redirectionData'] = @redirection_data.to_h unless @redirection_data.nil?
36
+ hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
37
+ hash
38
+ end
39
+
40
+ def from_hash(hash)
41
+ super
42
+ if hash.has_key? 'challengeCanvasSize'
43
+ @challenge_canvas_size = hash['challengeCanvasSize']
44
+ end
45
+ if hash.has_key? 'challengeIndicator'
46
+ @challenge_indicator = hash['challengeIndicator']
47
+ end
48
+ if hash.has_key? 'exemptionRequest'
49
+ @exemption_request = hash['exemptionRequest']
50
+ end
51
+ if hash.has_key? 'redirectionData'
52
+ raise TypeError, "value '%s' is not a Hash" % [hash['redirectionData']] unless hash['redirectionData'].is_a? Hash
53
+ @redirection_data = Ingenico::Connect::SDK::Domain::Payment::RedirectionData.new_from_hash(hash['redirectionData'])
54
+ end
55
+ if hash.has_key? 'skipAuthentication'
56
+ @skip_authentication = hash['skipAuthentication']
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
62
+ 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
@@ -4,24 +4,31 @@
4
4
  #
5
5
  require 'ingenico/connect/sdk/domain/definitions/abstract_payment_method_specific_input'
6
6
  require 'ingenico/connect/sdk/domain/payment/decrypted_payment_data'
7
+ require 'ingenico/connect/sdk/domain/payment/mobile_payment_product320_specific_input'
7
8
 
8
9
  module Ingenico::Connect::SDK
9
10
  module Domain
10
11
  module Payment
11
12
 
12
13
  # @attr [String] authorization_mode
14
+ # @attr [String] customer_reference
13
15
  # @attr [Ingenico::Connect::SDK::Domain::Payment::DecryptedPaymentData] decrypted_payment_data
14
16
  # @attr [String] encrypted_payment_data
17
+ # @attr [Ingenico::Connect::SDK::Domain::Payment::MobilePaymentProduct320SpecificInput] payment_product320_specific_input
15
18
  # @attr [true/false] requires_approval
16
19
  # @attr [true/false] skip_fraud_service
17
20
  class MobilePaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
18
21
 
19
22
  attr_accessor :authorization_mode
20
23
 
24
+ attr_accessor :customer_reference
25
+
21
26
  attr_accessor :decrypted_payment_data
22
27
 
23
28
  attr_accessor :encrypted_payment_data
24
29
 
30
+ attr_accessor :payment_product320_specific_input
31
+
25
32
  attr_accessor :requires_approval
26
33
 
27
34
  attr_accessor :skip_fraud_service
@@ -30,8 +37,10 @@ module Ingenico::Connect::SDK
30
37
  def to_h
31
38
  hash = super
32
39
  hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
40
+ hash['customerReference'] = @customer_reference unless @customer_reference.nil?
33
41
  hash['decryptedPaymentData'] = @decrypted_payment_data.to_h unless @decrypted_payment_data.nil?
34
42
  hash['encryptedPaymentData'] = @encrypted_payment_data unless @encrypted_payment_data.nil?
43
+ hash['paymentProduct320SpecificInput'] = @payment_product320_specific_input.to_h unless @payment_product320_specific_input.nil?
35
44
  hash['requiresApproval'] = @requires_approval unless @requires_approval.nil?
36
45
  hash['skipFraudService'] = @skip_fraud_service unless @skip_fraud_service.nil?
37
46
  hash
@@ -42,6 +51,9 @@ module Ingenico::Connect::SDK
42
51
  if hash.has_key? 'authorizationMode'
43
52
  @authorization_mode = hash['authorizationMode']
44
53
  end
54
+ if hash.has_key? 'customerReference'
55
+ @customer_reference = hash['customerReference']
56
+ end
45
57
  if hash.has_key? 'decryptedPaymentData'
46
58
  raise TypeError, "value '%s' is not a Hash" % [hash['decryptedPaymentData']] unless hash['decryptedPaymentData'].is_a? Hash
47
59
  @decrypted_payment_data = Ingenico::Connect::SDK::Domain::Payment::DecryptedPaymentData.new_from_hash(hash['decryptedPaymentData'])
@@ -49,6 +61,10 @@ module Ingenico::Connect::SDK
49
61
  if hash.has_key? 'encryptedPaymentData'
50
62
  @encrypted_payment_data = hash['encryptedPaymentData']
51
63
  end
64
+ if hash.has_key? 'paymentProduct320SpecificInput'
65
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct320SpecificInput']] unless hash['paymentProduct320SpecificInput'].is_a? Hash
66
+ @payment_product320_specific_input = Ingenico::Connect::SDK::Domain::Payment::MobilePaymentProduct320SpecificInput.new_from_hash(hash['paymentProduct320SpecificInput'])
67
+ end
52
68
  if hash.has_key? 'requiresApproval'
53
69
  @requires_approval = hash['requiresApproval']
54
70
  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/payment/g_pay_three_d_secure'
7
+
8
+ module Ingenico::Connect::SDK
9
+ module Domain
10
+ module Payment
11
+
12
+ # @attr [Ingenico::Connect::SDK::Domain::Payment::GPayThreeDSecure] three_d_secure
13
+ class MobilePaymentProduct320SpecificInput < Ingenico::Connect::SDK::DataObject
14
+
15
+ attr_accessor :three_d_secure
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['threeDSecure'] = @three_d_secure.to_h unless @three_d_secure.nil?
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ if hash.has_key? 'threeDSecure'
27
+ raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecure']] unless hash['threeDSecure'].is_a? Hash
28
+ @three_d_secure = Ingenico::Connect::SDK::Domain::Payment::GPayThreeDSecure.new_from_hash(hash['threeDSecure'])
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_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
@@ -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
@@ -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 [String] acquirer_country
19
20
  # @attr [true/false] allows_installments
20
21
  # @attr [true/false] allows_recurring
21
22
  # @attr [true/false] allows_tokenization
@@ -41,6 +42,8 @@ module Ingenico::Connect::SDK
41
42
 
42
43
  attr_accessor :accounts_on_file
43
44
 
45
+ attr_accessor :acquirer_country
46
+
44
47
  attr_accessor :allows_installments
45
48
 
46
49
  attr_accessor :allows_recurring
@@ -87,6 +90,7 @@ module Ingenico::Connect::SDK
87
90
  def to_h
88
91
  hash = super
89
92
  hash['accountsOnFile'] = @accounts_on_file.collect{|val| val.to_h} unless @accounts_on_file.nil?
93
+ hash['acquirerCountry'] = @acquirer_country unless @acquirer_country.nil?
90
94
  hash['allowsInstallments'] = @allows_installments unless @allows_installments.nil?
91
95
  hash['allowsRecurring'] = @allows_recurring unless @allows_recurring.nil?
92
96
  hash['allowsTokenization'] = @allows_tokenization unless @allows_tokenization.nil?
@@ -120,6 +124,9 @@ module Ingenico::Connect::SDK
120
124
  @accounts_on_file << Ingenico::Connect::SDK::Domain::Product::AccountOnFile.new_from_hash(e)
121
125
  end
122
126
  end
127
+ if hash.has_key? 'acquirerCountry'
128
+ @acquirer_country = hash['acquirerCountry']
129
+ end
123
130
  if hash.has_key? 'allowsInstallments'
124
131
  @allows_installments = hash['allowsInstallments']
125
132
  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
@@ -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.12.0'
10
+ @@SDK_VERSION = '2.17.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
@@ -23,7 +23,7 @@ describe 'token' do
23
23
  card_without_ccv.cardholder_name = 'Jan'
24
24
  card_without_ccv.issue_number = '12'
25
25
  card_without_ccv.card_number = '4567350000427977'
26
- card_without_ccv.expiry_date = '0820'
26
+ card_without_ccv.expiry_date = '1225'
27
27
  card_data = Ingenico::Connect::SDK::Domain::Token::TokenCardData.new
28
28
  card_data.card_without_cvv = card_without_ccv
29
29
  card = Ingenico::Connect::SDK::Domain::Token::TokenCard.new
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.12.0
4
+ version: 2.17.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-06-15 00:00:00.000000000 Z
11
+ date: 2020-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient
@@ -153,6 +153,7 @@ files:
153
153
  - examples/merchant/payments/create_payment_example.rb
154
154
  - examples/merchant/payments/find_payments_example.rb
155
155
  - examples/merchant/payments/get_payment_captures_example.rb
156
+ - examples/merchant/payments/get_payment_device_fingerprint_details_example.rb
156
157
  - examples/merchant/payments/get_payment_disputes_example.rb
157
158
  - examples/merchant/payments/get_payment_example.rb
158
159
  - examples/merchant/payments/get_refunds_example.rb
@@ -169,6 +170,7 @@ files:
169
170
  - examples/merchant/productgroups/get_device_fingerprint_for_groups_example.rb
170
171
  - examples/merchant/productgroups/get_payment_product_group_example.rb
171
172
  - examples/merchant/productgroups/get_payment_product_groups_example.rb
173
+ - examples/merchant/products/create_payment_product_session_example.rb
172
174
  - examples/merchant/products/get_customer_details_example.rb
173
175
  - examples/merchant/products/get_device_fingerprint_example.rb
174
176
  - examples/merchant/products/get_directory_example.rb
@@ -271,6 +273,7 @@ files:
271
273
  - lib/ingenico/connect/sdk/domain/hostedcheckout/get_hosted_checkout_response.rb
272
274
  - lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb
273
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
274
277
  - lib/ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_product320_specific_input_hosted_checkout.rb
275
278
  - lib/ingenico/connect/sdk/domain/hostedcheckout/payment_product_filters_hosted_checkout.rb
276
279
  - lib/ingenico/connect/sdk/domain/hostedmandatemanagement/create_hosted_mandate_management_request.rb
@@ -349,6 +352,7 @@ files:
349
352
  - lib/ingenico/connect/sdk/domain/payment/customer_device.rb
350
353
  - lib/ingenico/connect/sdk/domain/payment/customer_payment_activity.rb
351
354
  - lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb
355
+ - lib/ingenico/connect/sdk/domain/payment/device_fingerprint_details.rb
352
356
  - lib/ingenico/connect/sdk/domain/payment/device_render_options.rb
353
357
  - lib/ingenico/connect/sdk/domain/payment/e_invoice_payment_method_specific_input.rb
354
358
  - lib/ingenico/connect/sdk/domain/payment/e_invoice_payment_method_specific_input_base.rb
@@ -357,8 +361,10 @@ files:
357
361
  - lib/ingenico/connect/sdk/domain/payment/e_invoice_payment_product9000_specific_output.rb
358
362
  - lib/ingenico/connect/sdk/domain/payment/external_cardholder_authentication_data.rb
359
363
  - lib/ingenico/connect/sdk/domain/payment/find_payments_response.rb
364
+ - lib/ingenico/connect/sdk/domain/payment/g_pay_three_d_secure.rb
360
365
  - lib/ingenico/connect/sdk/domain/payment/gift_card_purchase.rb
361
366
  - lib/ingenico/connect/sdk/domain/payment/hosted_checkout_specific_output.rb
367
+ - lib/ingenico/connect/sdk/domain/payment/installments.rb
362
368
  - lib/ingenico/connect/sdk/domain/payment/invoice_payment_method_specific_input.rb
363
369
  - lib/ingenico/connect/sdk/domain/payment/invoice_payment_method_specific_output.rb
364
370
  - lib/ingenico/connect/sdk/domain/payment/level3_summary_data.rb
@@ -371,6 +377,7 @@ files:
371
377
  - lib/ingenico/connect/sdk/domain/payment/mobile_payment_data.rb
372
378
  - lib/ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_input.rb
373
379
  - lib/ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_output.rb
380
+ - lib/ingenico/connect/sdk/domain/payment/mobile_payment_product320_specific_input.rb
374
381
  - lib/ingenico/connect/sdk/domain/payment/mobile_three_d_secure_challenge_parameters.rb
375
382
  - lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb
376
383
  - lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_output.rb
@@ -462,6 +469,8 @@ files:
462
469
  - lib/ingenico/connect/sdk/domain/product/account_on_file_display_hints.rb
463
470
  - lib/ingenico/connect/sdk/domain/product/authentication_indicator.rb
464
471
  - lib/ingenico/connect/sdk/domain/product/boleto_bancario_requiredness_validator.rb
472
+ - lib/ingenico/connect/sdk/domain/product/create_payment_product_session_request.rb
473
+ - lib/ingenico/connect/sdk/domain/product/create_payment_product_session_response.rb
465
474
  - lib/ingenico/connect/sdk/domain/product/device_fingerprint_request.rb
466
475
  - lib/ingenico/connect/sdk/domain/product/device_fingerprint_response.rb
467
476
  - lib/ingenico/connect/sdk/domain/product/directory.rb
@@ -472,6 +481,8 @@ files:
472
481
  - lib/ingenico/connect/sdk/domain/product/get_customer_details_response.rb
473
482
  - lib/ingenico/connect/sdk/domain/product/label_template_element.rb
474
483
  - lib/ingenico/connect/sdk/domain/product/length_validator.rb
484
+ - lib/ingenico/connect/sdk/domain/product/mobile_payment_product_session302_specific_input.rb
485
+ - lib/ingenico/connect/sdk/domain/product/mobile_payment_product_session302_specific_output.rb
475
486
  - lib/ingenico/connect/sdk/domain/product/payment_product.rb
476
487
  - lib/ingenico/connect/sdk/domain/product/payment_product302_specific_data.rb
477
488
  - lib/ingenico/connect/sdk/domain/product/payment_product320_specific_data.rb
@@ -716,8 +727,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
716
727
  - !ruby/object:Gem::Version
717
728
  version: '0'
718
729
  requirements: []
719
- rubyforge_project:
720
- rubygems_version: 2.7.6
730
+ rubygems_version: 3.0.3
721
731
  signing_key:
722
732
  specification_version: 4
723
733
  summary: SDK to communicate with the Ingenico ePayments platform using the Ingenico