six_saferpay 2.0.3 → 2.1.0
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/six_saferpay/api.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/requests/alternative_payment.rb +4 -0
- data/lib/six_saferpay/models/bankcontact.rb +21 -0
- data/lib/six_saferpay/models/payment_method_options.rb +18 -0
- data/lib/six_saferpay/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e05ed091dc5d88b814c29b9be0c9bcbb2542144cb3dea16c6b44b93229680a2
|
4
|
+
data.tar.gz: 226ca16339b7a2611fc41d717fb01c9a078f28f3c8f85c1e48d16ed2c5619467
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5eee7a8e8298d906740d1ca95716149add13b707710e9aa9803fadb79560b9167b33ea9d3d7a98898f839f9c3ba395dcb20fa5889cf869a5e091170a9b38a148
|
7
|
+
data.tar.gz: 7724483ec8efbd768c110fe18e9e7fcaf17b8eaad1b6babde78250a67a5c5319b7e4b341ddeffb1c2c2318096aec63546db4ee8facc27bb9c9db03e326bb8386
|
data/Gemfile.lock
CHANGED
data/lib/six_saferpay/api.rb
CHANGED
@@ -6,6 +6,7 @@ module SixSaferpay
|
|
6
6
|
:terminal_id,
|
7
7
|
:payment,
|
8
8
|
:payment_method,
|
9
|
+
:payment_method_options,
|
9
10
|
:payer,
|
10
11
|
:notification
|
11
12
|
)
|
@@ -16,12 +17,14 @@ module SixSaferpay
|
|
16
17
|
terminal_id:,
|
17
18
|
payment:,
|
18
19
|
payment_method:,
|
20
|
+
payment_method_options: nil,
|
19
21
|
payer: nil,
|
20
22
|
notification: )
|
21
23
|
@request_header = request_header || SixSaferpay::RequestHeader.new()
|
22
24
|
@terminal_id = terminal_id
|
23
25
|
@payment = SixSaferpay::Payment.new(payment.to_h)
|
24
26
|
@payment_method = payment_method
|
27
|
+
@payment_method_options = SixSaferpay::PaymentMethodOptions.new(payment_method_options.to_h) if payment_method_options
|
25
28
|
@payer = SixSaferpay::Payer.new(payer.to_h) if payer
|
26
29
|
@notification = SixSaferpay::Notification.new(notification.to_h)
|
27
30
|
end
|
@@ -32,6 +35,7 @@ module SixSaferpay
|
|
32
35
|
hash.merge!(terminal_id: @terminal_id)
|
33
36
|
hash.merge!(payment: @payment.to_h)
|
34
37
|
hash.merge!(payment_method: @payment_method)
|
38
|
+
hash.merge!(payment_method_options: @payment_method_options.to_h) if @payment_method_options
|
35
39
|
hash.merge!(payer: @payer.to_h) if @payer
|
36
40
|
hash.merge!(notification: @notification.to_h)
|
37
41
|
hash
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
class Bankcontact
|
3
|
+
|
4
|
+
attr_accessor(:app_default_redirect_url,
|
5
|
+
:app_completion_redirect_url)
|
6
|
+
|
7
|
+
def initialize(app_default_redirect_url: nil, app_completion_redirect_url: nil)
|
8
|
+
@app_default_redirect_url = app_default_redirect_url
|
9
|
+
@app_completion_redirect_url = app_completion_redirect_url
|
10
|
+
end
|
11
|
+
|
12
|
+
def to_hash
|
13
|
+
hash = Hash.new
|
14
|
+
hash.merge!(app_default_redirect_url: @app_default_redirect_url) if @app_default_redirect_url
|
15
|
+
hash.merge!(app_completion_redirect_url: @app_completion_redirect_url) if @app_completion_redirect_url
|
16
|
+
hash
|
17
|
+
end
|
18
|
+
alias_method :to_h, :to_hash
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
class PaymentMethodOptions
|
3
|
+
|
4
|
+
attr_accessor(:bankcontact)
|
5
|
+
|
6
|
+
def initialize(bankcontact: nil)
|
7
|
+
@bankcontact = SixSaferpay::Bankcontact.new(bankcontact.to_h) if bankcontact
|
8
|
+
end
|
9
|
+
|
10
|
+
def to_hash
|
11
|
+
hash = Hash.new
|
12
|
+
hash.merge!(bankcontact: @bankcontact.to_h) if @bankcontact
|
13
|
+
hash
|
14
|
+
end
|
15
|
+
alias_method :to_h, :to_hash
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
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: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fadendaten GmbH
|
@@ -276,6 +276,7 @@ files:
|
|
276
276
|
- lib/six_saferpay/models/amount.rb
|
277
277
|
- lib/six_saferpay/models/bancontact.rb
|
278
278
|
- lib/six_saferpay/models/bank_account.rb
|
279
|
+
- lib/six_saferpay/models/bankcontact.rb
|
279
280
|
- lib/six_saferpay/models/billing_address.rb
|
280
281
|
- lib/six_saferpay/models/billing_address_form.rb
|
281
282
|
- lib/six_saferpay/models/billpay.rb
|
@@ -304,6 +305,7 @@ files:
|
|
304
305
|
- lib/six_saferpay/models/payer_amount.rb
|
305
306
|
- lib/six_saferpay/models/payment.rb
|
306
307
|
- lib/six_saferpay/models/payment_means_alias.rb
|
308
|
+
- lib/six_saferpay/models/payment_method_options.rb
|
307
309
|
- lib/six_saferpay/models/payment_methods_options.rb
|
308
310
|
- lib/six_saferpay/models/pending_notification.rb
|
309
311
|
- lib/six_saferpay/models/processing_data.rb
|