six_saferpay 2.8.0 → 2.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile.lock +26 -33
- data/lib/generators/templates/model.erb +1 -1
- data/lib/six_saferpay/api/six_batch/responses/close_response.rb +1 -1
- data/lib/six_saferpay/api/six_omni_channel/requests/insert_alias.rb +1 -1
- data/lib/six_saferpay/api/six_omni_channel/responses/acquire_transaction_response.rb +4 -4
- data/lib/six_saferpay/api/six_omni_channel/responses/insert_alias_response.rb +4 -4
- data/lib/six_saferpay/api/six_payment_page/requests/initialize.rb +12 -12
- data/lib/six_saferpay/api/six_payment_page/responses/assert_response.rb +9 -9
- data/lib/six_saferpay/api/six_payment_page/responses/initialize_response.rb +1 -1
- data/lib/six_saferpay/api/six_secure_card_data/requests/insert.rb +6 -6
- data/lib/six_saferpay/api/six_secure_card_data/requests/insert_direct.rb +3 -3
- data/lib/six_saferpay/api/six_secure_card_data/requests/update.rb +2 -2
- data/lib/six_saferpay/api/six_secure_card_data/responses/assert_insert_response.rb +4 -4
- data/lib/six_saferpay/api/six_secure_card_data/responses/delete_response.rb +1 -1
- data/lib/six_saferpay/api/six_secure_card_data/responses/insert_direct_response.rb +4 -4
- data/lib/six_saferpay/api/six_secure_card_data/responses/insert_response.rb +2 -2
- data/lib/six_saferpay/api/six_secure_card_data/responses/update_response.rb +3 -3
- data/lib/six_saferpay/api/six_secure_pay_gate_offer/requests/create_offer.rb +4 -4
- data/lib/six_saferpay/api/six_transaction/requests/adjust_amount.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/requests/alternative_payment.rb +6 -6
- data/lib/six_saferpay/api/six_transaction/requests/assert_capture.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/requests/assert_refund.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/requests/authorize.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/requests/authorize_direct.rb +7 -7
- data/lib/six_saferpay/api/six_transaction/requests/authorize_referenced.rb +3 -3
- data/lib/six_saferpay/api/six_transaction/requests/cancel.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/requests/capture.rb +6 -6
- data/lib/six_saferpay/api/six_transaction/requests/initialize.rb +9 -9
- data/lib/six_saferpay/api/six_transaction/requests/inquire.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb +3 -3
- data/lib/six_saferpay/api/six_transaction/requests/multipart_finalize.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/requests/query_payment_means.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/requests/refund.rb +3 -3
- data/lib/six_saferpay/api/six_transaction/requests/refund_direct.rb +2 -2
- data/lib/six_saferpay/api/six_transaction/responses/adjust_amount_response.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/responses/alternative_payment_response.rb +2 -2
- data/lib/six_saferpay/api/six_transaction/responses/assert_capture_response.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/responses/assert_refund_response.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/responses/authorize_direct_response.rb +7 -7
- data/lib/six_saferpay/api/six_transaction/responses/authorize_response.rb +9 -9
- data/lib/six_saferpay/api/six_transaction/responses/authorized_referenced_response.rb +5 -5
- data/lib/six_saferpay/api/six_transaction/responses/cancel_response.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/responses/capture_response.rb +2 -2
- data/lib/six_saferpay/api/six_transaction/responses/initialize_response.rb +2 -2
- data/lib/six_saferpay/api/six_transaction/responses/inquire_response.rb +6 -6
- data/lib/six_saferpay/api/six_transaction/responses/multipart_capture_response.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/responses/multipart_finalize_response.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/responses/query_alternative_payment_response.rb +6 -6
- data/lib/six_saferpay/api/six_transaction/responses/query_payment_means_response.rb +3 -3
- data/lib/six_saferpay/api/six_transaction/responses/refund_direct_response.rb +4 -4
- data/lib/six_saferpay/api/six_transaction/responses/refund_response.rb +4 -4
- data/lib/six_saferpay/client.rb +2 -2
- data/lib/six_saferpay/errors/error.rb +1 -1
- data/lib/six_saferpay/models/chosen_plan.rb +2 -2
- data/lib/six_saferpay/models/dcc.rb +1 -1
- data/lib/six_saferpay/models/installment_plans.rb +4 -4
- data/lib/six_saferpay/models/invoice.rb +1 -1
- data/lib/six_saferpay/models/{items.rb → item.rb} +17 -34
- data/lib/six_saferpay/models/liability.rb +2 -2
- data/lib/six_saferpay/models/marketplace.rb +2 -2
- data/lib/six_saferpay/models/mastercard_issuer_installments.rb +3 -3
- data/lib/six_saferpay/models/order.rb +3 -3
- data/lib/six_saferpay/models/payer.rb +2 -2
- data/lib/six_saferpay/models/payer_profile.rb +1 -1
- data/lib/six_saferpay/models/payment.rb +4 -4
- data/lib/six_saferpay/models/payment_method_options.rb +1 -1
- data/lib/six_saferpay/models/payment_methods_options.rb +2 -2
- data/lib/six_saferpay/models/processing_data.rb +1 -1
- data/lib/six_saferpay/models/refund.rb +2 -2
- data/lib/six_saferpay/models/registration_result.rb +3 -3
- data/lib/six_saferpay/models/request_header.rb +1 -1
- data/lib/six_saferpay/models/request_payment_means.rb +4 -4
- data/lib/six_saferpay/models/response_payment_means.rb +4 -4
- data/lib/six_saferpay/models/risk_factors.rb +1 -1
- data/lib/six_saferpay/models/transaction.rb +3 -3
- data/lib/six_saferpay/models/update_payment_means.rb +1 -1
- data/lib/six_saferpay/version.rb +1 -1
- data/six_saferpay.gemspec +11 -9
- metadata +22 -46
data/lib/six_saferpay/client.rb
CHANGED
@@ -18,9 +18,9 @@ module SixSaferpay
|
|
18
18
|
hash = JSON.parse(hash, symbolize_names: true)
|
19
19
|
hash = transform_response_hash(hash)
|
20
20
|
if @response.code == '200'
|
21
|
-
@object.response_class.new(hash)
|
21
|
+
@object.response_class.new(**hash)
|
22
22
|
else
|
23
|
-
raise SixSaferpay::Error.new(hash)
|
23
|
+
raise SixSaferpay::Error.new(**hash)
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -22,7 +22,7 @@ module SixSaferpay
|
|
22
22
|
processor_result: nil,
|
23
23
|
processor_message: nil
|
24
24
|
)
|
25
|
-
@response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
|
25
|
+
@response_header = SixSaferpay::ResponseHeader.new(**response_header.to_h) if response_header
|
26
26
|
@behavior = behavior
|
27
27
|
@error_name = error_name
|
28
28
|
@error_message = error_message
|
@@ -25,14 +25,14 @@ module SixSaferpay
|
|
25
25
|
@interest_rate = interest_rate
|
26
26
|
if installment_fee
|
27
27
|
@installment_fee = SixSaferpay::InstallmentFee
|
28
|
-
.new(installment_fee.to_h)
|
28
|
+
.new(**installment_fee.to_h)
|
29
29
|
end
|
30
30
|
if annual_percentage_rate
|
31
31
|
@annual_percentage_rate = annual_percentage_rate
|
32
32
|
end
|
33
33
|
if total_amount_due
|
34
34
|
@total_amount_due = SixSaferpay::TotalAmountDue
|
35
|
-
.new(total_amount_due.to_h)
|
35
|
+
.new(**total_amount_due.to_h)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
@@ -24,22 +24,22 @@ module SixSaferpay
|
|
24
24
|
@interest_rate = interest_rate
|
25
25
|
if installment_fee
|
26
26
|
@installment_fee = SixSaferpay::InstallmentFee
|
27
|
-
.new(installment_fee.to_h)
|
27
|
+
.new(**installment_fee.to_h)
|
28
28
|
end
|
29
29
|
if annual_percentage_rate
|
30
30
|
@annual_percentage_rate = annual_percentage_rate
|
31
31
|
end
|
32
32
|
if first_installment_amount
|
33
33
|
@first_installment_amount = SixSaferpay::FirstInstallmentAmount
|
34
|
-
.new(first_installment_amount.to_h)
|
34
|
+
.new(**first_installment_amount.to_h)
|
35
35
|
end
|
36
36
|
if subsequent_installment_amount
|
37
37
|
@subsequent_installment_amount = SixSaferpay::SubsequentInstallmentAmount
|
38
|
-
.new(subsequent_installment_amount.to_h)
|
38
|
+
.new(**subsequent_installment_amount.to_h)
|
39
39
|
end
|
40
40
|
if total_amount_due
|
41
41
|
@total_amount_due = SixSaferpay::TotalAmountDue
|
42
|
-
.new(total_amount_due.to_h)
|
42
|
+
.new(**total_amount_due.to_h)
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
@@ -4,7 +4,7 @@ module SixSaferpay
|
|
4
4
|
attr_accessor(:payee, :reason_for_transfer, :due_date)
|
5
5
|
|
6
6
|
def initialize(payee: nil, reason_for_transfer: nil, due_date: nil)
|
7
|
-
@payee = SixSaferpay::Payee.new(payee.to_h) if payee
|
7
|
+
@payee = SixSaferpay::Payee.new(**payee.to_h) if payee
|
8
8
|
@reason_for_transfer = reason_for_transfer
|
9
9
|
@due_date = due_date
|
10
10
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module SixSaferpay
|
2
|
-
class
|
2
|
+
class Item
|
3
3
|
|
4
4
|
attr_accessor(
|
5
5
|
:type,
|
@@ -11,6 +11,7 @@ module SixSaferpay
|
|
11
11
|
:quantity,
|
12
12
|
:unit_price,
|
13
13
|
:is_pre_order,
|
14
|
+
:tax_rate,
|
14
15
|
:tax_amount,
|
15
16
|
:discount_amount,
|
16
17
|
)
|
@@ -25,6 +26,7 @@ module SixSaferpay
|
|
25
26
|
quantity: nil,
|
26
27
|
unit_price: nil,
|
27
28
|
is_pre_order: nil,
|
29
|
+
tax_rate: nil,
|
28
30
|
tax_amount: nil,
|
29
31
|
discount_amount: nil
|
30
32
|
)
|
@@ -37,45 +39,26 @@ module SixSaferpay
|
|
37
39
|
@quantity = quantity
|
38
40
|
@unit_price = unit_price
|
39
41
|
@is_pre_order = is_pre_order
|
42
|
+
@tax_rate = tax_rate
|
40
43
|
@tax_amount = tax_amount
|
41
44
|
@discount_amount = discount_amount
|
42
45
|
end
|
43
46
|
|
44
47
|
def to_hash
|
45
48
|
hash = Hash.new
|
46
|
-
if @type
|
47
|
-
|
48
|
-
|
49
|
-
if @
|
50
|
-
|
51
|
-
|
52
|
-
if @
|
53
|
-
|
54
|
-
|
55
|
-
if @
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
hash.merge!(category_name: @category_name)
|
60
|
-
end
|
61
|
-
if @description
|
62
|
-
hash.merge!(description: @description)
|
63
|
-
end
|
64
|
-
if @quantity
|
65
|
-
hash.merge!(quantity: @quantity)
|
66
|
-
end
|
67
|
-
if @unit_price
|
68
|
-
hash.merge!(unit_price: @unit_price)
|
69
|
-
end
|
70
|
-
if !@is_pre_order.nil?
|
71
|
-
hash.merge!(is_pre_order: @is_pre_order)
|
72
|
-
end
|
73
|
-
if @tax_amount
|
74
|
-
hash.merge!(tax_amount: @tax_amount)
|
75
|
-
end
|
76
|
-
if @discount_amount
|
77
|
-
hash.merge!(discount_amount: @discount_amount)
|
78
|
-
end
|
49
|
+
hash.merge!(type: @type) if @type
|
50
|
+
hash.merge!(id: @id) if @id
|
51
|
+
hash.merge!(variant_id: @variant_id) if @variant_id
|
52
|
+
hash.merge!(name: @name) if @name
|
53
|
+
hash.merge!(category_name: @category_name) if @category_name
|
54
|
+
hash.merge!(description: @description) if @description
|
55
|
+
hash.merge!(quantity: @quantity) if @quantity
|
56
|
+
hash.merge!(unit_price: @unit_price) if @unit_price
|
57
|
+
hash.merge!(is_pre_order: @is_pre_order) if !@is_pre_order.nil?
|
58
|
+
hash.merge!(tax_rate: @tax_rate) if @tax_rate
|
59
|
+
hash.merge!(tax_amount: @tax_amount) if @tax_amount
|
60
|
+
hash.merge!(discount_amount: @discount_amount) if @discount_amount
|
61
|
+
|
79
62
|
hash
|
80
63
|
end
|
81
64
|
alias_method :to_h, :to_hash
|
@@ -14,8 +14,8 @@ module SixSaferpay
|
|
14
14
|
)
|
15
15
|
@liability_shift = liability_shift
|
16
16
|
@liable_entity = liable_entity
|
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
|
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
|
19
19
|
end
|
20
20
|
|
21
21
|
def to_hash
|
@@ -5,8 +5,8 @@ module SixSaferpay
|
|
5
5
|
|
6
6
|
def initialize(submerchant_id: , fee: , fee_refund: )
|
7
7
|
@submerchant_id = submerchant_id
|
8
|
-
@fee = SixSaferpay::Fee.new(fee.to_h) if fee
|
9
|
-
@fee_refund = SixSaferpay::FeeRefund.new(fee_refund.to_h) if fee_refund
|
8
|
+
@fee = SixSaferpay::Fee.new(**fee.to_h) if fee
|
9
|
+
@fee_refund = SixSaferpay::FeeRefund.new(**fee_refund.to_h) if fee_refund
|
10
10
|
end
|
11
11
|
|
12
12
|
def to_hash
|
@@ -16,15 +16,15 @@ module SixSaferpay
|
|
16
16
|
)
|
17
17
|
if installment_plans
|
18
18
|
@installment_plans = SixSaferpay::InstallmentPlans
|
19
|
-
.new(installment_plans.to_h)
|
19
|
+
.new(**installment_plans.to_h)
|
20
20
|
end
|
21
21
|
if custom_plan
|
22
22
|
@custom_plan = SixSaferpay::CustomPlan
|
23
|
-
.new(custom_plan)
|
23
|
+
.new(**custom_plan.to_h)
|
24
24
|
end
|
25
25
|
if chosen_plan
|
26
26
|
@chosen_plan = SixSaferpay::ChosenPlan
|
27
|
-
.new(chosen_plan.to_h)
|
27
|
+
.new(**chosen_plan.to_h)
|
28
28
|
end
|
29
29
|
@receipt_free_text = receipt_free_text
|
30
30
|
end
|
@@ -6,18 +6,18 @@ module SixSaferpay
|
|
6
6
|
)
|
7
7
|
|
8
8
|
def initialize(
|
9
|
-
items:
|
9
|
+
items: []
|
10
10
|
)
|
11
11
|
|
12
12
|
if items
|
13
|
-
@items = SixSaferpay::
|
13
|
+
@items = items.map {|item_attr| SixSaferpay::Item.new(item_attr) }
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
17
|
def to_hash
|
18
18
|
hash = Hash.new
|
19
19
|
if @items
|
20
|
-
hash.merge!(items:
|
20
|
+
hash.merge!(items: items.map(&:to_hash))
|
21
21
|
end
|
22
22
|
hash
|
23
23
|
end
|
@@ -23,8 +23,8 @@ module SixSaferpay
|
|
23
23
|
@ip_address = ip_address
|
24
24
|
@ip_location = ip_location
|
25
25
|
@language_code = language_code
|
26
|
-
@delivery_address = SixSaferpay::DeliveryAddress.new(delivery_address.to_h) if delivery_address
|
27
|
-
@billing_address = SixSaferpay::BillingAddress.new(billing_address.to_h) if billing_address
|
26
|
+
@delivery_address = SixSaferpay::DeliveryAddress.new(**delivery_address.to_h) if delivery_address
|
27
|
+
@billing_address = SixSaferpay::BillingAddress.new(**billing_address.to_h) if billing_address
|
28
28
|
end
|
29
29
|
|
30
30
|
def to_hash
|
@@ -18,14 +18,14 @@ module SixSaferpay
|
|
18
18
|
options: nil,
|
19
19
|
recurring: nil,
|
20
20
|
installment: nil)
|
21
|
-
@amount = SixSaferpay::Amount.new(amount.to_h) if amount
|
21
|
+
@amount = SixSaferpay::Amount.new(**amount.to_h) if amount
|
22
22
|
@order_id = order_id
|
23
23
|
@description = description
|
24
24
|
@payer_note = payer_note
|
25
25
|
@mandate_id = mandate_id
|
26
|
-
@options = SixSaferpay::Options.new(options.to_h) if options
|
27
|
-
@recurring = SixSaferpay::Recurring.new(recurring.to_h) if recurring
|
28
|
-
@installment = SixSaferpay::Installment.new(installment.to_h) if installment
|
26
|
+
@options = SixSaferpay::Options.new(**options.to_h) if options
|
27
|
+
@recurring = SixSaferpay::Recurring.new(**recurring.to_h) if recurring
|
28
|
+
@installment = SixSaferpay::Installment.new(**installment.to_h) if installment
|
29
29
|
end
|
30
30
|
|
31
31
|
def to_hash
|
@@ -4,7 +4,7 @@ module SixSaferpay
|
|
4
4
|
attr_accessor(:bankcontact)
|
5
5
|
|
6
6
|
def initialize(bankcontact: nil)
|
7
|
-
@bankcontact = SixSaferpay::Bankcontact.new(bankcontact.to_h) if bankcontact
|
7
|
+
@bankcontact = SixSaferpay::Bankcontact.new(**bankcontact.to_h) if bankcontact
|
8
8
|
end
|
9
9
|
|
10
10
|
def to_hash
|
@@ -4,8 +4,8 @@ module SixSaferpay
|
|
4
4
|
attr_accessor(:alipay, :ideal)
|
5
5
|
|
6
6
|
def initialize(alipay: nil, ideal: nil)
|
7
|
-
@alipay = SixSaferpay::Alipay.new(alipay.to_h) if alipay
|
8
|
-
@ideal = SixSaferpay::Ideal.new(ideal.to_h) if ideal
|
7
|
+
@alipay = SixSaferpay::Alipay.new(**alipay.to_h) if alipay
|
8
|
+
@ideal = SixSaferpay::Ideal.new(**ideal.to_h) if ideal
|
9
9
|
end
|
10
10
|
|
11
11
|
def to_hash
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module SixSaferpay
|
2
|
-
class Refund
|
2
|
+
class Refund
|
3
3
|
|
4
4
|
attr_accessor(:amount,
|
5
5
|
:order_id,
|
@@ -9,7 +9,7 @@ module SixSaferpay
|
|
9
9
|
def initialize(amount:,
|
10
10
|
order_id: nil,
|
11
11
|
description: nil)
|
12
|
-
@amount = SixSaferpay::Amount.new(amount.to_h) if amount
|
12
|
+
@amount = SixSaferpay::Amount.new(**amount.to_h) if amount
|
13
13
|
@order_id = order_id
|
14
14
|
@description = description
|
15
15
|
end
|
@@ -14,11 +14,11 @@ module SixSaferpay
|
|
14
14
|
authentication_result: nil)
|
15
15
|
|
16
16
|
@success = success
|
17
|
-
@fd_alias = SixSaferpay::RegistrationAlias.new(fd_alias.to_h) if fd_alias
|
18
|
-
@error = SixSaferpay::RegistrationError.new(error.to_h) if error
|
17
|
+
@fd_alias = SixSaferpay::RegistrationAlias.new(**fd_alias.to_h) if fd_alias
|
18
|
+
@error = SixSaferpay::RegistrationError.new(**error.to_h) if error
|
19
19
|
if authentication_result
|
20
20
|
@authentication_result = SixSaferpay::AuthenticationResult
|
21
|
-
.new(authentication_result.to_h)
|
21
|
+
.new(**authentication_result.to_h)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -16,7 +16,7 @@ module SixSaferpay
|
|
16
16
|
@customer_id = customer_id || SixSaferpay.config.customer_id
|
17
17
|
@request_id = request_id || SecureRandom.uuid
|
18
18
|
@retry_indicator = retry_indicator || 0
|
19
|
-
@client_info = SixSaferpay::ClientInfo.new(client_info.to_h) if client_info
|
19
|
+
@client_info = SixSaferpay::ClientInfo.new(**client_info.to_h) if client_info
|
20
20
|
end
|
21
21
|
|
22
22
|
def to_hash
|
@@ -12,10 +12,10 @@ module SixSaferpay
|
|
12
12
|
fd_alias: nil,
|
13
13
|
saferpay_fields: nil
|
14
14
|
)
|
15
|
-
@card = SixSaferpay::RequestCard.new(card.to_h) if card
|
16
|
-
@bank_account = SixSaferpay::BankAccount.new(bank_account.to_h) if bank_account
|
17
|
-
@fd_alias = SixSaferpay::PaymentMeansAlias.new(fd_alias.to_h) if fd_alias
|
18
|
-
@saferpay_fields = SixSaferpay::SaferpayFields.new(saferpay_fields.to_h) if saferpay_fields
|
15
|
+
@card = SixSaferpay::RequestCard.new(**card.to_h) if card
|
16
|
+
@bank_account = SixSaferpay::BankAccount.new(**bank_account.to_h) if bank_account
|
17
|
+
@fd_alias = SixSaferpay::PaymentMeansAlias.new(**fd_alias.to_h) if fd_alias
|
18
|
+
@saferpay_fields = SixSaferpay::SaferpayFields.new(**saferpay_fields.to_h) if saferpay_fields
|
19
19
|
end
|
20
20
|
|
21
21
|
def to_hash
|
@@ -16,12 +16,12 @@ module SixSaferpay
|
|
16
16
|
bank_account: nil,
|
17
17
|
twint: nil
|
18
18
|
)
|
19
|
-
@brand = SixSaferpay::Brand.new(brand.to_h) if brand
|
19
|
+
@brand = SixSaferpay::Brand.new(**brand.to_h) if brand
|
20
20
|
@display_text = display_text
|
21
21
|
@wallet = wallet
|
22
|
-
@card = SixSaferpay::ResponseCard.new(card.to_h) if card
|
23
|
-
@bank_account = SixSaferpay::BankAccount.new(bank_account.to_h) if bank_account
|
24
|
-
@twint = SixSaferpay::Twint.new(twint.to_h) if twint
|
22
|
+
@card = SixSaferpay::ResponseCard.new(**card.to_h) if card
|
23
|
+
@bank_account = SixSaferpay::BankAccount.new(**bank_account.to_h) if bank_account
|
24
|
+
@twint = SixSaferpay::Twint.new(**twint.to_h) if twint
|
25
25
|
end
|
26
26
|
|
27
27
|
def to_hash
|
@@ -36,14 +36,14 @@ module SixSaferpay
|
|
36
36
|
@id = id
|
37
37
|
@capture_id = capture_id
|
38
38
|
@date = date
|
39
|
-
@amount = SixSaferpay::Amount.new(amount)
|
39
|
+
@amount = SixSaferpay::Amount.new(**amount.to_h)
|
40
40
|
@order_id = order_id
|
41
41
|
@acquirer_name = acquirer_name
|
42
42
|
@acquirer_reference = acquirer_reference
|
43
43
|
@six_transaction_reference = six_transaction_reference
|
44
44
|
@approval_code = approval_code
|
45
|
-
@direct_debit = SixSaferpay::DirectDebit.new(direct_debit) if direct_debit
|
46
|
-
@invoice = SixSaferpay::Invoice.new(invoice) if invoice
|
45
|
+
@direct_debit = SixSaferpay::DirectDebit.new(**direct_debit.to_h) if direct_debit
|
46
|
+
@invoice = SixSaferpay::Invoice.new(**invoice.to_h) if invoice
|
47
47
|
end
|
48
48
|
|
49
49
|
def to_hash
|
data/lib/six_saferpay/version.rb
CHANGED
data/six_saferpay.gemspec
CHANGED
@@ -14,6 +14,8 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.homepage = "https://github.com/fadendaten/six_saferpay"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
|
+
spec.required_ruby_version = Gem::Requirement.new('~> 2.5')
|
18
|
+
|
17
19
|
# Specify which files should be added to the gem when it is released.
|
18
20
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
21
|
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
@@ -23,17 +25,17 @@ Gem::Specification.new do |spec|
|
|
23
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
26
|
spec.require_paths = ["lib"]
|
25
27
|
|
26
|
-
spec.add_runtime_dependency 'activesupport', '
|
28
|
+
spec.add_runtime_dependency 'activesupport', '>= 6.0.0'
|
27
29
|
|
28
|
-
spec.add_development_dependency 'bundler', '~> 2.
|
30
|
+
spec.add_development_dependency 'bundler', '~> 2.2'
|
29
31
|
spec.add_development_dependency 'rake', '~> 13.0'
|
30
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
31
|
-
spec.add_development_dependency 'vcr', '~>
|
32
|
-
spec.add_development_dependency 'webmock', '~> 3.
|
33
|
-
spec.add_development_dependency 'dotenv', '~> 2.7'
|
32
|
+
spec.add_development_dependency 'rspec', '~> 3.1'
|
33
|
+
spec.add_development_dependency 'vcr', '~> 6.0'
|
34
|
+
spec.add_development_dependency 'webmock', '~> 3.13'
|
35
|
+
spec.add_development_dependency 'dotenv', '~> 2.7'
|
34
36
|
spec.add_development_dependency 'pry', '~> 0.14'
|
35
|
-
spec.add_development_dependency 'tty-prompt', '~> 0.
|
36
|
-
spec.add_development_dependency 'simplecov', '~> 0.
|
37
|
-
spec.add_development_dependency 'spinning_wheel', '~> 0
|
37
|
+
spec.add_development_dependency 'tty-prompt', '~> 0.23'
|
38
|
+
spec.add_development_dependency 'simplecov', '~> 0.21'
|
39
|
+
spec.add_development_dependency 'spinning_wheel', '~> 1.0'
|
38
40
|
spec.add_development_dependency 'thor', '~> 1.1.0'
|
39
41
|
end
|