onlinepayments-sdk-ruby 4.9.0 → 4.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onlinepayments/sdk/domain/card_info.rb +30 -0
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input.rb +24 -0
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_base.rb +24 -0
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb +24 -0
- data/lib/onlinepayments/sdk/domain/currency_conversion.rb +34 -0
- data/lib/onlinepayments/sdk/domain/currency_conversion_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/currency_conversion_request.rb +38 -0
- data/lib/onlinepayments/sdk/domain/currency_conversion_response.rb +42 -0
- data/lib/onlinepayments/sdk/domain/currency_conversion_result.rb +30 -0
- data/lib/onlinepayments/sdk/domain/currency_conversion_specific_input.rb +26 -0
- data/lib/onlinepayments/sdk/domain/dcc_proposal.rb +53 -0
- data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb +4 -0
- data/lib/onlinepayments/sdk/domain/payment_product3208_specific_input.rb +26 -0
- data/lib/onlinepayments/sdk/domain/payment_product3208_specific_output.rb +26 -0
- data/lib/onlinepayments/sdk/domain/payment_product3209_specific_input.rb +26 -0
- data/lib/onlinepayments/sdk/domain/payment_product3209_specific_output.rb +26 -0
- data/lib/onlinepayments/sdk/domain/rate_details.rb +42 -0
- data/lib/onlinepayments/sdk/domain/refund_card_method_specific_output.rb +8 -0
- data/lib/onlinepayments/sdk/domain/transaction.rb +34 -0
- data/lib/onlinepayments/sdk/merchant/services/services_client.rb +31 -0
- data/onlinepayments-sdk-ruby.gemspec +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80e9ec9bc45a1394783686111554a405bc1a440fdae5314d04c6ef703ee124ab
|
4
|
+
data.tar.gz: 84eef010aa3ec8234ae53a0548b73efe536af4a6d578d2b8e71a1360e3a66768
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d42961e727b8786d36944eb31649b491975fb6ed02292621245f8c43fcd67a9203d34cb7406e9fa4aeb49a30335d38cea849b47e53b1b88938f82e6dfe8a1482
|
7
|
+
data.tar.gz: 291c78f423181cb85c88e9c6de9abd085e730ff65369796fd9d6ce4953c35520400fc7b7f1265a5496f248129612cbedb475f68d530144c7f5b16b5a44d9cf76
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] card_number
|
10
|
+
# @attr [Integer] payment_product_id
|
11
|
+
class CardInfo < OnlinePayments::SDK::DataObject
|
12
|
+
attr_accessor :card_number
|
13
|
+
attr_accessor :payment_product_id
|
14
|
+
|
15
|
+
# @return (Hash)
|
16
|
+
def to_h
|
17
|
+
hash = super
|
18
|
+
hash['cardNumber'] = @card_number unless @card_number.nil?
|
19
|
+
hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
|
20
|
+
hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def from_hash(hash)
|
24
|
+
super
|
25
|
+
@card_number = hash['cardNumber'] if hash.key? 'cardNumber'
|
26
|
+
@payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -4,7 +4,10 @@
|
|
4
4
|
require 'onlinepayments/sdk/data_object'
|
5
5
|
require 'onlinepayments/sdk/domain/card'
|
6
6
|
require 'onlinepayments/sdk/domain/card_recurrence_details'
|
7
|
+
require 'onlinepayments/sdk/domain/currency_conversion_input'
|
7
8
|
require 'onlinepayments/sdk/domain/payment_product130_specific_input'
|
9
|
+
require 'onlinepayments/sdk/domain/payment_product3208_specific_input'
|
10
|
+
require 'onlinepayments/sdk/domain/payment_product3209_specific_input'
|
8
11
|
require 'onlinepayments/sdk/domain/three_d_secure'
|
9
12
|
|
10
13
|
module OnlinePayments::SDK
|
@@ -15,9 +18,12 @@ module OnlinePayments::SDK
|
|
15
18
|
# @attr [OnlinePayments::SDK::Domain::Card] card
|
16
19
|
# @attr [String] card_on_file_recurring_expiration
|
17
20
|
# @attr [String] card_on_file_recurring_frequency
|
21
|
+
# @attr [OnlinePayments::SDK::Domain::CurrencyConversionInput] currency_conversion
|
18
22
|
# @attr [String] initial_scheme_transaction_id
|
19
23
|
# @attr [true/false] is_recurring
|
20
24
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
|
25
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3208SpecificInput] payment_product3208_specific_input
|
26
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3209SpecificInput] payment_product3209_specific_input
|
21
27
|
# @attr [Integer] payment_product_id
|
22
28
|
# @attr [OnlinePayments::SDK::Domain::CardRecurrenceDetails] recurring
|
23
29
|
# @attr [String] return_url
|
@@ -35,9 +41,12 @@ module OnlinePayments::SDK
|
|
35
41
|
attr_accessor :card
|
36
42
|
attr_accessor :card_on_file_recurring_expiration
|
37
43
|
attr_accessor :card_on_file_recurring_frequency
|
44
|
+
attr_accessor :currency_conversion
|
38
45
|
attr_accessor :initial_scheme_transaction_id
|
39
46
|
attr_accessor :is_recurring
|
40
47
|
attr_accessor :payment_product130_specific_input
|
48
|
+
attr_accessor :payment_product3208_specific_input
|
49
|
+
attr_accessor :payment_product3209_specific_input
|
41
50
|
attr_accessor :payment_product_id
|
42
51
|
attr_accessor :recurring
|
43
52
|
attr_accessor :return_url
|
@@ -58,9 +67,12 @@ module OnlinePayments::SDK
|
|
58
67
|
hash['card'] = @card.to_h if @card
|
59
68
|
hash['cardOnFileRecurringExpiration'] = @card_on_file_recurring_expiration unless @card_on_file_recurring_expiration.nil?
|
60
69
|
hash['cardOnFileRecurringFrequency'] = @card_on_file_recurring_frequency unless @card_on_file_recurring_frequency.nil?
|
70
|
+
hash['currencyConversion'] = @currency_conversion.to_h if @currency_conversion
|
61
71
|
hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
|
62
72
|
hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
|
63
73
|
hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h if @payment_product130_specific_input
|
74
|
+
hash['paymentProduct3208SpecificInput'] = @payment_product3208_specific_input.to_h if @payment_product3208_specific_input
|
75
|
+
hash['paymentProduct3209SpecificInput'] = @payment_product3209_specific_input.to_h if @payment_product3209_specific_input
|
64
76
|
hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
|
65
77
|
hash['recurring'] = @recurring.to_h if @recurring
|
66
78
|
hash['returnUrl'] = @return_url unless @return_url.nil?
|
@@ -85,12 +97,24 @@ module OnlinePayments::SDK
|
|
85
97
|
end
|
86
98
|
@card_on_file_recurring_expiration = hash['cardOnFileRecurringExpiration'] if hash.key? 'cardOnFileRecurringExpiration'
|
87
99
|
@card_on_file_recurring_frequency = hash['cardOnFileRecurringFrequency'] if hash.key? 'cardOnFileRecurringFrequency'
|
100
|
+
if hash.key? 'currencyConversion'
|
101
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['currencyConversion']] unless hash['currencyConversion'].is_a? Hash
|
102
|
+
@currency_conversion = OnlinePayments::SDK::Domain::CurrencyConversionInput.new_from_hash(hash['currencyConversion'])
|
103
|
+
end
|
88
104
|
@initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId'
|
89
105
|
@is_recurring = hash['isRecurring'] if hash.key? 'isRecurring'
|
90
106
|
if hash.key? 'paymentProduct130SpecificInput'
|
91
107
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct130SpecificInput']] unless hash['paymentProduct130SpecificInput'].is_a? Hash
|
92
108
|
@payment_product130_specific_input = OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput.new_from_hash(hash['paymentProduct130SpecificInput'])
|
93
109
|
end
|
110
|
+
if hash.key? 'paymentProduct3208SpecificInput'
|
111
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3208SpecificInput']] unless hash['paymentProduct3208SpecificInput'].is_a? Hash
|
112
|
+
@payment_product3208_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3208SpecificInput.new_from_hash(hash['paymentProduct3208SpecificInput'])
|
113
|
+
end
|
114
|
+
if hash.key? 'paymentProduct3209SpecificInput'
|
115
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3209SpecificInput']] unless hash['paymentProduct3209SpecificInput'].is_a? Hash
|
116
|
+
@payment_product3209_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3209SpecificInput.new_from_hash(hash['paymentProduct3209SpecificInput'])
|
117
|
+
end
|
94
118
|
@payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
|
95
119
|
if hash.key? 'recurring'
|
96
120
|
raise TypeError, "value '%s' is not a Hash" % [hash['recurring']] unless hash['recurring'].is_a? Hash
|
@@ -3,7 +3,10 @@
|
|
3
3
|
#
|
4
4
|
require 'onlinepayments/sdk/data_object'
|
5
5
|
require 'onlinepayments/sdk/domain/card_recurrence_details'
|
6
|
+
require 'onlinepayments/sdk/domain/currency_conversion_specific_input'
|
6
7
|
require 'onlinepayments/sdk/domain/payment_product130_specific_input'
|
8
|
+
require 'onlinepayments/sdk/domain/payment_product3208_specific_input'
|
9
|
+
require 'onlinepayments/sdk/domain/payment_product3209_specific_input'
|
7
10
|
require 'onlinepayments/sdk/domain/payment_product5100_specific_input'
|
8
11
|
require 'onlinepayments/sdk/domain/three_d_secure_base'
|
9
12
|
|
@@ -12,8 +15,11 @@ module OnlinePayments::SDK
|
|
12
15
|
|
13
16
|
# @attr [true/false] allow_dynamic_linking
|
14
17
|
# @attr [String] authorization_mode
|
18
|
+
# @attr [OnlinePayments::SDK::Domain::CurrencyConversionSpecificInput] currency_conversion_specific_input
|
15
19
|
# @attr [String] initial_scheme_transaction_id
|
16
20
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
|
21
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3208SpecificInput] payment_product3208_specific_input
|
22
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3209SpecificInput] payment_product3209_specific_input
|
17
23
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct5100SpecificInput] payment_product5100_specific_input
|
18
24
|
# @attr [Integer] payment_product_id
|
19
25
|
# @attr [OnlinePayments::SDK::Domain::CardRecurrenceDetails] recurring
|
@@ -26,8 +32,11 @@ module OnlinePayments::SDK
|
|
26
32
|
class CardPaymentMethodSpecificInputBase < OnlinePayments::SDK::DataObject
|
27
33
|
attr_accessor :allow_dynamic_linking
|
28
34
|
attr_accessor :authorization_mode
|
35
|
+
attr_accessor :currency_conversion_specific_input
|
29
36
|
attr_accessor :initial_scheme_transaction_id
|
30
37
|
attr_accessor :payment_product130_specific_input
|
38
|
+
attr_accessor :payment_product3208_specific_input
|
39
|
+
attr_accessor :payment_product3209_specific_input
|
31
40
|
attr_accessor :payment_product5100_specific_input
|
32
41
|
attr_accessor :payment_product_id
|
33
42
|
attr_accessor :recurring
|
@@ -43,8 +52,11 @@ module OnlinePayments::SDK
|
|
43
52
|
hash = super
|
44
53
|
hash['allowDynamicLinking'] = @allow_dynamic_linking unless @allow_dynamic_linking.nil?
|
45
54
|
hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
|
55
|
+
hash['currencyConversionSpecificInput'] = @currency_conversion_specific_input.to_h if @currency_conversion_specific_input
|
46
56
|
hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
|
47
57
|
hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h if @payment_product130_specific_input
|
58
|
+
hash['paymentProduct3208SpecificInput'] = @payment_product3208_specific_input.to_h if @payment_product3208_specific_input
|
59
|
+
hash['paymentProduct3209SpecificInput'] = @payment_product3209_specific_input.to_h if @payment_product3209_specific_input
|
48
60
|
hash['paymentProduct5100SpecificInput'] = @payment_product5100_specific_input.to_h if @payment_product5100_specific_input
|
49
61
|
hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
|
50
62
|
hash['recurring'] = @recurring.to_h if @recurring
|
@@ -61,11 +73,23 @@ module OnlinePayments::SDK
|
|
61
73
|
super
|
62
74
|
@allow_dynamic_linking = hash['allowDynamicLinking'] if hash.key? 'allowDynamicLinking'
|
63
75
|
@authorization_mode = hash['authorizationMode'] if hash.key? 'authorizationMode'
|
76
|
+
if hash.key? 'currencyConversionSpecificInput'
|
77
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['currencyConversionSpecificInput']] unless hash['currencyConversionSpecificInput'].is_a? Hash
|
78
|
+
@currency_conversion_specific_input = OnlinePayments::SDK::Domain::CurrencyConversionSpecificInput.new_from_hash(hash['currencyConversionSpecificInput'])
|
79
|
+
end
|
64
80
|
@initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId'
|
65
81
|
if hash.key? 'paymentProduct130SpecificInput'
|
66
82
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct130SpecificInput']] unless hash['paymentProduct130SpecificInput'].is_a? Hash
|
67
83
|
@payment_product130_specific_input = OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput.new_from_hash(hash['paymentProduct130SpecificInput'])
|
68
84
|
end
|
85
|
+
if hash.key? 'paymentProduct3208SpecificInput'
|
86
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3208SpecificInput']] unless hash['paymentProduct3208SpecificInput'].is_a? Hash
|
87
|
+
@payment_product3208_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3208SpecificInput.new_from_hash(hash['paymentProduct3208SpecificInput'])
|
88
|
+
end
|
89
|
+
if hash.key? 'paymentProduct3209SpecificInput'
|
90
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3209SpecificInput']] unless hash['paymentProduct3209SpecificInput'].is_a? Hash
|
91
|
+
@payment_product3209_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3209SpecificInput.new_from_hash(hash['paymentProduct3209SpecificInput'])
|
92
|
+
end
|
69
93
|
if hash.key? 'paymentProduct5100SpecificInput'
|
70
94
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5100SpecificInput']] unless hash['paymentProduct5100SpecificInput'].is_a? Hash
|
71
95
|
@payment_product5100_specific_input = OnlinePayments::SDK::Domain::PaymentProduct5100SpecificInput.new_from_hash(hash['paymentProduct5100SpecificInput'])
|
@@ -4,7 +4,10 @@
|
|
4
4
|
require 'onlinepayments/sdk/data_object'
|
5
5
|
require 'onlinepayments/sdk/domain/card_essentials'
|
6
6
|
require 'onlinepayments/sdk/domain/card_fraud_results'
|
7
|
+
require 'onlinepayments/sdk/domain/currency_conversion'
|
7
8
|
require 'onlinepayments/sdk/domain/external_token_linked'
|
9
|
+
require 'onlinepayments/sdk/domain/payment_product3208_specific_output'
|
10
|
+
require 'onlinepayments/sdk/domain/payment_product3209_specific_output'
|
8
11
|
require 'onlinepayments/sdk/domain/three_d_secure_results'
|
9
12
|
|
10
13
|
module OnlinePayments::SDK
|
@@ -13,10 +16,13 @@ module OnlinePayments::SDK
|
|
13
16
|
# @attr [Long] authenticated_amount
|
14
17
|
# @attr [String] authorisation_code
|
15
18
|
# @attr [OnlinePayments::SDK::Domain::CardEssentials] card
|
19
|
+
# @attr [OnlinePayments::SDK::Domain::CurrencyConversion] currency_conversion
|
16
20
|
# @attr [OnlinePayments::SDK::Domain::ExternalTokenLinked] external_token_linked
|
17
21
|
# @attr [OnlinePayments::SDK::Domain::CardFraudResults] fraud_results
|
18
22
|
# @attr [String] initial_scheme_transaction_id
|
19
23
|
# @attr [String] payment_option
|
24
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3208SpecificOutput] payment_product3208_specific_output
|
25
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3209SpecificOutput] payment_product3209_specific_output
|
20
26
|
# @attr [Integer] payment_product_id
|
21
27
|
# @attr [String] scheme_reference_data
|
22
28
|
# @attr [OnlinePayments::SDK::Domain::ThreeDSecureResults] three_d_secure_results
|
@@ -25,10 +31,13 @@ module OnlinePayments::SDK
|
|
25
31
|
attr_accessor :authenticated_amount
|
26
32
|
attr_accessor :authorisation_code
|
27
33
|
attr_accessor :card
|
34
|
+
attr_accessor :currency_conversion
|
28
35
|
attr_accessor :external_token_linked
|
29
36
|
attr_accessor :fraud_results
|
30
37
|
attr_accessor :initial_scheme_transaction_id
|
31
38
|
attr_accessor :payment_option
|
39
|
+
attr_accessor :payment_product3208_specific_output
|
40
|
+
attr_accessor :payment_product3209_specific_output
|
32
41
|
attr_accessor :payment_product_id
|
33
42
|
attr_accessor :scheme_reference_data
|
34
43
|
attr_accessor :three_d_secure_results
|
@@ -40,10 +49,13 @@ module OnlinePayments::SDK
|
|
40
49
|
hash['authenticatedAmount'] = @authenticated_amount unless @authenticated_amount.nil?
|
41
50
|
hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
|
42
51
|
hash['card'] = @card.to_h if @card
|
52
|
+
hash['currencyConversion'] = @currency_conversion.to_h if @currency_conversion
|
43
53
|
hash['externalTokenLinked'] = @external_token_linked.to_h if @external_token_linked
|
44
54
|
hash['fraudResults'] = @fraud_results.to_h if @fraud_results
|
45
55
|
hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
|
46
56
|
hash['paymentOption'] = @payment_option unless @payment_option.nil?
|
57
|
+
hash['paymentProduct3208SpecificOutput'] = @payment_product3208_specific_output.to_h if @payment_product3208_specific_output
|
58
|
+
hash['paymentProduct3209SpecificOutput'] = @payment_product3209_specific_output.to_h if @payment_product3209_specific_output
|
47
59
|
hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
|
48
60
|
hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
|
49
61
|
hash['threeDSecureResults'] = @three_d_secure_results.to_h if @three_d_secure_results
|
@@ -59,6 +71,10 @@ module OnlinePayments::SDK
|
|
59
71
|
raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
|
60
72
|
@card = OnlinePayments::SDK::Domain::CardEssentials.new_from_hash(hash['card'])
|
61
73
|
end
|
74
|
+
if hash.key? 'currencyConversion'
|
75
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['currencyConversion']] unless hash['currencyConversion'].is_a? Hash
|
76
|
+
@currency_conversion = OnlinePayments::SDK::Domain::CurrencyConversion.new_from_hash(hash['currencyConversion'])
|
77
|
+
end
|
62
78
|
if hash.key? 'externalTokenLinked'
|
63
79
|
raise TypeError, "value '%s' is not a Hash" % [hash['externalTokenLinked']] unless hash['externalTokenLinked'].is_a? Hash
|
64
80
|
@external_token_linked = OnlinePayments::SDK::Domain::ExternalTokenLinked.new_from_hash(hash['externalTokenLinked'])
|
@@ -69,6 +85,14 @@ module OnlinePayments::SDK
|
|
69
85
|
end
|
70
86
|
@initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId'
|
71
87
|
@payment_option = hash['paymentOption'] if hash.key? 'paymentOption'
|
88
|
+
if hash.key? 'paymentProduct3208SpecificOutput'
|
89
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3208SpecificOutput']] unless hash['paymentProduct3208SpecificOutput'].is_a? Hash
|
90
|
+
@payment_product3208_specific_output = OnlinePayments::SDK::Domain::PaymentProduct3208SpecificOutput.new_from_hash(hash['paymentProduct3208SpecificOutput'])
|
91
|
+
end
|
92
|
+
if hash.key? 'paymentProduct3209SpecificOutput'
|
93
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3209SpecificOutput']] unless hash['paymentProduct3209SpecificOutput'].is_a? Hash
|
94
|
+
@payment_product3209_specific_output = OnlinePayments::SDK::Domain::PaymentProduct3209SpecificOutput.new_from_hash(hash['paymentProduct3209SpecificOutput'])
|
95
|
+
end
|
72
96
|
@payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
|
73
97
|
@scheme_reference_data = hash['schemeReferenceData'] if hash.key? 'schemeReferenceData'
|
74
98
|
if hash.key? 'threeDSecureResults'
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/dcc_proposal'
|
6
|
+
|
7
|
+
module OnlinePayments::SDK
|
8
|
+
module Domain
|
9
|
+
|
10
|
+
# @attr [true/false] accepted_by_user
|
11
|
+
# @attr [OnlinePayments::SDK::Domain::DccProposal] proposal
|
12
|
+
class CurrencyConversion < OnlinePayments::SDK::DataObject
|
13
|
+
attr_accessor :accepted_by_user
|
14
|
+
attr_accessor :proposal
|
15
|
+
|
16
|
+
# @return (Hash)
|
17
|
+
def to_h
|
18
|
+
hash = super
|
19
|
+
hash['acceptedByUser'] = @accepted_by_user unless @accepted_by_user.nil?
|
20
|
+
hash['proposal'] = @proposal.to_h if @proposal
|
21
|
+
hash
|
22
|
+
end
|
23
|
+
|
24
|
+
def from_hash(hash)
|
25
|
+
super
|
26
|
+
@accepted_by_user = hash['acceptedByUser'] if hash.key? 'acceptedByUser'
|
27
|
+
if hash.key? 'proposal'
|
28
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['proposal']] unless hash['proposal'].is_a? Hash
|
29
|
+
@proposal = OnlinePayments::SDK::Domain::DccProposal.new_from_hash(hash['proposal'])
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [true/false] accepted_by_user
|
10
|
+
# @attr [String] dcc_session_id
|
11
|
+
class CurrencyConversionInput < OnlinePayments::SDK::DataObject
|
12
|
+
attr_accessor :accepted_by_user
|
13
|
+
attr_accessor :dcc_session_id
|
14
|
+
|
15
|
+
# @return (Hash)
|
16
|
+
def to_h
|
17
|
+
hash = super
|
18
|
+
hash['acceptedByUser'] = @accepted_by_user unless @accepted_by_user.nil?
|
19
|
+
hash['dccSessionId'] = @dcc_session_id unless @dcc_session_id.nil?
|
20
|
+
hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def from_hash(hash)
|
24
|
+
super
|
25
|
+
@accepted_by_user = hash['acceptedByUser'] if hash.key? 'acceptedByUser'
|
26
|
+
@dcc_session_id = hash['dccSessionId'] if hash.key? 'dccSessionId'
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/card_info'
|
6
|
+
require 'onlinepayments/sdk/domain/transaction'
|
7
|
+
|
8
|
+
module OnlinePayments::SDK
|
9
|
+
module Domain
|
10
|
+
|
11
|
+
# @attr [OnlinePayments::SDK::Domain::CardInfo] card
|
12
|
+
# @attr [OnlinePayments::SDK::Domain::Transaction] transaction
|
13
|
+
class CurrencyConversionRequest < OnlinePayments::SDK::DataObject
|
14
|
+
attr_accessor :card
|
15
|
+
attr_accessor :transaction
|
16
|
+
|
17
|
+
# @return (Hash)
|
18
|
+
def to_h
|
19
|
+
hash = super
|
20
|
+
hash['card'] = @card.to_h if @card
|
21
|
+
hash['transaction'] = @transaction.to_h if @transaction
|
22
|
+
hash
|
23
|
+
end
|
24
|
+
|
25
|
+
def from_hash(hash)
|
26
|
+
super
|
27
|
+
if hash.key? 'card'
|
28
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
|
29
|
+
@card = OnlinePayments::SDK::Domain::CardInfo.new_from_hash(hash['card'])
|
30
|
+
end
|
31
|
+
if hash.key? 'transaction'
|
32
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['transaction']] unless hash['transaction'].is_a? Hash
|
33
|
+
@transaction = OnlinePayments::SDK::Domain::Transaction.new_from_hash(hash['transaction'])
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/currency_conversion_result'
|
6
|
+
require 'onlinepayments/sdk/domain/dcc_proposal'
|
7
|
+
|
8
|
+
module OnlinePayments::SDK
|
9
|
+
module Domain
|
10
|
+
|
11
|
+
# @attr [String] dcc_session_id
|
12
|
+
# @attr [OnlinePayments::SDK::Domain::DccProposal] proposal
|
13
|
+
# @attr [OnlinePayments::SDK::Domain::CurrencyConversionResult] result
|
14
|
+
class CurrencyConversionResponse < OnlinePayments::SDK::DataObject
|
15
|
+
attr_accessor :dcc_session_id
|
16
|
+
attr_accessor :proposal
|
17
|
+
attr_accessor :result
|
18
|
+
|
19
|
+
# @return (Hash)
|
20
|
+
def to_h
|
21
|
+
hash = super
|
22
|
+
hash['dccSessionId'] = @dcc_session_id unless @dcc_session_id.nil?
|
23
|
+
hash['proposal'] = @proposal.to_h if @proposal
|
24
|
+
hash['result'] = @result.to_h if @result
|
25
|
+
hash
|
26
|
+
end
|
27
|
+
|
28
|
+
def from_hash(hash)
|
29
|
+
super
|
30
|
+
@dcc_session_id = hash['dccSessionId'] if hash.key? 'dccSessionId'
|
31
|
+
if hash.key? 'proposal'
|
32
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['proposal']] unless hash['proposal'].is_a? Hash
|
33
|
+
@proposal = OnlinePayments::SDK::Domain::DccProposal.new_from_hash(hash['proposal'])
|
34
|
+
end
|
35
|
+
if hash.key? 'result'
|
36
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['result']] unless hash['result'].is_a? Hash
|
37
|
+
@result = OnlinePayments::SDK::Domain::CurrencyConversionResult.new_from_hash(hash['result'])
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] result
|
10
|
+
# @attr [String] result_reason
|
11
|
+
class CurrencyConversionResult < OnlinePayments::SDK::DataObject
|
12
|
+
attr_accessor :result
|
13
|
+
attr_accessor :result_reason
|
14
|
+
|
15
|
+
# @return (Hash)
|
16
|
+
def to_h
|
17
|
+
hash = super
|
18
|
+
hash['result'] = @result unless @result.nil?
|
19
|
+
hash['resultReason'] = @result_reason unless @result_reason.nil?
|
20
|
+
hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def from_hash(hash)
|
24
|
+
super
|
25
|
+
@result = hash['result'] if hash.key? 'result'
|
26
|
+
@result_reason = hash['resultReason'] if hash.key? 'resultReason'
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [true/false] dcc_enabled
|
10
|
+
class CurrencyConversionSpecificInput < OnlinePayments::SDK::DataObject
|
11
|
+
attr_accessor :dcc_enabled
|
12
|
+
|
13
|
+
# @return (Hash)
|
14
|
+
def to_h
|
15
|
+
hash = super
|
16
|
+
hash['dccEnabled'] = @dcc_enabled unless @dcc_enabled.nil?
|
17
|
+
hash
|
18
|
+
end
|
19
|
+
|
20
|
+
def from_hash(hash)
|
21
|
+
super
|
22
|
+
@dcc_enabled = hash['dccEnabled'] if hash.key? 'dccEnabled'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/amount_of_money'
|
6
|
+
require 'onlinepayments/sdk/domain/rate_details'
|
7
|
+
|
8
|
+
module OnlinePayments::SDK
|
9
|
+
module Domain
|
10
|
+
|
11
|
+
# @attr [OnlinePayments::SDK::Domain::AmountOfMoney] base_amount
|
12
|
+
# @attr [String] disclaimer_display
|
13
|
+
# @attr [String] disclaimer_receipt
|
14
|
+
# @attr [OnlinePayments::SDK::Domain::RateDetails] rate
|
15
|
+
# @attr [OnlinePayments::SDK::Domain::AmountOfMoney] target_amount
|
16
|
+
class DccProposal < OnlinePayments::SDK::DataObject
|
17
|
+
attr_accessor :base_amount
|
18
|
+
attr_accessor :disclaimer_display
|
19
|
+
attr_accessor :disclaimer_receipt
|
20
|
+
attr_accessor :rate
|
21
|
+
attr_accessor :target_amount
|
22
|
+
|
23
|
+
# @return (Hash)
|
24
|
+
def to_h
|
25
|
+
hash = super
|
26
|
+
hash['baseAmount'] = @base_amount.to_h if @base_amount
|
27
|
+
hash['disclaimerDisplay'] = @disclaimer_display unless @disclaimer_display.nil?
|
28
|
+
hash['disclaimerReceipt'] = @disclaimer_receipt unless @disclaimer_receipt.nil?
|
29
|
+
hash['rate'] = @rate.to_h if @rate
|
30
|
+
hash['targetAmount'] = @target_amount.to_h if @target_amount
|
31
|
+
hash
|
32
|
+
end
|
33
|
+
|
34
|
+
def from_hash(hash)
|
35
|
+
super
|
36
|
+
if hash.key? 'baseAmount'
|
37
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['baseAmount']] unless hash['baseAmount'].is_a? Hash
|
38
|
+
@base_amount = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['baseAmount'])
|
39
|
+
end
|
40
|
+
@disclaimer_display = hash['disclaimerDisplay'] if hash.key? 'disclaimerDisplay'
|
41
|
+
@disclaimer_receipt = hash['disclaimerReceipt'] if hash.key? 'disclaimerReceipt'
|
42
|
+
if hash.key? 'rate'
|
43
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['rate']] unless hash['rate'].is_a? Hash
|
44
|
+
@rate = OnlinePayments::SDK::Domain::RateDetails.new_from_hash(hash['rate'])
|
45
|
+
end
|
46
|
+
if hash.key? 'targetAmount'
|
47
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['targetAmount']] unless hash['targetAmount'].is_a? Hash
|
48
|
+
@target_amount = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['targetAmount'])
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -8,6 +8,7 @@ require 'onlinepayments/sdk/domain/payment_product_filters_hosted_checkout'
|
|
8
8
|
module OnlinePayments::SDK
|
9
9
|
module Domain
|
10
10
|
|
11
|
+
# @attr [Integer] allowed_number_of_payment_attempts
|
11
12
|
# @attr [OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout] card_payment_method_specific_input
|
12
13
|
# @attr [true/false] is_recurring
|
13
14
|
# @attr [String] locale
|
@@ -18,6 +19,7 @@ module OnlinePayments::SDK
|
|
18
19
|
# @attr [String] tokens
|
19
20
|
# @attr [String] variant
|
20
21
|
class HostedCheckoutSpecificInput < OnlinePayments::SDK::DataObject
|
22
|
+
attr_accessor :allowed_number_of_payment_attempts
|
21
23
|
attr_accessor :card_payment_method_specific_input
|
22
24
|
attr_accessor :is_recurring
|
23
25
|
attr_accessor :locale
|
@@ -31,6 +33,7 @@ module OnlinePayments::SDK
|
|
31
33
|
# @return (Hash)
|
32
34
|
def to_h
|
33
35
|
hash = super
|
36
|
+
hash['allowedNumberOfPaymentAttempts'] = @allowed_number_of_payment_attempts unless @allowed_number_of_payment_attempts.nil?
|
34
37
|
hash['cardPaymentMethodSpecificInput'] = @card_payment_method_specific_input.to_h if @card_payment_method_specific_input
|
35
38
|
hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
|
36
39
|
hash['locale'] = @locale unless @locale.nil?
|
@@ -45,6 +48,7 @@ module OnlinePayments::SDK
|
|
45
48
|
|
46
49
|
def from_hash(hash)
|
47
50
|
super
|
51
|
+
@allowed_number_of_payment_attempts = hash['allowedNumberOfPaymentAttempts'] if hash.key? 'allowedNumberOfPaymentAttempts'
|
48
52
|
if hash.key? 'cardPaymentMethodSpecificInput'
|
49
53
|
raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificInput']] unless hash['cardPaymentMethodSpecificInput'].is_a? Hash
|
50
54
|
@card_payment_method_specific_input = OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout.new_from_hash(hash['cardPaymentMethodSpecificInput'])
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] merchant_finance_code
|
10
|
+
class PaymentProduct3208SpecificInput < OnlinePayments::SDK::DataObject
|
11
|
+
attr_accessor :merchant_finance_code
|
12
|
+
|
13
|
+
# @return (Hash)
|
14
|
+
def to_h
|
15
|
+
hash = super
|
16
|
+
hash['merchantFinanceCode'] = @merchant_finance_code unless @merchant_finance_code.nil?
|
17
|
+
hash
|
18
|
+
end
|
19
|
+
|
20
|
+
def from_hash(hash)
|
21
|
+
super
|
22
|
+
@merchant_finance_code = hash['merchantFinanceCode'] if hash.key? 'merchantFinanceCode'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] buyer_compliant_bank_message
|
10
|
+
class PaymentProduct3208SpecificOutput < OnlinePayments::SDK::DataObject
|
11
|
+
attr_accessor :buyer_compliant_bank_message
|
12
|
+
|
13
|
+
# @return (Hash)
|
14
|
+
def to_h
|
15
|
+
hash = super
|
16
|
+
hash['buyerCompliantBankMessage'] = @buyer_compliant_bank_message unless @buyer_compliant_bank_message.nil?
|
17
|
+
hash
|
18
|
+
end
|
19
|
+
|
20
|
+
def from_hash(hash)
|
21
|
+
super
|
22
|
+
@buyer_compliant_bank_message = hash['buyerCompliantBankMessage'] if hash.key? 'buyerCompliantBankMessage'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] merchant_finance_code
|
10
|
+
class PaymentProduct3209SpecificInput < OnlinePayments::SDK::DataObject
|
11
|
+
attr_accessor :merchant_finance_code
|
12
|
+
|
13
|
+
# @return (Hash)
|
14
|
+
def to_h
|
15
|
+
hash = super
|
16
|
+
hash['merchantFinanceCode'] = @merchant_finance_code unless @merchant_finance_code.nil?
|
17
|
+
hash
|
18
|
+
end
|
19
|
+
|
20
|
+
def from_hash(hash)
|
21
|
+
super
|
22
|
+
@merchant_finance_code = hash['merchantFinanceCode'] if hash.key? 'merchantFinanceCode'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] buyer_compliant_bank_message
|
10
|
+
class PaymentProduct3209SpecificOutput < OnlinePayments::SDK::DataObject
|
11
|
+
attr_accessor :buyer_compliant_bank_message
|
12
|
+
|
13
|
+
# @return (Hash)
|
14
|
+
def to_h
|
15
|
+
hash = super
|
16
|
+
hash['buyerCompliantBankMessage'] = @buyer_compliant_bank_message unless @buyer_compliant_bank_message.nil?
|
17
|
+
hash
|
18
|
+
end
|
19
|
+
|
20
|
+
def from_hash(hash)
|
21
|
+
super
|
22
|
+
@buyer_compliant_bank_message = hash['buyerCompliantBankMessage'] if hash.key? 'buyerCompliantBankMessage'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [Float] exchange_rate
|
10
|
+
# @attr [Float] inverted_exchange_rate
|
11
|
+
# @attr [Float] mark_up_rate
|
12
|
+
# @attr [String] quotation_date_time
|
13
|
+
# @attr [String] source
|
14
|
+
class RateDetails < OnlinePayments::SDK::DataObject
|
15
|
+
attr_accessor :exchange_rate
|
16
|
+
attr_accessor :inverted_exchange_rate
|
17
|
+
attr_accessor :mark_up_rate
|
18
|
+
attr_accessor :quotation_date_time
|
19
|
+
attr_accessor :source
|
20
|
+
|
21
|
+
# @return (Hash)
|
22
|
+
def to_h
|
23
|
+
hash = super
|
24
|
+
hash['exchangeRate'] = @exchange_rate unless @exchange_rate.nil?
|
25
|
+
hash['invertedExchangeRate'] = @inverted_exchange_rate unless @inverted_exchange_rate.nil?
|
26
|
+
hash['markUpRate'] = @mark_up_rate unless @mark_up_rate.nil?
|
27
|
+
hash['quotationDateTime'] = @quotation_date_time unless @quotation_date_time.nil?
|
28
|
+
hash['source'] = @source unless @source.nil?
|
29
|
+
hash
|
30
|
+
end
|
31
|
+
|
32
|
+
def from_hash(hash)
|
33
|
+
super
|
34
|
+
@exchange_rate = hash['exchangeRate'] if hash.key? 'exchangeRate'
|
35
|
+
@inverted_exchange_rate = hash['invertedExchangeRate'] if hash.key? 'invertedExchangeRate'
|
36
|
+
@mark_up_rate = hash['markUpRate'] if hash.key? 'markUpRate'
|
37
|
+
@quotation_date_time = hash['quotationDateTime'] if hash.key? 'quotationDateTime'
|
38
|
+
@source = hash['source'] if hash.key? 'source'
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -2,19 +2,23 @@
|
|
2
2
|
# This class was auto-generated.
|
3
3
|
#
|
4
4
|
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/currency_conversion'
|
5
6
|
|
6
7
|
module OnlinePayments::SDK
|
7
8
|
module Domain
|
8
9
|
|
10
|
+
# @attr [OnlinePayments::SDK::Domain::CurrencyConversion] currency_conversion
|
9
11
|
# @attr [Long] total_amount_paid
|
10
12
|
# @attr [Long] total_amount_refunded
|
11
13
|
class RefundCardMethodSpecificOutput < OnlinePayments::SDK::DataObject
|
14
|
+
attr_accessor :currency_conversion
|
12
15
|
attr_accessor :total_amount_paid
|
13
16
|
attr_accessor :total_amount_refunded
|
14
17
|
|
15
18
|
# @return (Hash)
|
16
19
|
def to_h
|
17
20
|
hash = super
|
21
|
+
hash['currencyConversion'] = @currency_conversion.to_h if @currency_conversion
|
18
22
|
hash['totalAmountPaid'] = @total_amount_paid unless @total_amount_paid.nil?
|
19
23
|
hash['totalAmountRefunded'] = @total_amount_refunded unless @total_amount_refunded.nil?
|
20
24
|
hash
|
@@ -22,6 +26,10 @@ module OnlinePayments::SDK
|
|
22
26
|
|
23
27
|
def from_hash(hash)
|
24
28
|
super
|
29
|
+
if hash.key? 'currencyConversion'
|
30
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['currencyConversion']] unless hash['currencyConversion'].is_a? Hash
|
31
|
+
@currency_conversion = OnlinePayments::SDK::Domain::CurrencyConversion.new_from_hash(hash['currencyConversion'])
|
32
|
+
end
|
25
33
|
@total_amount_paid = hash['totalAmountPaid'] if hash.key? 'totalAmountPaid'
|
26
34
|
@total_amount_refunded = hash['totalAmountRefunded'] if hash.key? 'totalAmountRefunded'
|
27
35
|
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/amount_of_money'
|
6
|
+
|
7
|
+
module OnlinePayments::SDK
|
8
|
+
module Domain
|
9
|
+
|
10
|
+
# @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount
|
11
|
+
# @attr [String] local_date_time
|
12
|
+
class Transaction < OnlinePayments::SDK::DataObject
|
13
|
+
attr_accessor :amount
|
14
|
+
attr_accessor :local_date_time
|
15
|
+
|
16
|
+
# @return (Hash)
|
17
|
+
def to_h
|
18
|
+
hash = super
|
19
|
+
hash['amount'] = @amount.to_h if @amount
|
20
|
+
hash['localDateTime'] = @local_date_time unless @local_date_time.nil?
|
21
|
+
hash
|
22
|
+
end
|
23
|
+
|
24
|
+
def from_hash(hash)
|
25
|
+
super
|
26
|
+
if hash.key? 'amount'
|
27
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['amount']] unless hash['amount'].is_a? Hash
|
28
|
+
@amount = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amount'])
|
29
|
+
end
|
30
|
+
@local_date_time = hash['localDateTime'] if hash.key? 'localDateTime'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -5,6 +5,8 @@ require 'onlinepayments/sdk/api_resource'
|
|
5
5
|
require 'onlinepayments/sdk/response_exception'
|
6
6
|
require 'onlinepayments/sdk/domain/calculate_surcharge_request'
|
7
7
|
require 'onlinepayments/sdk/domain/calculate_surcharge_response'
|
8
|
+
require 'onlinepayments/sdk/domain/currency_conversion_request'
|
9
|
+
require 'onlinepayments/sdk/domain/currency_conversion_response'
|
8
10
|
require 'onlinepayments/sdk/domain/error_response'
|
9
11
|
require 'onlinepayments/sdk/domain/get_iin_details_request'
|
10
12
|
require 'onlinepayments/sdk/domain/get_iin_details_response'
|
@@ -54,6 +56,35 @@ module OnlinePayments::SDK
|
|
54
56
|
raise create_exception(e.status_code, e.body, error_object, context)
|
55
57
|
end
|
56
58
|
|
59
|
+
# Resource /v2/!{merchantId}/services/dccrate
|
60
|
+
# @param body [OnlinePayments::SDK::Domain::CurrencyConversionRequest]
|
61
|
+
# @param context [OnlinePayments::SDK::CallContext]
|
62
|
+
# @return [OnlinePayments::SDK::Domain::CurrencyConversionResponse]
|
63
|
+
# @raise [OnlinePayments::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
64
|
+
# @raise [OnlinePayments::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
65
|
+
# @raise [OnlinePayments::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
66
|
+
# @raise [OnlinePayments::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
67
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
68
|
+
# @raise [OnlinePayments::SDK::PaymentPlatformException] if something went wrong at the payment platform,
|
69
|
+
# the payment platform was unable to process a message from a downstream partner/acquirer,
|
70
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
71
|
+
# @raise [OnlinePayments::SDK::ApiException]if the payment platform returned any other error
|
72
|
+
def get_dcc_rate_inquiry(body, context = nil)
|
73
|
+
uri = instantiate_uri('/v2/{merchantId}/services/dccrate')
|
74
|
+
@communicator.post(
|
75
|
+
uri,
|
76
|
+
client_headers,
|
77
|
+
nil,
|
78
|
+
body,
|
79
|
+
OnlinePayments::SDK::Domain::CurrencyConversionResponse,
|
80
|
+
context
|
81
|
+
)
|
82
|
+
rescue ResponseException => e
|
83
|
+
error_type = OnlinePayments::SDK::Domain::ErrorResponse
|
84
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
85
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
86
|
+
end
|
87
|
+
|
57
88
|
# Resource /v2/!{merchantId}/services/privacypolicy
|
58
89
|
# @param query [OnlinePayments::SDK::Merchant::Services::GetPrivacyPolicyParams]
|
59
90
|
# @param context [OnlinePayments::SDK::CallContext]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'onlinepayments-sdk-ruby'
|
3
|
-
spec.version = '4.
|
3
|
+
spec.version = '4.10.0'
|
4
4
|
spec.authors = ['Worldline Direct support team']
|
5
5
|
spec.email = ['82139942+worldline-direct-support-team@users.noreply.github.com']
|
6
6
|
spec.summary = %q{SDK to communicate with the Online Payments platform using the Online Payments Server API}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onlinepayments-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Worldline Direct support team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -174,6 +174,7 @@ files:
|
|
174
174
|
- lib/onlinepayments/sdk/domain/card.rb
|
175
175
|
- lib/onlinepayments/sdk/domain/card_essentials.rb
|
176
176
|
- lib/onlinepayments/sdk/domain/card_fraud_results.rb
|
177
|
+
- lib/onlinepayments/sdk/domain/card_info.rb
|
177
178
|
- lib/onlinepayments/sdk/domain/card_payment_method_specific_input.rb
|
178
179
|
- lib/onlinepayments/sdk/domain/card_payment_method_specific_input_base.rb
|
179
180
|
- lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb
|
@@ -200,6 +201,12 @@ files:
|
|
200
201
|
- lib/onlinepayments/sdk/domain/create_token_request.rb
|
201
202
|
- lib/onlinepayments/sdk/domain/created_payment_output.rb
|
202
203
|
- lib/onlinepayments/sdk/domain/created_token_response.rb
|
204
|
+
- lib/onlinepayments/sdk/domain/currency_conversion.rb
|
205
|
+
- lib/onlinepayments/sdk/domain/currency_conversion_input.rb
|
206
|
+
- lib/onlinepayments/sdk/domain/currency_conversion_request.rb
|
207
|
+
- lib/onlinepayments/sdk/domain/currency_conversion_response.rb
|
208
|
+
- lib/onlinepayments/sdk/domain/currency_conversion_result.rb
|
209
|
+
- lib/onlinepayments/sdk/domain/currency_conversion_specific_input.rb
|
203
210
|
- lib/onlinepayments/sdk/domain/customer.rb
|
204
211
|
- lib/onlinepayments/sdk/domain/customer_account.rb
|
205
212
|
- lib/onlinepayments/sdk/domain/customer_account_authentication.rb
|
@@ -208,6 +215,7 @@ files:
|
|
208
215
|
- lib/onlinepayments/sdk/domain/customer_output.rb
|
209
216
|
- lib/onlinepayments/sdk/domain/customer_payment_activity.rb
|
210
217
|
- lib/onlinepayments/sdk/domain/customer_token.rb
|
218
|
+
- lib/onlinepayments/sdk/domain/dcc_proposal.rb
|
211
219
|
- lib/onlinepayments/sdk/domain/decrypted_payment_data.rb
|
212
220
|
- lib/onlinepayments/sdk/domain/directory_entry.rb
|
213
221
|
- lib/onlinepayments/sdk/domain/empty_validator.rb
|
@@ -266,6 +274,10 @@ files:
|
|
266
274
|
- lib/onlinepayments/sdk/domain/payment_product130_specific_input.rb
|
267
275
|
- lib/onlinepayments/sdk/domain/payment_product130_specific_three_d_secure.rb
|
268
276
|
- lib/onlinepayments/sdk/domain/payment_product302_specific_data.rb
|
277
|
+
- lib/onlinepayments/sdk/domain/payment_product3208_specific_input.rb
|
278
|
+
- lib/onlinepayments/sdk/domain/payment_product3208_specific_output.rb
|
279
|
+
- lib/onlinepayments/sdk/domain/payment_product3209_specific_input.rb
|
280
|
+
- lib/onlinepayments/sdk/domain/payment_product3209_specific_output.rb
|
269
281
|
- lib/onlinepayments/sdk/domain/payment_product320_specific_data.rb
|
270
282
|
- lib/onlinepayments/sdk/domain/payment_product5001_specific_output.rb
|
271
283
|
- lib/onlinepayments/sdk/domain/payment_product5100_specific_input.rb
|
@@ -302,6 +314,7 @@ files:
|
|
302
314
|
- lib/onlinepayments/sdk/domain/product_directory.rb
|
303
315
|
- lib/onlinepayments/sdk/domain/protection_eligibility.rb
|
304
316
|
- lib/onlinepayments/sdk/domain/range_validator.rb
|
317
|
+
- lib/onlinepayments/sdk/domain/rate_details.rb
|
305
318
|
- lib/onlinepayments/sdk/domain/redirect_data.rb
|
306
319
|
- lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb
|
307
320
|
- lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb
|
@@ -351,6 +364,7 @@ files:
|
|
351
364
|
- lib/onlinepayments/sdk/domain/token_data.rb
|
352
365
|
- lib/onlinepayments/sdk/domain/token_e_wallet.rb
|
353
366
|
- lib/onlinepayments/sdk/domain/token_response.rb
|
367
|
+
- lib/onlinepayments/sdk/domain/transaction.rb
|
354
368
|
- lib/onlinepayments/sdk/domain/value_mapping_element.rb
|
355
369
|
- lib/onlinepayments/sdk/endpoint_configuration.rb
|
356
370
|
- lib/onlinepayments/sdk/exceptions.rb
|