six_saferpay 2.6.0 → 2.8.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad6ce329906e3637162ceec4bc1f5e4e332053f36c35062d9eb3022b9c5b01b0
4
- data.tar.gz: 6aa4715cc53630b12bb69b8ab91300eb02011edf57fa5d856199c3a5474ac531
3
+ metadata.gz: 40801df093437759814c7f334bb12042d12a9d19dc59f0db6a638b1bb9109b55
4
+ data.tar.gz: b9fc204b22ce10cdb98966da78e71a9d6e54c1fe2751202f1af2abc2fb46b478
5
5
  SHA512:
6
- metadata.gz: 15ff9f7bcbf264337275e4f2ee73a68d267c4e0e2bcfb0c1eaf58453bb9ae523a502d88a9c222979e04f743ea16614c8b66fe2a255fed9fdd510503f2e7f07e8
7
- data.tar.gz: f9381e3c98e9d2ce9021873c19395cb3572c14f49e9c665cfe4dccb724059771f00bfa8b2c66cfbe9c0c1fc32a75111d97e2f0906c3334044a9d5d694b34cf1e
6
+ metadata.gz: 337c945118043f36dacda140e8c41a7761426a9445f8ac09bd7a3ce1f888de041db957ea3ca4292d795e2a54564e811c55ec5a1cc5ebf5250385d690fba88160
7
+ data.tar.gz: dd3326fa32d08d6d3b2e3a64562a0c11207cc5dd7dba5da82eeb0409902b375cf45877232a1015f54155eacdb2e7855298c559ae4d1552ca5ef3c1834db9132a
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.2
1
+ 3.0.1
data/Gemfile.lock CHANGED
@@ -1,19 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- six_saferpay (2.6.0)
5
- activesupport (~> 6.1, >= 6.1.3)
4
+ six_saferpay (2.8.2)
5
+ activesupport (~> 5.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (6.1.3)
10
+ activesupport (5.2.5)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
- i18n (>= 1.6, < 2)
13
- minitest (>= 5.1)
14
- tzinfo (~> 2.0)
15
- zeitwerk (~> 2.3)
16
- addressable (2.7.0)
12
+ i18n (>= 0.7, < 2)
13
+ minitest (~> 5.1)
14
+ tzinfo (~> 1.1)
15
+ addressable (2.8.0)
17
16
  public_suffix (>= 2.0.2, < 5.0)
18
17
  coderay (1.1.3)
19
18
  concurrent-ruby (1.1.8)
@@ -24,10 +23,10 @@ GEM
24
23
  dotenv (2.7.6)
25
24
  ffi (1.14.2-java)
26
25
  hashdiff (1.0.1)
27
- i18n (1.8.9)
26
+ i18n (1.8.10)
28
27
  concurrent-ruby (~> 1.0)
29
28
  method_source (1.0.0)
30
- minitest (5.14.3)
29
+ minitest (5.14.4)
31
30
  pastel (0.8.0)
32
31
  tty-color (~> 0.5)
33
32
  pry (0.14.0)
@@ -39,7 +38,7 @@ GEM
39
38
  spoon (~> 0.0)
40
39
  public_suffix (4.0.6)
41
40
  rake (13.0.3)
42
- rexml (3.2.4)
41
+ rexml (3.2.5)
43
42
  rspec (3.10.0)
44
43
  rspec-core (~> 3.10.0)
45
44
  rspec-expectations (~> 3.10.0)
@@ -64,6 +63,8 @@ GEM
64
63
  spoon (0.0.6)
65
64
  ffi
66
65
  thor (1.1.0)
66
+ thread_safe (0.3.6)
67
+ thread_safe (0.3.6-java)
67
68
  tty-color (0.6.0)
68
69
  tty-cursor (0.7.1)
69
70
  tty-prompt (0.23.0)
@@ -74,15 +75,14 @@ GEM
74
75
  tty-screen (~> 0.8)
75
76
  wisper (~> 2.0)
76
77
  tty-screen (0.8.1)
77
- tzinfo (2.0.4)
78
- concurrent-ruby (~> 1.0)
78
+ tzinfo (1.2.9)
79
+ thread_safe (~> 0.1)
79
80
  vcr (4.0.0)
80
81
  webmock (3.11.2)
81
82
  addressable (>= 2.3.6)
82
83
  crack (>= 0.3.2)
83
84
  hashdiff (>= 0.4.0, < 2.0.0)
84
85
  wisper (2.0.1)
85
- zeitwerk (2.4.2)
86
86
 
87
87
  PLATFORMS
88
88
  arm64-darwin-20
@@ -104,4 +104,4 @@ DEPENDENCIES
104
104
  webmock (~> 3.10, >= 3.10)
105
105
 
106
106
  BUNDLED WITH
107
- 2.2.8
107
+ 2.2.15
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Current API Version
8
8
 
9
- This gem is compatible with the SIX API version: `1.18`
9
+ This gem is compatible with the SIX API version: `1.20`
10
10
 
11
11
  ## Installation
12
12
 
@@ -1,5 +1,5 @@
1
1
  module SixSaferpay
2
2
  module API
3
- VERSION = '1.18'
3
+ VERSION = '1.20'
4
4
  end
5
5
  end
@@ -9,7 +9,8 @@ module SixSaferpay
9
9
  :registration_result,
10
10
  :liability,
11
11
  :dcc,
12
- :mastercard_issuer_installments
12
+ :mastercard_issuer_installments,
13
+ :fraud_prevention,
13
14
  )
14
15
 
15
16
  def initialize(response_header:,
@@ -19,7 +20,8 @@ module SixSaferpay
19
20
  registration_result: nil,
20
21
  liability: nil,
21
22
  dcc: nil,
22
- mastercard_issuer_installments: nil
23
+ mastercard_issuer_installments: nil,
24
+ fraud_prevention: nil
23
25
  )
24
26
  @response_header = SixSaferpay::ResponseHeader.new(response_header.to_h)
25
27
  @transaction = SixSaferpay::Transaction.new(transaction.to_h)
@@ -32,6 +34,7 @@ module SixSaferpay
32
34
  @mastercard_issuer_installments = SixSaferpay::MastercardIssuerInstallments
33
35
  .new(mastercard_issuer_installments.to_h)
34
36
  end
37
+ @fraud_prevention = SixSaferpay::FraudPrevention.new(fraud_prevention.to_h) if fraud_prevention
35
38
  end
36
39
 
37
40
  def to_hash
@@ -46,6 +49,9 @@ module SixSaferpay
46
49
  if @mastercard_issuer_installments
47
50
  hash.merge!(mastercard_issuer_installments: mastercard_issuer_installments.to_h)
48
51
  end
52
+ if @fraud_prevention
53
+ hash.merge!(fraud_prevention: fraud_prevention.to_h)
54
+ end
49
55
  hash
50
56
  end
51
57
  alias_method :to_h, :to_hash
@@ -8,7 +8,9 @@ module SixSaferpay
8
8
  :payment_method,
9
9
  :payment_method_options,
10
10
  :payer,
11
- :notification
11
+ :notification,
12
+ :order,
13
+ :risk_factors,
12
14
  )
13
15
 
14
16
 
@@ -19,7 +21,10 @@ module SixSaferpay
19
21
  payment_method:,
20
22
  payment_method_options: nil,
21
23
  payer: nil,
22
- notification: )
24
+ notification:,
25
+ order: nil,
26
+ risk_factors: nil
27
+ )
23
28
  @request_header = request_header || SixSaferpay::RequestHeader.new()
24
29
  @terminal_id = terminal_id
25
30
  @payment = SixSaferpay::Payment.new(payment.to_h)
@@ -27,6 +32,8 @@ module SixSaferpay
27
32
  @payment_method_options = SixSaferpay::PaymentMethodOptions.new(payment_method_options.to_h) if payment_method_options
28
33
  @payer = SixSaferpay::Payer.new(payer.to_h) if payer
29
34
  @notification = SixSaferpay::Notification.new(notification.to_h)
35
+ @order = SixSaferpay::Order.new(order.to_h) if order
36
+ @risk_factors = SixSaferpay::RiskFactors.new(risk_factors.to_h) if risk_factors
30
37
  end
31
38
 
32
39
  def to_hash
@@ -38,6 +45,8 @@ module SixSaferpay
38
45
  hash.merge!(payment_method_options: @payment_method_options.to_h) if @payment_method_options
39
46
  hash.merge!(payer: @payer.to_h) if @payer
40
47
  hash.merge!(notification: @notification.to_h)
48
+ hash.merge!(order: @order.to_h) if @order
49
+ hash.merge!(risk_factors: @risk_factors.to_h) if @risk_factors
41
50
  hash
42
51
  end
43
52
  alias_method :to_h, :to_hash
@@ -8,7 +8,9 @@ module SixSaferpay
8
8
  :payment_means,
9
9
  :authentication,
10
10
  :register_alias,
11
- :payer
11
+ :payer,
12
+ :order,
13
+ :risk_factors
12
14
  )
13
15
 
14
16
 
@@ -18,7 +20,9 @@ module SixSaferpay
18
20
  payment_means:,
19
21
  authentication: nil,
20
22
  register_alias: nil,
21
- payer: nil
23
+ payer: nil,
24
+ order: nil,
25
+ risk_factors: nil
22
26
  )
23
27
  @request_header = request_header || SixSaferpay::RequestHeader.new()
24
28
  @terminal_id = SixSaferpay.config.terminal_id || terminal_id
@@ -27,6 +31,8 @@ module SixSaferpay
27
31
  @authentication = SixSaferpay::Authentication.new(authentication.to_h) if authentication
28
32
  @register_alias = SixSaferpay::RegisterAlias.new(register_alias.to_h) if register_alias
29
33
  @payer = SixSaferpay::Payer.new(payer.to_h) if payer
34
+ @order = SixSaferpay::Order.new(order.to_h) if order
35
+ @risk_factors = SixSaferpay::RiskFactors.new(risk_factors.to_h) if risk_factors
30
36
  end
31
37
 
32
38
  def to_hash
@@ -38,6 +44,8 @@ module SixSaferpay
38
44
  hash.merge!(authentication: @authentication.to_h) if @authentication
39
45
  hash.merge!(register_alias: @register_alias.to_h) if @register_alias
40
46
  hash.merge!(payer: @payer.to_h) if @payer
47
+ hash.merge!(order: @order.to_h) if @order
48
+ hash.merge!(risk_factors: @risk_factors.to_h) if @risk_factors
41
49
  hash
42
50
  end
43
51
  alias_method :to_h, :to_hash
@@ -7,7 +7,8 @@ module SixSaferpay
7
7
  :payment_means,
8
8
  :payer,
9
9
  :registration_result,
10
- :mastercard_issuer_installments
10
+ :mastercard_issuer_installments,
11
+ :fraud_prevention
11
12
  )
12
13
 
13
14
 
@@ -16,7 +17,8 @@ module SixSaferpay
16
17
  payment_means:,
17
18
  payer: nil,
18
19
  registration_result: nil,
19
- mastercard_issuer_installments: nil
20
+ mastercard_issuer_installments: nil,
21
+ fraud_prevention: nil
20
22
  )
21
23
  @response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
22
24
  @transaction = SixSaferpay::Transaction.new(transaction.to_h) if transaction
@@ -27,6 +29,9 @@ module SixSaferpay
27
29
  @mastercard_issuer_installments = SixSaferpay::MastercardIssuerInstallments
28
30
  .new(mastercard_issuer_installments.to_h)
29
31
  end
32
+ if fraud_prevention
33
+ @fraud_prevention = SixSaferpay::FraudPrevention.new(fraud_prevention.to_h)
34
+ end
30
35
  end
31
36
 
32
37
  def to_hash
@@ -39,6 +44,9 @@ module SixSaferpay
39
44
  if @mastercard_issuer_installments
40
45
  hash.merge!(mastercard_issuer_installments: mastercard_issuer_installments.to_h)
41
46
  end
47
+ if @fraud_prevention
48
+ hash.merge!(fraud_prevention: fraud_prevention.to_h)
49
+ end
42
50
  hash
43
51
  end
44
52
  alias_method :to_h, :to_hash
@@ -9,7 +9,8 @@ module SixSaferpay
9
9
  :registration_result,
10
10
  :liability,
11
11
  :dcc,
12
- :mastercard_issuer_installments
12
+ :mastercard_issuer_installments,
13
+ :fraud_prevention,
13
14
  )
14
15
 
15
16
 
@@ -20,7 +21,8 @@ module SixSaferpay
20
21
  registration_result: nil,
21
22
  liability: nil,
22
23
  dcc: nil,
23
- mastercard_issuer_installments: nil
24
+ mastercard_issuer_installments: nil,
25
+ fraud_prevention: nil
24
26
  )
25
27
  @response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
26
28
  @transaction = SixSaferpay::Transaction.new(transaction.to_h) if transaction
@@ -33,6 +35,7 @@ module SixSaferpay
33
35
  @mastercard_issuer_installments = SixSaferpay::MastercardIssuerInstallments
34
36
  .new(mastercard_issuer_installments.to_h)
35
37
  end
38
+ @fraud_prevention = SixSaferpay::FraudPrevention.new(fraud_prevention.to_h) if fraud_prevention
36
39
  end
37
40
 
38
41
  def to_hash
@@ -47,6 +50,9 @@ module SixSaferpay
47
50
  if @mastercard_issuer_installments
48
51
  hash.merge!(mastercard_issuer_installments: mastercard_issuer_installments.to_h)
49
52
  end
53
+ if @fraud_prevention
54
+ hash.merge!(fraud_prevention: fraud_prevention.to_h)
55
+ end
50
56
  hash
51
57
  end
52
58
  alias_method :to_h, :to_hash
@@ -6,14 +6,17 @@ module SixSaferpay
6
6
  :transaction,
7
7
  :payment_means,
8
8
  :payer,
9
- :liability
9
+ :liability,
10
+ :fraud_prevention
10
11
  )
11
12
 
12
13
  def initialize(response_header: ,
13
14
  transaction: ,
14
15
  payment_means: ,
15
16
  payer: nil,
16
- liability: nil)
17
+ liability: nil,
18
+ fraud_prevention: nil
19
+ )
17
20
 
18
21
 
19
22
  @response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
@@ -21,6 +24,9 @@ module SixSaferpay
21
24
  @payment_means = SixSaferpay::ResponsePaymentMeans.new(payment_means.to_h)
22
25
  @payer = SixSaferpay::Payer.new(payer.to_h) if payer
23
26
  @liability = SixSaferpay::Liability.new(liability.to_h) if liability
27
+ if fraud_prevention
28
+ @fraud_prevention = SixSaferpay::FraudPrevention.new(fraud_prevention.to_h)
29
+ end
24
30
  end
25
31
 
26
32
  def to_hash
@@ -30,6 +36,9 @@ module SixSaferpay
30
36
  hash.merge!(payment_means: @payment_means.to_h) if @payment_means
31
37
  hash.merge!(payer: @payer.to_h) if @payer
32
38
  hash.merge!(liability: @liability.to_h) if @liability
39
+ if @fraud_prevention
40
+ hash.merge!(fraud_prevention: fraud_prevention.to_h)
41
+ end
33
42
  hash
34
43
  end
35
44
  alias_method :to_h, :to_hash
@@ -0,0 +1,24 @@
1
+ module SixSaferpay
2
+ class FraudPrevention
3
+
4
+ attr_accessor(
5
+ :result,
6
+ )
7
+
8
+ def initialize(
9
+ result: nil
10
+ )
11
+ @result = result
12
+ end
13
+
14
+ def to_hash
15
+ hash = Hash.new
16
+ if @result
17
+ hash.merge!(result: @result)
18
+ end
19
+ hash
20
+ end
21
+ alias_method :to_h, :to_hash
22
+
23
+ end
24
+ end
@@ -1,15 +1,27 @@
1
1
  module SixSaferpay
2
2
  class Options
3
3
 
4
- attr_accessor :pre_auth
4
+ attr_accessor(
5
+ :pre_auth,
6
+ :allow_partial_authorization,
7
+ )
5
8
 
6
- def initialize(pre_auth: nil)
9
+ def initialize(
10
+ pre_auth: nil,
11
+ allow_partial_authorization: nil
12
+ )
7
13
  @pre_auth = pre_auth
14
+ @allow_partial_authorization = allow_partial_authorization
8
15
  end
9
16
 
10
17
  def to_hash
11
18
  hash = Hash.new
12
- hash.merge!(pre_auth: @pre_auth) if !@pre_auth.nil?
19
+ if !@pre_auth.nil?
20
+ hash.merge!(pre_auth: @pre_auth)
21
+ end
22
+ if !@allow_partial_authorization.nil?
23
+ hash.merge!(allow_partial_authorization: @allow_partial_authorization)
24
+ end
13
25
  hash
14
26
  end
15
27
  alias_method :to_h, :to_hash
@@ -1,3 +1,3 @@
1
1
  module SixSaferpay
2
- VERSION = "2.6.0"
2
+ VERSION = "2.8.2"
3
3
  end
data/six_saferpay.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ["lib"]
25
25
 
26
- spec.add_runtime_dependency 'activesupport', '~> 6.1', '>= 6.1.3'
26
+ spec.add_runtime_dependency 'activesupport', '~> 5.2'
27
27
 
28
28
  spec.add_development_dependency 'bundler', '~> 2.1'
29
29
  spec.add_development_dependency 'rake', '~> 13.0'
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: six_saferpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fadendaten GmbH
8
8
  - Felix Langenegger
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-02-19 00:00:00.000000000 Z
12
+ date: 2021-07-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -17,20 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '6.1'
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 6.1.3
20
+ version: '5.2'
24
21
  type: :runtime
25
22
  prerelease: false
26
23
  version_requirements: !ruby/object:Gem::Requirement
27
24
  requirements:
28
25
  - - "~>"
29
26
  - !ruby/object:Gem::Version
30
- version: '6.1'
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 6.1.3
27
+ version: '5.2'
34
28
  - !ruby/object:Gem::Dependency
35
29
  name: bundler
36
30
  requirement: !ruby/object:Gem::Requirement
@@ -321,6 +315,7 @@ files:
321
315
  - lib/six_saferpay/models/fee_refund.rb
322
316
  - lib/six_saferpay/models/first_installment_amount.rb
323
317
  - lib/six_saferpay/models/fraud_free.rb
318
+ - lib/six_saferpay/models/fraud_prevention.rb
324
319
  - lib/six_saferpay/models/ideal.rb
325
320
  - lib/six_saferpay/models/installment.rb
326
321
  - lib/six_saferpay/models/installment_fee.rb
@@ -377,7 +372,7 @@ homepage: https://github.com/fadendaten/six_saferpay
377
372
  licenses:
378
373
  - MIT
379
374
  metadata: {}
380
- post_install_message:
375
+ post_install_message:
381
376
  rdoc_options: []
382
377
  require_paths:
383
378
  - lib
@@ -392,8 +387,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
392
387
  - !ruby/object:Gem::Version
393
388
  version: '0'
394
389
  requirements: []
395
- rubygems_version: 3.1.4
396
- signing_key:
390
+ rubygems_version: 3.2.15
391
+ signing_key:
397
392
  specification_version: 4
398
393
  summary: Gem for the SIX Saferpay API
399
394
  test_files: []