six_saferpay 0.1.4 → 0.1.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bea6ec124f7dfb2fcb4ba076a42a2d5cb45785937edc632bbd07de621bbc28b
|
4
|
+
data.tar.gz: 7dbfbd4753af41138b9f408e8b006413babc4ed186e4b1dd4e87f03c9ae7b037
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31ecae0060fbdbef9b6ec492b745fd5044e6abc738e44b16063f2f159db9371248c2dbe3a548d4856feaeca77c82c257ae97ab18f423c1b5868f2bee3e584b7c
|
7
|
+
data.tar.gz: 9c7fe80c60ba03521b5f600676984e73ee01f7501faf56b1e1527f0dfab007ef6b191ae13abf6ea2735abc742b3c8d5b94a49e39fdafee812ec39918375fb3fe
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
class FraudFree
|
3
|
+
|
4
|
+
attr_accessor(:id,
|
5
|
+
:liability_shift,
|
6
|
+
:score,
|
7
|
+
:investigationpoints,
|
8
|
+
:error_message
|
9
|
+
)
|
10
|
+
|
11
|
+
def initialize(id: ,
|
12
|
+
liability_shift: ,
|
13
|
+
score: ,
|
14
|
+
investigationpoints: nil,
|
15
|
+
error_message: nil
|
16
|
+
)
|
17
|
+
@id = id
|
18
|
+
@liability_shift = liability_shift
|
19
|
+
@score = score
|
20
|
+
@investigationpoints = investigationpoints
|
21
|
+
@error_message = error_message
|
22
|
+
end
|
23
|
+
|
24
|
+
def to_hash
|
25
|
+
hash = Hash.new
|
26
|
+
hash.merge!(id: @id) if @id
|
27
|
+
hash.merge!(liability_shift: @liability_shift) if @liability_shift
|
28
|
+
hash.merge!(score: @score) if @score
|
29
|
+
hash.merge!(investigationpoints: @investigationpoints) if @investigationpoints
|
30
|
+
hash.merge!(error_message: @error_message) if @error_message
|
31
|
+
hash
|
32
|
+
end
|
33
|
+
alias_method :to_h, :to_hash
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
@@ -5,20 +5,17 @@ module SixSaferpay
|
|
5
5
|
:liable_entity,
|
6
6
|
:three_ds,
|
7
7
|
:fraud_free,
|
8
|
-
:dcc
|
9
8
|
)
|
10
9
|
|
11
10
|
def initialize(liability_shift:,
|
12
11
|
liable_entity:,
|
13
12
|
three_ds: nil,
|
14
|
-
fraud_free: nil
|
15
|
-
dcc: nil
|
13
|
+
fraud_free: nil
|
16
14
|
)
|
17
15
|
@liability_shift = liability_shift
|
18
16
|
@liable_entity = liable_entity
|
19
|
-
@three_ds = three_ds
|
20
|
-
@fraud_free = fraud_free
|
21
|
-
@dcc = dcc
|
17
|
+
@three_ds = SixSaferpay::ThreeDs.new(three_ds.to_h) if three_ds
|
18
|
+
@fraud_free = SixSaferpay::FraudFree.new(fraud_free.to_h) if fraud_free
|
22
19
|
end
|
23
20
|
|
24
21
|
def to_hash
|
@@ -27,7 +24,6 @@ module SixSaferpay
|
|
27
24
|
body.merge!(liable_entity: @liable_entity)
|
28
25
|
body.merge!(three_ds: @three_ds) if @three_ds
|
29
26
|
body.merge!(fraud_free: @fraud_free) if @fraud_free
|
30
|
-
body.merge!(dcc: @dcc) if @dcc
|
31
27
|
body
|
32
28
|
end
|
33
29
|
alias_method :to_h, :to_hash
|
@@ -16,12 +16,12 @@ module SixSaferpay
|
|
16
16
|
bank_account: nil,
|
17
17
|
twint: nil
|
18
18
|
)
|
19
|
-
@brand = brand
|
19
|
+
@brand = SixSaferpay::Brand.new(brand.to_h) if brand
|
20
20
|
@display_text = display_text
|
21
21
|
@wallet = wallet
|
22
|
-
@card = card
|
22
|
+
@card = SixSaferpay::Card.new(card.to_h) if card
|
23
23
|
@bank_account = bank_account
|
24
|
-
@twint = twint
|
24
|
+
@twint = SixSaferpay::Twint.new(twint.to_h) if twint
|
25
25
|
end
|
26
26
|
|
27
27
|
def to_hash
|
data/lib/six_saferpay/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: six_saferpay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Langenegger
|
@@ -205,6 +205,7 @@ files:
|
|
205
205
|
- lib/six_saferpay/models/delivery_address_form.rb
|
206
206
|
- lib/six_saferpay/models/fee.rb
|
207
207
|
- lib/six_saferpay/models/fee_refund.rb
|
208
|
+
- lib/six_saferpay/models/fraud_free.rb
|
208
209
|
- lib/six_saferpay/models/installment.rb
|
209
210
|
- lib/six_saferpay/models/invoice.rb
|
210
211
|
- lib/six_saferpay/models/liability.rb
|