connect-sdk-ruby 2.7.0 → 2.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6099cda6eac7da4737b0bea9a334ca8fedbe9b355f93a9908bfc8db10052a58
4
- data.tar.gz: 3ffabf9da99a3aef5dfe82ea229c3f923f8aae83f67bde5058babc4591ce52d3
3
+ metadata.gz: 6d4a9ae210b8ddace94c5f9cd9923c0b4d849b22be757f1b8ef61b0e384654b0
4
+ data.tar.gz: b5355f9d6ceab565e22ecec60e5c72a723568a7b317950550232a3145bab551f
5
5
  SHA512:
6
- metadata.gz: 17cb263f8f4be7e76d0d63be7d280f2114e57e1e2747686be149c899ca9abd0bf870ec4d20cb4995a34ede144092191c7b503d7c247d1122dfda568357fc33e2
7
- data.tar.gz: 04e61626b2be322fdc2ad6be73985adf6a260851d3f24acf91544c797cf69332e341d661c4244a304e8d89fd9c5105a429db0eef346ddec36c1d41e98c5ea004
6
+ metadata.gz: 552d365906484b677d884d0fcff637830045d961d55a717e77fc3b3f29761044ed5f9775207328232bdae987b6c2386572f29f15630d947e79a6ce37a51a0cbd
7
+ data.tar.gz: a3b66c17876a63c9921483e8e7f918887477054d9689216bce45112353b1b41197c4a1c21e948e1bbbfacf84b6b50c700f53f7cb5b6e1266cecb75c7b5c8e2cc
data/README.md CHANGED
@@ -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/) 10.4 or higher
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/) 10.4 or higher
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:
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'connect-sdk-ruby'
3
- spec.version = '2.7.0'
3
+ spec.version = '2.12.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', '~> 10.4'
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'
@@ -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,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
@@ -8,16 +8,23 @@ module Ingenico::Connect::SDK
8
8
  module Domain
9
9
  module Payment
10
10
 
11
+ # @attr [String] acs_transaction_id
12
+ # @attr [String] applied_exemption
11
13
  # @attr [String] cavv
12
14
  # @attr [String] cavv_algorithm
13
15
  # @attr [String] directory_server_transaction_id
14
16
  # @attr [Integer] eci
17
+ # @attr [Integer] scheme_risk_score
15
18
  # @attr [String] three_d_secure_version
16
19
  # @attr [String] three_d_server_transaction_id
17
20
  # @attr [String] validation_result
18
21
  # @attr [String] xid
19
22
  class ExternalCardholderAuthenticationData < Ingenico::Connect::SDK::DataObject
20
23
 
24
+ attr_accessor :acs_transaction_id
25
+
26
+ attr_accessor :applied_exemption
27
+
21
28
  attr_accessor :cavv
22
29
 
23
30
  attr_accessor :cavv_algorithm
@@ -26,8 +33,12 @@ module Ingenico::Connect::SDK
26
33
 
27
34
  attr_accessor :eci
28
35
 
36
+ attr_accessor :scheme_risk_score
37
+
29
38
  attr_accessor :three_d_secure_version
30
39
 
40
+ #
41
+ # @deprecated No replacement
31
42
  attr_accessor :three_d_server_transaction_id
32
43
 
33
44
  attr_accessor :validation_result
@@ -37,10 +48,13 @@ module Ingenico::Connect::SDK
37
48
  # @return (Hash)
38
49
  def to_h
39
50
  hash = super
51
+ hash['acsTransactionId'] = @acs_transaction_id unless @acs_transaction_id.nil?
52
+ hash['appliedExemption'] = @applied_exemption unless @applied_exemption.nil?
40
53
  hash['cavv'] = @cavv unless @cavv.nil?
41
54
  hash['cavvAlgorithm'] = @cavv_algorithm unless @cavv_algorithm.nil?
42
55
  hash['directoryServerTransactionId'] = @directory_server_transaction_id unless @directory_server_transaction_id.nil?
43
56
  hash['eci'] = @eci unless @eci.nil?
57
+ hash['schemeRiskScore'] = @scheme_risk_score unless @scheme_risk_score.nil?
44
58
  hash['threeDSecureVersion'] = @three_d_secure_version unless @three_d_secure_version.nil?
45
59
  hash['threeDServerTransactionId'] = @three_d_server_transaction_id unless @three_d_server_transaction_id.nil?
46
60
  hash['validationResult'] = @validation_result unless @validation_result.nil?
@@ -50,6 +64,12 @@ module Ingenico::Connect::SDK
50
64
 
51
65
  def from_hash(hash)
52
66
  super
67
+ if hash.has_key? 'acsTransactionId'
68
+ @acs_transaction_id = hash['acsTransactionId']
69
+ end
70
+ if hash.has_key? 'appliedExemption'
71
+ @applied_exemption = hash['appliedExemption']
72
+ end
53
73
  if hash.has_key? 'cavv'
54
74
  @cavv = hash['cavv']
55
75
  end
@@ -62,6 +82,9 @@ module Ingenico::Connect::SDK
62
82
  if hash.has_key? 'eci'
63
83
  @eci = hash['eci']
64
84
  end
85
+ if hash.has_key? 'schemeRiskScore'
86
+ @scheme_risk_score = hash['schemeRiskScore']
87
+ end
65
88
  if hash.has_key? 'threeDSecureVersion'
66
89
  @three_d_secure_version = hash['threeDSecureVersion']
67
90
  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'])
@@ -0,0 +1,43 @@
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/address'
7
+ require 'ingenico/connect/sdk/domain/payment/trustly_bank_account'
8
+
9
+ module Ingenico::Connect::SDK
10
+ module Domain
11
+ module Payment
12
+
13
+ # @attr [Ingenico::Connect::SDK::Domain::Definitions::Address] billing_address
14
+ # @attr [Ingenico::Connect::SDK::Domain::Payment::TrustlyBankAccount] customer_account
15
+ class PaymentProduct806SpecificOutput < Ingenico::Connect::SDK::DataObject
16
+
17
+ attr_accessor :billing_address
18
+
19
+ attr_accessor :customer_account
20
+
21
+ # @return (Hash)
22
+ def to_h
23
+ hash = super
24
+ hash['billingAddress'] = @billing_address.to_h unless @billing_address.nil?
25
+ hash['customerAccount'] = @customer_account.to_h unless @customer_account.nil?
26
+ hash
27
+ end
28
+
29
+ def from_hash(hash)
30
+ super
31
+ if hash.has_key? 'billingAddress'
32
+ raise TypeError, "value '%s' is not a Hash" % [hash['billingAddress']] unless hash['billingAddress'].is_a? Hash
33
+ @billing_address = Ingenico::Connect::SDK::Domain::Definitions::Address.new_from_hash(hash['billingAddress'])
34
+ end
35
+ if hash.has_key? 'customerAccount'
36
+ raise TypeError, "value '%s' is not a Hash" % [hash['customerAccount']] unless hash['customerAccount'].is_a? Hash
37
+ @customer_account = Ingenico::Connect::SDK::Domain::Payment::TrustlyBankAccount.new_from_hash(hash['customerAccount'])
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -6,6 +6,7 @@ require 'ingenico/connect/sdk/domain/definitions/bank_account_iban'
6
6
  require 'ingenico/connect/sdk/domain/definitions/fraud_results'
7
7
  require 'ingenico/connect/sdk/domain/payment/abstract_payment_method_specific_output'
8
8
  require 'ingenico/connect/sdk/domain/payment/payment_product3201_specific_output'
9
+ require 'ingenico/connect/sdk/domain/payment/payment_product806_specific_output'
9
10
  require 'ingenico/connect/sdk/domain/payment/payment_product836_specific_output'
10
11
  require 'ingenico/connect/sdk/domain/payment/payment_product840_specific_output'
11
12
 
@@ -16,6 +17,7 @@ module Ingenico::Connect::SDK
16
17
  # @attr [Ingenico::Connect::SDK::Domain::Definitions::BankAccountIban] bank_account_iban
17
18
  # @attr [Ingenico::Connect::SDK::Domain::Definitions::FraudResults] fraud_results
18
19
  # @attr [Ingenico::Connect::SDK::Domain::Payment::PaymentProduct3201SpecificOutput] payment_product3201_specific_output
20
+ # @attr [Ingenico::Connect::SDK::Domain::Payment::PaymentProduct806SpecificOutput] payment_product806_specific_output
19
21
  # @attr [Ingenico::Connect::SDK::Domain::Payment::PaymentProduct836SpecificOutput] payment_product836_specific_output
20
22
  # @attr [Ingenico::Connect::SDK::Domain::Payment::PaymentProduct840SpecificOutput] payment_product840_specific_output
21
23
  # @attr [String] token
@@ -27,6 +29,8 @@ module Ingenico::Connect::SDK
27
29
 
28
30
  attr_accessor :payment_product3201_specific_output
29
31
 
32
+ attr_accessor :payment_product806_specific_output
33
+
30
34
  attr_accessor :payment_product836_specific_output
31
35
 
32
36
  attr_accessor :payment_product840_specific_output
@@ -39,6 +43,7 @@ module Ingenico::Connect::SDK
39
43
  hash['bankAccountIban'] = @bank_account_iban.to_h unless @bank_account_iban.nil?
40
44
  hash['fraudResults'] = @fraud_results.to_h unless @fraud_results.nil?
41
45
  hash['paymentProduct3201SpecificOutput'] = @payment_product3201_specific_output.to_h unless @payment_product3201_specific_output.nil?
46
+ hash['paymentProduct806SpecificOutput'] = @payment_product806_specific_output.to_h unless @payment_product806_specific_output.nil?
42
47
  hash['paymentProduct836SpecificOutput'] = @payment_product836_specific_output.to_h unless @payment_product836_specific_output.nil?
43
48
  hash['paymentProduct840SpecificOutput'] = @payment_product840_specific_output.to_h unless @payment_product840_specific_output.nil?
44
49
  hash['token'] = @token unless @token.nil?
@@ -59,6 +64,10 @@ module Ingenico::Connect::SDK
59
64
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3201SpecificOutput']] unless hash['paymentProduct3201SpecificOutput'].is_a? Hash
60
65
  @payment_product3201_specific_output = Ingenico::Connect::SDK::Domain::Payment::PaymentProduct3201SpecificOutput.new_from_hash(hash['paymentProduct3201SpecificOutput'])
61
66
  end
67
+ if hash.has_key? 'paymentProduct806SpecificOutput'
68
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct806SpecificOutput']] unless hash['paymentProduct806SpecificOutput'].is_a? Hash
69
+ @payment_product806_specific_output = Ingenico::Connect::SDK::Domain::Payment::PaymentProduct806SpecificOutput.new_from_hash(hash['paymentProduct806SpecificOutput'])
70
+ end
62
71
  if hash.has_key? 'paymentProduct836SpecificOutput'
63
72
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct836SpecificOutput']] unless hash['paymentProduct836SpecificOutput'].is_a? Hash
64
73
  @payment_product836_specific_output = Ingenico::Connect::SDK::Domain::Payment::PaymentProduct836SpecificOutput.new_from_hash(hash['paymentProduct836SpecificOutput'])
@@ -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
 
@@ -10,9 +11,13 @@ module Ingenico::Connect::SDK
10
11
  module Domain
11
12
  module Payment
12
13
 
14
+ # @attr [String] acs_transaction_id
15
+ # @attr [String] applied_exemption
16
+ # @attr [Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney] authentication_amount
13
17
  # @attr [String] cavv
14
18
  # @attr [String] directory_server_transaction_id
15
19
  # @attr [String] eci
20
+ # @attr [Integer] scheme_risk_score
16
21
  # @attr [Ingenico::Connect::SDK::Domain::Payment::SdkDataOutput] sdk_data
17
22
  # @attr [Ingenico::Connect::SDK::Domain::Payment::ThreeDSecureData] three_d_secure_data
18
23
  # @attr [String] three_d_secure_version
@@ -20,12 +25,20 @@ module Ingenico::Connect::SDK
20
25
  # @attr [String] xid
21
26
  class ThreeDSecureResults < Ingenico::Connect::SDK::DataObject
22
27
 
28
+ attr_accessor :acs_transaction_id
29
+
30
+ attr_accessor :applied_exemption
31
+
32
+ attr_accessor :authentication_amount
33
+
23
34
  attr_accessor :cavv
24
35
 
25
36
  attr_accessor :directory_server_transaction_id
26
37
 
27
38
  attr_accessor :eci
28
39
 
40
+ attr_accessor :scheme_risk_score
41
+
29
42
  attr_accessor :sdk_data
30
43
 
31
44
  attr_accessor :three_d_secure_data
@@ -39,9 +52,13 @@ module Ingenico::Connect::SDK
39
52
  # @return (Hash)
40
53
  def to_h
41
54
  hash = super
55
+ hash['acsTransactionId'] = @acs_transaction_id unless @acs_transaction_id.nil?
56
+ hash['appliedExemption'] = @applied_exemption unless @applied_exemption.nil?
57
+ hash['authenticationAmount'] = @authentication_amount.to_h unless @authentication_amount.nil?
42
58
  hash['cavv'] = @cavv unless @cavv.nil?
43
59
  hash['directoryServerTransactionId'] = @directory_server_transaction_id unless @directory_server_transaction_id.nil?
44
60
  hash['eci'] = @eci unless @eci.nil?
61
+ hash['schemeRiskScore'] = @scheme_risk_score unless @scheme_risk_score.nil?
45
62
  hash['sdkData'] = @sdk_data.to_h unless @sdk_data.nil?
46
63
  hash['threeDSecureData'] = @three_d_secure_data.to_h unless @three_d_secure_data.nil?
47
64
  hash['threeDSecureVersion'] = @three_d_secure_version unless @three_d_secure_version.nil?
@@ -52,6 +69,16 @@ module Ingenico::Connect::SDK
52
69
 
53
70
  def from_hash(hash)
54
71
  super
72
+ if hash.has_key? 'acsTransactionId'
73
+ @acs_transaction_id = hash['acsTransactionId']
74
+ end
75
+ if hash.has_key? 'appliedExemption'
76
+ @applied_exemption = hash['appliedExemption']
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
55
82
  if hash.has_key? 'cavv'
56
83
  @cavv = hash['cavv']
57
84
  end
@@ -61,6 +88,9 @@ module Ingenico::Connect::SDK
61
88
  if hash.has_key? 'eci'
62
89
  @eci = hash['eci']
63
90
  end
91
+ if hash.has_key? 'schemeRiskScore'
92
+ @scheme_risk_score = hash['schemeRiskScore']
93
+ end
64
94
  if hash.has_key? 'sdkData'
65
95
  raise TypeError, "value '%s' is not a Hash" % [hash['sdkData']] unless hash['sdkData'].is_a? Hash
66
96
  @sdk_data = Ingenico::Connect::SDK::Domain::Payment::SdkDataOutput.new_from_hash(hash['sdkData'])
@@ -0,0 +1,53 @@
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] account_last_digits
12
+ # @attr [String] bank_name
13
+ # @attr [String] clearinghouse
14
+ # @attr [String] person_identification_number
15
+ class TrustlyBankAccount < Ingenico::Connect::SDK::DataObject
16
+
17
+ attr_accessor :account_last_digits
18
+
19
+ attr_accessor :bank_name
20
+
21
+ attr_accessor :clearinghouse
22
+
23
+ attr_accessor :person_identification_number
24
+
25
+ # @return (Hash)
26
+ def to_h
27
+ hash = super
28
+ hash['accountLastDigits'] = @account_last_digits unless @account_last_digits.nil?
29
+ hash['bankName'] = @bank_name unless @bank_name.nil?
30
+ hash['clearinghouse'] = @clearinghouse unless @clearinghouse.nil?
31
+ hash['personIdentificationNumber'] = @person_identification_number unless @person_identification_number.nil?
32
+ hash
33
+ end
34
+
35
+ def from_hash(hash)
36
+ super
37
+ if hash.has_key? 'accountLastDigits'
38
+ @account_last_digits = hash['accountLastDigits']
39
+ end
40
+ if hash.has_key? 'bankName'
41
+ @bank_name = hash['bankName']
42
+ end
43
+ if hash.has_key? 'clearinghouse'
44
+ @clearinghouse = hash['clearinghouse']
45
+ end
46
+ if hash.has_key? 'personIdentificationNumber'
47
+ @person_identification_number = hash['personIdentificationNumber']
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ 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
@@ -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
 
@@ -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.7.0'
10
+ @@SDK_VERSION = '2.12.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
@@ -1,5 +1,5 @@
1
1
  {
2
- "value": *****
2
+ "value": ****,
3
3
  "value": {
4
4
  }
5
- }
5
+ }
@@ -2,4 +2,4 @@
2
2
  "value": true,
3
3
  "value": {
4
4
  }
5
- }
5
+ }
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.7.0
4
+ version: 2.12.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-03-10 00:00:00.000000000 Z
11
+ date: 2020-06-15 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: '10.4'
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: '10.4'
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:
@@ -387,6 +393,7 @@ files:
387
393
  - lib/ingenico/connect/sdk/domain/payment/payment_output.rb
388
394
  - lib/ingenico/connect/sdk/domain/payment/payment_product3201_specific_output.rb
389
395
  - lib/ingenico/connect/sdk/domain/payment/payment_product771_specific_output.rb
396
+ - lib/ingenico/connect/sdk/domain/payment/payment_product806_specific_output.rb
390
397
  - lib/ingenico/connect/sdk/domain/payment/payment_product836_specific_output.rb
391
398
  - lib/ingenico/connect/sdk/domain/payment/payment_product840_customer_account.rb
392
399
  - lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb
@@ -437,6 +444,7 @@ files:
437
444
  - lib/ingenico/connect/sdk/domain/payment/three_d_secure_data.rb
438
445
  - lib/ingenico/connect/sdk/domain/payment/three_d_secure_results.rb
439
446
  - lib/ingenico/connect/sdk/domain/payment/tokenize_payment_request.rb
447
+ - lib/ingenico/connect/sdk/domain/payment/trustly_bank_account.rb
440
448
  - lib/ingenico/connect/sdk/domain/payout/abstract_payout_method_specific_input.rb
441
449
  - lib/ingenico/connect/sdk/domain/payout/approve_payout_request.rb
442
450
  - lib/ingenico/connect/sdk/domain/payout/bank_transfer_payout_method_specific_input.rb