connect-sdk-ruby 2.24.0 → 2.25.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: 043d7b426f2d6ab34d0f1949f364643320c32fc7763f152521cff4a250607f80
4
- data.tar.gz: f2a43f28b020e313336fe55417d20927e583009541f654d4e1936983b2aad571
3
+ metadata.gz: 7d3544e10cd38ce540eed9db96f91d7528f199344048fdf30a1c0e2fbfac7d88
4
+ data.tar.gz: 98805c926124ced5fe4237ad63d2ed40dc0e76fb16ca6ea12d510f50f809ea08
5
5
  SHA512:
6
- metadata.gz: 17d3926d57355cf9824fea6a8e7f4477509d7ee002ec3ecfcd041a243eb7b4352a91d4accebdce7bd5c23cbe0acddeda591a7bffbef3ecb7e060215f695f1b59
7
- data.tar.gz: d3dfb9d09d2b05df6239d9077ab75aeaa80908064c5e2aa05dbbd02ebbba25c179b9c28a6082fe595f76a4ab6198e6478dad30cc46b87723beee0cb79e95aef4
6
+ metadata.gz: 1c6d44127b3971794d6dc04d1156da56b45bc778af36e55d90eca4695b6369f660b44de56f53336ee95e15db3de85035b45b3d0e7e5ed5f77c0b1895f9856479
7
+ data.tar.gz: 13727982fff96b31b113738cbbc3242703b84236ebb0bfd040e180e25311762ecdadf6f112b725384cfbf2b3b451f841103ff7a3ca92a2911ac10bb5156e096d
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'connect-sdk-ruby'
3
- spec.version = '2.24.0'
3
+ spec.version = '2.25.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}
@@ -19,6 +19,7 @@ module Ingenico::Connect::SDK
19
19
  # @attr [Ingenico::Connect::SDK::Domain::Payment::ThreeDSecureData] prior_three_d_secure_data
20
20
  # @attr [Ingenico::Connect::SDK::Domain::Payment::SdkDataInput] sdk_data
21
21
  # @attr [true/false] skip_authentication
22
+ # @attr [String] transaction_risk_level
22
23
  class AbstractThreeDSecure < Ingenico::Connect::SDK::DataObject
23
24
 
24
25
  attr_accessor :authentication_amount
@@ -37,6 +38,8 @@ module Ingenico::Connect::SDK
37
38
 
38
39
  attr_accessor :skip_authentication
39
40
 
41
+ attr_accessor :transaction_risk_level
42
+
40
43
  # @return (Hash)
41
44
  def to_h
42
45
  hash = super
@@ -48,6 +51,7 @@ module Ingenico::Connect::SDK
48
51
  hash['priorThreeDSecureData'] = @prior_three_d_secure_data.to_h unless @prior_three_d_secure_data.nil?
49
52
  hash['sdkData'] = @sdk_data.to_h unless @sdk_data.nil?
50
53
  hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
54
+ hash['transactionRiskLevel'] = @transaction_risk_level unless @transaction_risk_level.nil?
51
55
  hash
52
56
  end
53
57
 
@@ -80,6 +84,9 @@ module Ingenico::Connect::SDK
80
84
  if hash.has_key? 'skipAuthentication'
81
85
  @skip_authentication = hash['skipAuthentication']
82
86
  end
87
+ if hash.has_key? 'transactionRiskLevel'
88
+ @transaction_risk_level = hash['transactionRiskLevel']
89
+ end
83
90
  end
84
91
  end
85
92
  end
@@ -8,10 +8,13 @@ module Ingenico::Connect::SDK
8
8
  module Domain
9
9
  module Payment
10
10
 
11
+ # @attr [String] data
11
12
  # @attr [String] method
12
13
  # @attr [String] utc_timestamp
13
14
  class CustomerAccountAuthentication < Ingenico::Connect::SDK::DataObject
14
15
 
16
+ attr_accessor :data
17
+
15
18
  attr_accessor :method
16
19
 
17
20
  attr_accessor :utc_timestamp
@@ -19,6 +22,7 @@ module Ingenico::Connect::SDK
19
22
  # @return (Hash)
20
23
  def to_h
21
24
  hash = super
25
+ hash['data'] = @data unless @data.nil?
22
26
  hash['method'] = @method unless @method.nil?
23
27
  hash['utcTimestamp'] = @utc_timestamp unless @utc_timestamp.nil?
24
28
  hash
@@ -26,6 +30,9 @@ module Ingenico::Connect::SDK
26
30
 
27
31
  def from_hash(hash)
28
32
  super
33
+ if hash.has_key? 'data'
34
+ @data = hash['data']
35
+ end
29
36
  if hash.has_key? 'method'
30
37
  @method = hash['method']
31
38
  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.24.0'
10
+ @@SDK_VERSION = '2.25.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
@@ -47,11 +47,10 @@ module Ingenico::Connect::SDK
47
47
  if value.nil? || value.empty?
48
48
  return value
49
49
  end
50
- # Replace all sequences of whitespace*-linebreak-whitespace* into a single linebreak-space
51
- # This will ensure that:
52
- # - no line ends with whitespace, because this causes authentication failures
53
- # - each line starts with a single whitespace, so it is a valid header value
54
- value.gsub(/[\s&&[^\r\n]]*(\r?\n)[\s&&[^\r\n]]*/, '\1 ')
50
+ # Replace all sequences of linebreak-whitespace* with a single linebreak-space
51
+ # This matches the normalization done by DefaultAuthenticator, and ensures that multiline headers
52
+ # will not cause authentication failures
53
+ value.gsub(/\r?\n[\s&&[^\r\n]]*/, ' ')
55
54
  end
56
55
  end
57
56
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: connect-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.24.0
4
+ version: 2.25.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: 2021-08-03 00:00:00.000000000 Z
11
+ date: 2021-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient