onlinepayments-sdk-ruby 4.20.0 → 4.22.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/communicator.rb +2 -0
- data/lib/onlinepayments/sdk/defaultimpl/default_connection.rb +4 -0
- data/lib/onlinepayments/sdk/domain/card_essentials.rb +4 -0
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input.rb +16 -0
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_base.rb +8 -0
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb +14 -0
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb +8 -0
- data/lib/onlinepayments/sdk/domain/create_hosted_checkout_request.rb +8 -0
- data/lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb +8 -0
- data/lib/onlinepayments/sdk/domain/create_payment_link_request.rb +64 -0
- data/lib/onlinepayments/sdk/domain/create_payment_request.rb +12 -0
- data/lib/onlinepayments/sdk/domain/credit_card_specific_input_hosted_tokenization.rb +10 -0
- data/lib/onlinepayments/sdk/domain/mobile_payment_method_specific_output.rb +8 -0
- data/lib/onlinepayments/sdk/domain/network_token_essentials.rb +38 -0
- data/lib/onlinepayments/sdk/domain/page_customization.rb +26 -0
- data/lib/onlinepayments/sdk/domain/payment_link_order_input.rb +8 -0
- data/lib/onlinepayments/sdk/domain/payment_link_order_output.rb +8 -0
- data/lib/onlinepayments/sdk/domain/payment_link_specific_input.rb +34 -0
- data/lib/onlinepayments/sdk/domain/payment_output.rb +8 -0
- data/lib/onlinepayments/sdk/domain/payment_product3012_specific_input.rb +38 -0
- data/lib/onlinepayments/sdk/domain/payment_product5002_specific_input.rb +34 -0
- data/lib/onlinepayments/sdk/domain/payment_product840.rb +26 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb +8 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product5001_specific_input.rb +26 -0
- data/lib/onlinepayments/sdk/domain/show_form_data.rb +8 -0
- data/lib/onlinepayments/sdk/domain/subsequent_payment_product5001_specific_input.rb +26 -0
- data/lib/onlinepayments/sdk/domain/subsequent_payment_request.rb +8 -0
- data/lib/onlinepayments/sdk/domain/surcharge_for_payment_link.rb +26 -0
- data/lib/onlinepayments/sdk/domain/three_d_secure.rb +24 -0
- data/lib/onlinepayments/sdk/domain/three_d_secure_base.rb +24 -0
- data/lib/onlinepayments/sdk/domain/three_ds_whitelist.rb +30 -0
- data/onlinepayments-sdk-ruby.gemspec +1 -1
- metadata +12 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 483c54124fb65fe695f50ed2e6721901c7ff389a5f0bc15f110379ca3d4beed4
|
4
|
+
data.tar.gz: 00ed4077883e208c23a2881b33929a93986bd083b06095c66bb86f497a847c56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a568eda619ae3fb3c8658175e00024bb74f8eeaaa04159d3de59ba2229d8f77104eacb7f817fdbed9a7ee7e0af45ed44600035b69f4356f588d2bdbfe40f37f
|
7
|
+
data.tar.gz: b21beb1ecfddef17480c0298b24b7339ee2c5cfefbb744817a104c24ea456d88a7fbc07865c7df212316d1802389ce524b8c2663920665a860fb9a4d46d8b81d
|
@@ -1,6 +1,10 @@
|
|
1
1
|
require 'securerandom'
|
2
2
|
require 'uri'
|
3
3
|
require 'httpclient'
|
4
|
+
require 'onlinepayments/sdk/multipart_form_data_object'
|
5
|
+
require 'onlinepayments/sdk/pooled_connection'
|
6
|
+
require 'onlinepayments/sdk/communication_exception'
|
7
|
+
require 'onlinepayments/sdk/response_header'
|
4
8
|
|
5
9
|
# @private :nodoc: this is not our class
|
6
10
|
module RefineHTTPClient
|
@@ -8,11 +8,13 @@ module OnlinePayments::SDK
|
|
8
8
|
|
9
9
|
# @attr [String] bin
|
10
10
|
# @attr [String] card_number
|
11
|
+
# @attr [String] card_type
|
11
12
|
# @attr [String] country_code
|
12
13
|
# @attr [String] expiry_date
|
13
14
|
class CardEssentials < OnlinePayments::SDK::DataObject
|
14
15
|
attr_accessor :bin
|
15
16
|
attr_accessor :card_number
|
17
|
+
attr_accessor :card_type
|
16
18
|
attr_accessor :country_code
|
17
19
|
attr_accessor :expiry_date
|
18
20
|
|
@@ -21,6 +23,7 @@ module OnlinePayments::SDK
|
|
21
23
|
hash = super
|
22
24
|
hash['bin'] = @bin unless @bin.nil?
|
23
25
|
hash['cardNumber'] = @card_number unless @card_number.nil?
|
26
|
+
hash['cardType'] = @card_type unless @card_type.nil?
|
24
27
|
hash['countryCode'] = @country_code unless @country_code.nil?
|
25
28
|
hash['expiryDate'] = @expiry_date unless @expiry_date.nil?
|
26
29
|
hash
|
@@ -30,6 +33,7 @@ module OnlinePayments::SDK
|
|
30
33
|
super
|
31
34
|
@bin = hash['bin'] if hash.key? 'bin'
|
32
35
|
@card_number = hash['cardNumber'] if hash.key? 'cardNumber'
|
36
|
+
@card_type = hash['cardType'] if hash.key? 'cardType'
|
33
37
|
@country_code = hash['countryCode'] if hash.key? 'countryCode'
|
34
38
|
@expiry_date = hash['expiryDate'] if hash.key? 'expiryDate'
|
35
39
|
end
|
@@ -6,8 +6,10 @@ require 'onlinepayments/sdk/domain/card'
|
|
6
6
|
require 'onlinepayments/sdk/domain/card_recurrence_details'
|
7
7
|
require 'onlinepayments/sdk/domain/currency_conversion_input'
|
8
8
|
require 'onlinepayments/sdk/domain/payment_product130_specific_input'
|
9
|
+
require 'onlinepayments/sdk/domain/payment_product3012_specific_input'
|
9
10
|
require 'onlinepayments/sdk/domain/payment_product3208_specific_input'
|
10
11
|
require 'onlinepayments/sdk/domain/payment_product3209_specific_input'
|
12
|
+
require 'onlinepayments/sdk/domain/payment_product5002_specific_input'
|
11
13
|
require 'onlinepayments/sdk/domain/three_d_secure'
|
12
14
|
|
13
15
|
module OnlinePayments::SDK
|
@@ -22,8 +24,10 @@ module OnlinePayments::SDK
|
|
22
24
|
# @attr [String] initial_scheme_transaction_id
|
23
25
|
# @attr [true/false] is_recurring
|
24
26
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
|
27
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3012SpecificInput] payment_product3012_specific_input
|
25
28
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3208SpecificInput] payment_product3208_specific_input
|
26
29
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3209SpecificInput] payment_product3209_specific_input
|
30
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentProduct5002SpecificInput] payment_product5002_specific_input
|
27
31
|
# @attr [Integer] payment_product_id
|
28
32
|
# @attr [OnlinePayments::SDK::Domain::CardRecurrenceDetails] recurring
|
29
33
|
# @attr [String] return_url
|
@@ -45,8 +49,10 @@ module OnlinePayments::SDK
|
|
45
49
|
attr_accessor :initial_scheme_transaction_id
|
46
50
|
attr_accessor :is_recurring
|
47
51
|
attr_accessor :payment_product130_specific_input
|
52
|
+
attr_accessor :payment_product3012_specific_input
|
48
53
|
attr_accessor :payment_product3208_specific_input
|
49
54
|
attr_accessor :payment_product3209_specific_input
|
55
|
+
attr_accessor :payment_product5002_specific_input
|
50
56
|
attr_accessor :payment_product_id
|
51
57
|
attr_accessor :recurring
|
52
58
|
attr_accessor :return_url
|
@@ -71,8 +77,10 @@ module OnlinePayments::SDK
|
|
71
77
|
hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
|
72
78
|
hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
|
73
79
|
hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h if @payment_product130_specific_input
|
80
|
+
hash['paymentProduct3012SpecificInput'] = @payment_product3012_specific_input.to_h if @payment_product3012_specific_input
|
74
81
|
hash['paymentProduct3208SpecificInput'] = @payment_product3208_specific_input.to_h if @payment_product3208_specific_input
|
75
82
|
hash['paymentProduct3209SpecificInput'] = @payment_product3209_specific_input.to_h if @payment_product3209_specific_input
|
83
|
+
hash['paymentProduct5002SpecificInput'] = @payment_product5002_specific_input.to_h if @payment_product5002_specific_input
|
76
84
|
hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
|
77
85
|
hash['recurring'] = @recurring.to_h if @recurring
|
78
86
|
hash['returnUrl'] = @return_url unless @return_url.nil?
|
@@ -107,6 +115,10 @@ module OnlinePayments::SDK
|
|
107
115
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct130SpecificInput']] unless hash['paymentProduct130SpecificInput'].is_a? Hash
|
108
116
|
@payment_product130_specific_input = OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput.new_from_hash(hash['paymentProduct130SpecificInput'])
|
109
117
|
end
|
118
|
+
if hash.key? 'paymentProduct3012SpecificInput'
|
119
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3012SpecificInput']] unless hash['paymentProduct3012SpecificInput'].is_a? Hash
|
120
|
+
@payment_product3012_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3012SpecificInput.new_from_hash(hash['paymentProduct3012SpecificInput'])
|
121
|
+
end
|
110
122
|
if hash.key? 'paymentProduct3208SpecificInput'
|
111
123
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3208SpecificInput']] unless hash['paymentProduct3208SpecificInput'].is_a? Hash
|
112
124
|
@payment_product3208_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3208SpecificInput.new_from_hash(hash['paymentProduct3208SpecificInput'])
|
@@ -115,6 +127,10 @@ module OnlinePayments::SDK
|
|
115
127
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3209SpecificInput']] unless hash['paymentProduct3209SpecificInput'].is_a? Hash
|
116
128
|
@payment_product3209_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3209SpecificInput.new_from_hash(hash['paymentProduct3209SpecificInput'])
|
117
129
|
end
|
130
|
+
if hash.key? 'paymentProduct5002SpecificInput'
|
131
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5002SpecificInput']] unless hash['paymentProduct5002SpecificInput'].is_a? Hash
|
132
|
+
@payment_product5002_specific_input = OnlinePayments::SDK::Domain::PaymentProduct5002SpecificInput.new_from_hash(hash['paymentProduct5002SpecificInput'])
|
133
|
+
end
|
118
134
|
@payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
|
119
135
|
if hash.key? 'recurring'
|
120
136
|
raise TypeError, "value '%s' is not a Hash" % [hash['recurring']] unless hash['recurring'].is_a? Hash
|
@@ -5,6 +5,7 @@ require 'onlinepayments/sdk/data_object'
|
|
5
5
|
require 'onlinepayments/sdk/domain/card_recurrence_details'
|
6
6
|
require 'onlinepayments/sdk/domain/currency_conversion_specific_input'
|
7
7
|
require 'onlinepayments/sdk/domain/payment_product130_specific_input'
|
8
|
+
require 'onlinepayments/sdk/domain/payment_product3012_specific_input'
|
8
9
|
require 'onlinepayments/sdk/domain/payment_product3208_specific_input'
|
9
10
|
require 'onlinepayments/sdk/domain/payment_product3209_specific_input'
|
10
11
|
require 'onlinepayments/sdk/domain/payment_product5100_specific_input'
|
@@ -18,6 +19,7 @@ module OnlinePayments::SDK
|
|
18
19
|
# @attr [OnlinePayments::SDK::Domain::CurrencyConversionSpecificInput] currency_conversion_specific_input
|
19
20
|
# @attr [String] initial_scheme_transaction_id
|
20
21
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
|
22
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3012SpecificInput] payment_product3012_specific_input
|
21
23
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3208SpecificInput] payment_product3208_specific_input
|
22
24
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3209SpecificInput] payment_product3209_specific_input
|
23
25
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct5100SpecificInput] payment_product5100_specific_input
|
@@ -35,6 +37,7 @@ module OnlinePayments::SDK
|
|
35
37
|
attr_accessor :currency_conversion_specific_input
|
36
38
|
attr_accessor :initial_scheme_transaction_id
|
37
39
|
attr_accessor :payment_product130_specific_input
|
40
|
+
attr_accessor :payment_product3012_specific_input
|
38
41
|
attr_accessor :payment_product3208_specific_input
|
39
42
|
attr_accessor :payment_product3209_specific_input
|
40
43
|
attr_accessor :payment_product5100_specific_input
|
@@ -55,6 +58,7 @@ module OnlinePayments::SDK
|
|
55
58
|
hash['currencyConversionSpecificInput'] = @currency_conversion_specific_input.to_h if @currency_conversion_specific_input
|
56
59
|
hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
|
57
60
|
hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h if @payment_product130_specific_input
|
61
|
+
hash['paymentProduct3012SpecificInput'] = @payment_product3012_specific_input.to_h if @payment_product3012_specific_input
|
58
62
|
hash['paymentProduct3208SpecificInput'] = @payment_product3208_specific_input.to_h if @payment_product3208_specific_input
|
59
63
|
hash['paymentProduct3209SpecificInput'] = @payment_product3209_specific_input.to_h if @payment_product3209_specific_input
|
60
64
|
hash['paymentProduct5100SpecificInput'] = @payment_product5100_specific_input.to_h if @payment_product5100_specific_input
|
@@ -82,6 +86,10 @@ module OnlinePayments::SDK
|
|
82
86
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct130SpecificInput']] unless hash['paymentProduct130SpecificInput'].is_a? Hash
|
83
87
|
@payment_product130_specific_input = OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput.new_from_hash(hash['paymentProduct130SpecificInput'])
|
84
88
|
end
|
89
|
+
if hash.key? 'paymentProduct3012SpecificInput'
|
90
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3012SpecificInput']] unless hash['paymentProduct3012SpecificInput'].is_a? Hash
|
91
|
+
@payment_product3012_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3012SpecificInput.new_from_hash(hash['paymentProduct3012SpecificInput'])
|
92
|
+
end
|
85
93
|
if hash.key? 'paymentProduct3208SpecificInput'
|
86
94
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3208SpecificInput']] unless hash['paymentProduct3208SpecificInput'].is_a? Hash
|
87
95
|
@payment_product3208_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3208SpecificInput.new_from_hash(hash['paymentProduct3208SpecificInput'])
|
data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb
CHANGED
@@ -6,20 +6,34 @@ require 'onlinepayments/sdk/data_object'
|
|
6
6
|
module OnlinePayments::SDK
|
7
7
|
module Domain
|
8
8
|
|
9
|
+
# @attr [true/false] click_to_pay
|
9
10
|
# @attr [true/false] group_cards
|
11
|
+
# @attr [Array<Integer>] payment_product_preferred_order
|
10
12
|
class CardPaymentMethodSpecificInputForHostedCheckout < OnlinePayments::SDK::DataObject
|
13
|
+
attr_accessor :click_to_pay
|
11
14
|
attr_accessor :group_cards
|
15
|
+
attr_accessor :payment_product_preferred_order
|
12
16
|
|
13
17
|
# @return (Hash)
|
14
18
|
def to_h
|
15
19
|
hash = super
|
20
|
+
hash['clickToPay'] = @click_to_pay unless @click_to_pay.nil?
|
16
21
|
hash['groupCards'] = @group_cards unless @group_cards.nil?
|
22
|
+
hash['paymentProductPreferredOrder'] = @payment_product_preferred_order unless @payment_product_preferred_order.nil?
|
17
23
|
hash
|
18
24
|
end
|
19
25
|
|
20
26
|
def from_hash(hash)
|
21
27
|
super
|
28
|
+
@click_to_pay = hash['clickToPay'] if hash.key? 'clickToPay'
|
22
29
|
@group_cards = hash['groupCards'] if hash.key? 'groupCards'
|
30
|
+
if hash.key? 'paymentProductPreferredOrder'
|
31
|
+
raise TypeError, "value '%s' is not an Array" % [hash['paymentProductPreferredOrder']] unless hash['paymentProductPreferredOrder'].is_a? Array
|
32
|
+
@payment_product_preferred_order = []
|
33
|
+
hash['paymentProductPreferredOrder'].each do |e|
|
34
|
+
@payment_product_preferred_order << e
|
35
|
+
end
|
36
|
+
end
|
23
37
|
end
|
24
38
|
end
|
25
39
|
end
|
@@ -7,6 +7,7 @@ require 'onlinepayments/sdk/domain/card_essentials'
|
|
7
7
|
require 'onlinepayments/sdk/domain/card_fraud_results'
|
8
8
|
require 'onlinepayments/sdk/domain/currency_conversion'
|
9
9
|
require 'onlinepayments/sdk/domain/external_token_linked'
|
10
|
+
require 'onlinepayments/sdk/domain/network_token_essentials'
|
10
11
|
require 'onlinepayments/sdk/domain/payment_product3208_specific_output'
|
11
12
|
require 'onlinepayments/sdk/domain/payment_product3209_specific_output'
|
12
13
|
require 'onlinepayments/sdk/domain/three_d_secure_results'
|
@@ -22,6 +23,7 @@ module OnlinePayments::SDK
|
|
22
23
|
# @attr [OnlinePayments::SDK::Domain::ExternalTokenLinked] external_token_linked
|
23
24
|
# @attr [OnlinePayments::SDK::Domain::CardFraudResults] fraud_results
|
24
25
|
# @attr [String] initial_scheme_transaction_id
|
26
|
+
# @attr [OnlinePayments::SDK::Domain::NetworkTokenEssentials] network_token_data
|
25
27
|
# @attr [String] payment_account_reference
|
26
28
|
# @attr [String] payment_option
|
27
29
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3208SpecificOutput] payment_product3208_specific_output
|
@@ -39,6 +41,7 @@ module OnlinePayments::SDK
|
|
39
41
|
attr_accessor :external_token_linked
|
40
42
|
attr_accessor :fraud_results
|
41
43
|
attr_accessor :initial_scheme_transaction_id
|
44
|
+
attr_accessor :network_token_data
|
42
45
|
attr_accessor :payment_account_reference
|
43
46
|
attr_accessor :payment_option
|
44
47
|
attr_accessor :payment_product3208_specific_output
|
@@ -59,6 +62,7 @@ module OnlinePayments::SDK
|
|
59
62
|
hash['externalTokenLinked'] = @external_token_linked.to_h if @external_token_linked
|
60
63
|
hash['fraudResults'] = @fraud_results.to_h if @fraud_results
|
61
64
|
hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
|
65
|
+
hash['networkTokenData'] = @network_token_data.to_h if @network_token_data
|
62
66
|
hash['paymentAccountReference'] = @payment_account_reference unless @payment_account_reference.nil?
|
63
67
|
hash['paymentOption'] = @payment_option unless @payment_option.nil?
|
64
68
|
hash['paymentProduct3208SpecificOutput'] = @payment_product3208_specific_output.to_h if @payment_product3208_specific_output
|
@@ -95,6 +99,10 @@ module OnlinePayments::SDK
|
|
95
99
|
@fraud_results = OnlinePayments::SDK::Domain::CardFraudResults.new_from_hash(hash['fraudResults'])
|
96
100
|
end
|
97
101
|
@initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId'
|
102
|
+
if hash.key? 'networkTokenData'
|
103
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['networkTokenData']] unless hash['networkTokenData'].is_a? Hash
|
104
|
+
@network_token_data = OnlinePayments::SDK::Domain::NetworkTokenEssentials.new_from_hash(hash['networkTokenData'])
|
105
|
+
end
|
98
106
|
@payment_account_reference = hash['paymentAccountReference'] if hash.key? 'paymentAccountReference'
|
99
107
|
@payment_option = hash['paymentOption'] if hash.key? 'paymentOption'
|
100
108
|
if hash.key? 'paymentProduct3208SpecificOutput'
|
@@ -7,6 +7,7 @@ require 'onlinepayments/sdk/domain/fraud_fields'
|
|
7
7
|
require 'onlinepayments/sdk/domain/hosted_checkout_specific_input'
|
8
8
|
require 'onlinepayments/sdk/domain/mobile_payment_method_hosted_checkout_specific_input'
|
9
9
|
require 'onlinepayments/sdk/domain/order'
|
10
|
+
require 'onlinepayments/sdk/domain/page_customization'
|
10
11
|
require 'onlinepayments/sdk/domain/redirect_payment_method_specific_input'
|
11
12
|
require 'onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input_base'
|
12
13
|
|
@@ -18,6 +19,7 @@ module OnlinePayments::SDK
|
|
18
19
|
# @attr [OnlinePayments::SDK::Domain::HostedCheckoutSpecificInput] hosted_checkout_specific_input
|
19
20
|
# @attr [OnlinePayments::SDK::Domain::MobilePaymentMethodHostedCheckoutSpecificInput] mobile_payment_method_specific_input
|
20
21
|
# @attr [OnlinePayments::SDK::Domain::Order] order
|
22
|
+
# @attr [OnlinePayments::SDK::Domain::PageCustomization] page_customization
|
21
23
|
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificInput] redirect_payment_method_specific_input
|
22
24
|
# @attr [OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificInputBase] sepa_direct_debit_payment_method_specific_input
|
23
25
|
class CreateHostedCheckoutRequest < OnlinePayments::SDK::DataObject
|
@@ -26,6 +28,7 @@ module OnlinePayments::SDK
|
|
26
28
|
attr_accessor :hosted_checkout_specific_input
|
27
29
|
attr_accessor :mobile_payment_method_specific_input
|
28
30
|
attr_accessor :order
|
31
|
+
attr_accessor :page_customization
|
29
32
|
attr_accessor :redirect_payment_method_specific_input
|
30
33
|
attr_accessor :sepa_direct_debit_payment_method_specific_input
|
31
34
|
|
@@ -37,6 +40,7 @@ module OnlinePayments::SDK
|
|
37
40
|
hash['hostedCheckoutSpecificInput'] = @hosted_checkout_specific_input.to_h if @hosted_checkout_specific_input
|
38
41
|
hash['mobilePaymentMethodSpecificInput'] = @mobile_payment_method_specific_input.to_h if @mobile_payment_method_specific_input
|
39
42
|
hash['order'] = @order.to_h if @order
|
43
|
+
hash['pageCustomization'] = @page_customization.to_h if @page_customization
|
40
44
|
hash['redirectPaymentMethodSpecificInput'] = @redirect_payment_method_specific_input.to_h if @redirect_payment_method_specific_input
|
41
45
|
hash['sepaDirectDebitPaymentMethodSpecificInput'] = @sepa_direct_debit_payment_method_specific_input.to_h if @sepa_direct_debit_payment_method_specific_input
|
42
46
|
hash
|
@@ -64,6 +68,10 @@ module OnlinePayments::SDK
|
|
64
68
|
raise TypeError, "value '%s' is not a Hash" % [hash['order']] unless hash['order'].is_a? Hash
|
65
69
|
@order = OnlinePayments::SDK::Domain::Order.new_from_hash(hash['order'])
|
66
70
|
end
|
71
|
+
if hash.key? 'pageCustomization'
|
72
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['pageCustomization']] unless hash['pageCustomization'].is_a? Hash
|
73
|
+
@page_customization = OnlinePayments::SDK::Domain::PageCustomization.new_from_hash(hash['pageCustomization'])
|
74
|
+
end
|
67
75
|
if hash.key? 'redirectPaymentMethodSpecificInput'
|
68
76
|
raise TypeError, "value '%s' is not a Hash" % [hash['redirectPaymentMethodSpecificInput']] unless hash['redirectPaymentMethodSpecificInput'].is_a? Hash
|
69
77
|
@redirect_payment_method_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificInput.new_from_hash(hash['redirectPaymentMethodSpecificInput'])
|
@@ -3,6 +3,7 @@
|
|
3
3
|
#
|
4
4
|
require 'onlinepayments/sdk/data_object'
|
5
5
|
require 'onlinepayments/sdk/domain/credit_card_specific_input_hosted_tokenization'
|
6
|
+
require 'onlinepayments/sdk/domain/page_customization'
|
6
7
|
require 'onlinepayments/sdk/domain/payment_product_filters_hosted_tokenization'
|
7
8
|
|
8
9
|
module OnlinePayments::SDK
|
@@ -11,6 +12,7 @@ module OnlinePayments::SDK
|
|
11
12
|
# @attr [true/false] ask_consumer_consent
|
12
13
|
# @attr [OnlinePayments::SDK::Domain::CreditCardSpecificInputHostedTokenization] credit_card_specific_input
|
13
14
|
# @attr [String] locale
|
15
|
+
# @attr [OnlinePayments::SDK::Domain::PageCustomization] page_customization
|
14
16
|
# @attr [OnlinePayments::SDK::Domain::PaymentProductFiltersHostedTokenization] payment_product_filters
|
15
17
|
# @attr [String] tokens
|
16
18
|
# @attr [String] variant
|
@@ -18,6 +20,7 @@ module OnlinePayments::SDK
|
|
18
20
|
attr_accessor :ask_consumer_consent
|
19
21
|
attr_accessor :credit_card_specific_input
|
20
22
|
attr_accessor :locale
|
23
|
+
attr_accessor :page_customization
|
21
24
|
attr_accessor :payment_product_filters
|
22
25
|
attr_accessor :tokens
|
23
26
|
attr_accessor :variant
|
@@ -28,6 +31,7 @@ module OnlinePayments::SDK
|
|
28
31
|
hash['askConsumerConsent'] = @ask_consumer_consent unless @ask_consumer_consent.nil?
|
29
32
|
hash['creditCardSpecificInput'] = @credit_card_specific_input.to_h if @credit_card_specific_input
|
30
33
|
hash['locale'] = @locale unless @locale.nil?
|
34
|
+
hash['pageCustomization'] = @page_customization.to_h if @page_customization
|
31
35
|
hash['paymentProductFilters'] = @payment_product_filters.to_h if @payment_product_filters
|
32
36
|
hash['tokens'] = @tokens unless @tokens.nil?
|
33
37
|
hash['variant'] = @variant unless @variant.nil?
|
@@ -42,6 +46,10 @@ module OnlinePayments::SDK
|
|
42
46
|
@credit_card_specific_input = OnlinePayments::SDK::Domain::CreditCardSpecificInputHostedTokenization.new_from_hash(hash['creditCardSpecificInput'])
|
43
47
|
end
|
44
48
|
@locale = hash['locale'] if hash.key? 'locale'
|
49
|
+
if hash.key? 'pageCustomization'
|
50
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['pageCustomization']] unless hash['pageCustomization'].is_a? Hash
|
51
|
+
@page_customization = OnlinePayments::SDK::Domain::PageCustomization.new_from_hash(hash['pageCustomization'])
|
52
|
+
end
|
45
53
|
if hash.key? 'paymentProductFilters'
|
46
54
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProductFilters']] unless hash['paymentProductFilters'].is_a? Hash
|
47
55
|
@payment_product_filters = OnlinePayments::SDK::Domain::PaymentProductFiltersHostedTokenization.new_from_hash(hash['paymentProductFilters'])
|
@@ -2,40 +2,104 @@
|
|
2
2
|
# This class was auto-generated.
|
3
3
|
#
|
4
4
|
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/card_payment_method_specific_input_base'
|
6
|
+
require 'onlinepayments/sdk/domain/fraud_fields'
|
7
|
+
require 'onlinepayments/sdk/domain/hosted_checkout_specific_input'
|
8
|
+
require 'onlinepayments/sdk/domain/mobile_payment_method_hosted_checkout_specific_input'
|
9
|
+
require 'onlinepayments/sdk/domain/order'
|
5
10
|
require 'onlinepayments/sdk/domain/payment_link_order_input'
|
11
|
+
require 'onlinepayments/sdk/domain/payment_link_specific_input'
|
12
|
+
require 'onlinepayments/sdk/domain/redirect_payment_method_specific_input'
|
13
|
+
require 'onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input_base'
|
6
14
|
|
7
15
|
module OnlinePayments::SDK
|
8
16
|
module Domain
|
9
17
|
|
18
|
+
# @attr [OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputBase] card_payment_method_specific_input
|
10
19
|
# @attr [String] description
|
11
20
|
# @attr [String] expiration_date
|
21
|
+
# @attr [OnlinePayments::SDK::Domain::FraudFields] fraud_fields
|
22
|
+
# @attr [OnlinePayments::SDK::Domain::HostedCheckoutSpecificInput] hosted_checkout_specific_input
|
23
|
+
# @attr [OnlinePayments::SDK::Domain::MobilePaymentMethodHostedCheckoutSpecificInput] mobile_payment_method_specific_input
|
24
|
+
# @attr [OnlinePayments::SDK::Domain::Order] order
|
12
25
|
# @attr [OnlinePayments::SDK::Domain::PaymentLinkOrderInput] payment_link_order
|
26
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentLinkSpecificInput] payment_link_specific_input
|
13
27
|
# @attr [String] recipient_name
|
28
|
+
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificInput] redirect_payment_method_specific_input
|
29
|
+
# @attr [OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificInputBase] sepa_direct_debit_payment_method_specific_input
|
14
30
|
class CreatePaymentLinkRequest < OnlinePayments::SDK::DataObject
|
31
|
+
attr_accessor :card_payment_method_specific_input
|
15
32
|
attr_accessor :description
|
16
33
|
attr_accessor :expiration_date
|
34
|
+
attr_accessor :fraud_fields
|
35
|
+
attr_accessor :hosted_checkout_specific_input
|
36
|
+
attr_accessor :mobile_payment_method_specific_input
|
37
|
+
attr_accessor :order
|
17
38
|
attr_accessor :payment_link_order
|
39
|
+
attr_accessor :payment_link_specific_input
|
18
40
|
attr_accessor :recipient_name
|
41
|
+
attr_accessor :redirect_payment_method_specific_input
|
42
|
+
attr_accessor :sepa_direct_debit_payment_method_specific_input
|
19
43
|
|
20
44
|
# @return (Hash)
|
21
45
|
def to_h
|
22
46
|
hash = super
|
47
|
+
hash['cardPaymentMethodSpecificInput'] = @card_payment_method_specific_input.to_h if @card_payment_method_specific_input
|
23
48
|
hash['description'] = @description unless @description.nil?
|
24
49
|
hash['expirationDate'] = @expiration_date unless @expiration_date.nil?
|
50
|
+
hash['fraudFields'] = @fraud_fields.to_h if @fraud_fields
|
51
|
+
hash['hostedCheckoutSpecificInput'] = @hosted_checkout_specific_input.to_h if @hosted_checkout_specific_input
|
52
|
+
hash['mobilePaymentMethodSpecificInput'] = @mobile_payment_method_specific_input.to_h if @mobile_payment_method_specific_input
|
53
|
+
hash['order'] = @order.to_h if @order
|
25
54
|
hash['paymentLinkOrder'] = @payment_link_order.to_h if @payment_link_order
|
55
|
+
hash['paymentLinkSpecificInput'] = @payment_link_specific_input.to_h if @payment_link_specific_input
|
26
56
|
hash['recipientName'] = @recipient_name unless @recipient_name.nil?
|
57
|
+
hash['redirectPaymentMethodSpecificInput'] = @redirect_payment_method_specific_input.to_h if @redirect_payment_method_specific_input
|
58
|
+
hash['sepaDirectDebitPaymentMethodSpecificInput'] = @sepa_direct_debit_payment_method_specific_input.to_h if @sepa_direct_debit_payment_method_specific_input
|
27
59
|
hash
|
28
60
|
end
|
29
61
|
|
30
62
|
def from_hash(hash)
|
31
63
|
super
|
64
|
+
if hash.key? 'cardPaymentMethodSpecificInput'
|
65
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificInput']] unless hash['cardPaymentMethodSpecificInput'].is_a? Hash
|
66
|
+
@card_payment_method_specific_input = OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputBase.new_from_hash(hash['cardPaymentMethodSpecificInput'])
|
67
|
+
end
|
32
68
|
@description = hash['description'] if hash.key? 'description'
|
33
69
|
@expiration_date = hash['expirationDate'] if hash.key? 'expirationDate'
|
70
|
+
if hash.key? 'fraudFields'
|
71
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['fraudFields']] unless hash['fraudFields'].is_a? Hash
|
72
|
+
@fraud_fields = OnlinePayments::SDK::Domain::FraudFields.new_from_hash(hash['fraudFields'])
|
73
|
+
end
|
74
|
+
if hash.key? 'hostedCheckoutSpecificInput'
|
75
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['hostedCheckoutSpecificInput']] unless hash['hostedCheckoutSpecificInput'].is_a? Hash
|
76
|
+
@hosted_checkout_specific_input = OnlinePayments::SDK::Domain::HostedCheckoutSpecificInput.new_from_hash(hash['hostedCheckoutSpecificInput'])
|
77
|
+
end
|
78
|
+
if hash.key? 'mobilePaymentMethodSpecificInput'
|
79
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificInput']] unless hash['mobilePaymentMethodSpecificInput'].is_a? Hash
|
80
|
+
@mobile_payment_method_specific_input = OnlinePayments::SDK::Domain::MobilePaymentMethodHostedCheckoutSpecificInput.new_from_hash(hash['mobilePaymentMethodSpecificInput'])
|
81
|
+
end
|
82
|
+
if hash.key? 'order'
|
83
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['order']] unless hash['order'].is_a? Hash
|
84
|
+
@order = OnlinePayments::SDK::Domain::Order.new_from_hash(hash['order'])
|
85
|
+
end
|
34
86
|
if hash.key? 'paymentLinkOrder'
|
35
87
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentLinkOrder']] unless hash['paymentLinkOrder'].is_a? Hash
|
36
88
|
@payment_link_order = OnlinePayments::SDK::Domain::PaymentLinkOrderInput.new_from_hash(hash['paymentLinkOrder'])
|
37
89
|
end
|
90
|
+
if hash.key? 'paymentLinkSpecificInput'
|
91
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentLinkSpecificInput']] unless hash['paymentLinkSpecificInput'].is_a? Hash
|
92
|
+
@payment_link_specific_input = OnlinePayments::SDK::Domain::PaymentLinkSpecificInput.new_from_hash(hash['paymentLinkSpecificInput'])
|
93
|
+
end
|
38
94
|
@recipient_name = hash['recipientName'] if hash.key? 'recipientName'
|
95
|
+
if hash.key? 'redirectPaymentMethodSpecificInput'
|
96
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['redirectPaymentMethodSpecificInput']] unless hash['redirectPaymentMethodSpecificInput'].is_a? Hash
|
97
|
+
@redirect_payment_method_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificInput.new_from_hash(hash['redirectPaymentMethodSpecificInput'])
|
98
|
+
end
|
99
|
+
if hash.key? 'sepaDirectDebitPaymentMethodSpecificInput'
|
100
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['sepaDirectDebitPaymentMethodSpecificInput']] unless hash['sepaDirectDebitPaymentMethodSpecificInput'].is_a? Hash
|
101
|
+
@sepa_direct_debit_payment_method_specific_input = OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificInputBase.new_from_hash(hash['sepaDirectDebitPaymentMethodSpecificInput'])
|
102
|
+
end
|
39
103
|
end
|
40
104
|
end
|
41
105
|
end
|
@@ -6,6 +6,7 @@ require 'onlinepayments/sdk/domain/card_payment_method_specific_input'
|
|
6
6
|
require 'onlinepayments/sdk/domain/fraud_fields'
|
7
7
|
require 'onlinepayments/sdk/domain/mobile_payment_method_specific_input'
|
8
8
|
require 'onlinepayments/sdk/domain/order'
|
9
|
+
require 'onlinepayments/sdk/domain/page_customization'
|
9
10
|
require 'onlinepayments/sdk/domain/redirect_payment_method_specific_input'
|
10
11
|
require 'onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input'
|
11
12
|
|
@@ -18,8 +19,10 @@ module OnlinePayments::SDK
|
|
18
19
|
# @attr [String] hosted_tokenization_id
|
19
20
|
# @attr [OnlinePayments::SDK::Domain::MobilePaymentMethodSpecificInput] mobile_payment_method_specific_input
|
20
21
|
# @attr [OnlinePayments::SDK::Domain::Order] order
|
22
|
+
# @attr [OnlinePayments::SDK::Domain::PageCustomization] page_customization
|
21
23
|
# @attr [OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificInput] redirect_payment_method_specific_input
|
22
24
|
# @attr [OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificInput] sepa_direct_debit_payment_method_specific_input
|
25
|
+
# @attr [Integer] session_timeout
|
23
26
|
class CreatePaymentRequest < OnlinePayments::SDK::DataObject
|
24
27
|
attr_accessor :card_payment_method_specific_input
|
25
28
|
attr_accessor :encrypted_customer_input
|
@@ -27,8 +30,10 @@ module OnlinePayments::SDK
|
|
27
30
|
attr_accessor :hosted_tokenization_id
|
28
31
|
attr_accessor :mobile_payment_method_specific_input
|
29
32
|
attr_accessor :order
|
33
|
+
attr_accessor :page_customization
|
30
34
|
attr_accessor :redirect_payment_method_specific_input
|
31
35
|
attr_accessor :sepa_direct_debit_payment_method_specific_input
|
36
|
+
attr_accessor :session_timeout
|
32
37
|
|
33
38
|
# @return (Hash)
|
34
39
|
def to_h
|
@@ -39,8 +44,10 @@ module OnlinePayments::SDK
|
|
39
44
|
hash['hostedTokenizationId'] = @hosted_tokenization_id unless @hosted_tokenization_id.nil?
|
40
45
|
hash['mobilePaymentMethodSpecificInput'] = @mobile_payment_method_specific_input.to_h if @mobile_payment_method_specific_input
|
41
46
|
hash['order'] = @order.to_h if @order
|
47
|
+
hash['pageCustomization'] = @page_customization.to_h if @page_customization
|
42
48
|
hash['redirectPaymentMethodSpecificInput'] = @redirect_payment_method_specific_input.to_h if @redirect_payment_method_specific_input
|
43
49
|
hash['sepaDirectDebitPaymentMethodSpecificInput'] = @sepa_direct_debit_payment_method_specific_input.to_h if @sepa_direct_debit_payment_method_specific_input
|
50
|
+
hash['sessionTimeout'] = @session_timeout unless @session_timeout.nil?
|
44
51
|
hash
|
45
52
|
end
|
46
53
|
|
@@ -64,6 +71,10 @@ module OnlinePayments::SDK
|
|
64
71
|
raise TypeError, "value '%s' is not a Hash" % [hash['order']] unless hash['order'].is_a? Hash
|
65
72
|
@order = OnlinePayments::SDK::Domain::Order.new_from_hash(hash['order'])
|
66
73
|
end
|
74
|
+
if hash.key? 'pageCustomization'
|
75
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['pageCustomization']] unless hash['pageCustomization'].is_a? Hash
|
76
|
+
@page_customization = OnlinePayments::SDK::Domain::PageCustomization.new_from_hash(hash['pageCustomization'])
|
77
|
+
end
|
67
78
|
if hash.key? 'redirectPaymentMethodSpecificInput'
|
68
79
|
raise TypeError, "value '%s' is not a Hash" % [hash['redirectPaymentMethodSpecificInput']] unless hash['redirectPaymentMethodSpecificInput'].is_a? Hash
|
69
80
|
@redirect_payment_method_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificInput.new_from_hash(hash['redirectPaymentMethodSpecificInput'])
|
@@ -72,6 +83,7 @@ module OnlinePayments::SDK
|
|
72
83
|
raise TypeError, "value '%s' is not a Hash" % [hash['sepaDirectDebitPaymentMethodSpecificInput']] unless hash['sepaDirectDebitPaymentMethodSpecificInput'].is_a? Hash
|
73
84
|
@sepa_direct_debit_payment_method_specific_input = OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificInput.new_from_hash(hash['sepaDirectDebitPaymentMethodSpecificInput'])
|
74
85
|
end
|
86
|
+
@session_timeout = hash['sessionTimeout'] if hash.key? 'sessionTimeout'
|
75
87
|
end
|
76
88
|
end
|
77
89
|
end
|
@@ -8,13 +8,16 @@ module OnlinePayments::SDK
|
|
8
8
|
module Domain
|
9
9
|
|
10
10
|
# @attr [OnlinePayments::SDK::Domain::CreditCardValidationRulesHostedTokenization] validation_rules
|
11
|
+
# @attr [Array<Integer>] payment_product_preferred_order
|
11
12
|
class CreditCardSpecificInputHostedTokenization < OnlinePayments::SDK::DataObject
|
12
13
|
attr_accessor :validation_rules
|
14
|
+
attr_accessor :payment_product_preferred_order
|
13
15
|
|
14
16
|
# @return (Hash)
|
15
17
|
def to_h
|
16
18
|
hash = super
|
17
19
|
hash['ValidationRules'] = @validation_rules.to_h if @validation_rules
|
20
|
+
hash['paymentProductPreferredOrder'] = @payment_product_preferred_order unless @payment_product_preferred_order.nil?
|
18
21
|
hash
|
19
22
|
end
|
20
23
|
|
@@ -24,6 +27,13 @@ module OnlinePayments::SDK
|
|
24
27
|
raise TypeError, "value '%s' is not a Hash" % [hash['ValidationRules']] unless hash['ValidationRules'].is_a? Hash
|
25
28
|
@validation_rules = OnlinePayments::SDK::Domain::CreditCardValidationRulesHostedTokenization.new_from_hash(hash['ValidationRules'])
|
26
29
|
end
|
30
|
+
if hash.key? 'paymentProductPreferredOrder'
|
31
|
+
raise TypeError, "value '%s' is not an Array" % [hash['paymentProductPreferredOrder']] unless hash['paymentProductPreferredOrder'].is_a? Array
|
32
|
+
@payment_product_preferred_order = []
|
33
|
+
hash['paymentProductPreferredOrder'].each do |e|
|
34
|
+
@payment_product_preferred_order << e
|
35
|
+
end
|
36
|
+
end
|
27
37
|
end
|
28
38
|
end
|
29
39
|
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
# This class was auto-generated.
|
3
3
|
#
|
4
4
|
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/acquirer_information'
|
5
6
|
require 'onlinepayments/sdk/domain/card_fraud_results'
|
6
7
|
require 'onlinepayments/sdk/domain/mobile_payment_data'
|
7
8
|
require 'onlinepayments/sdk/domain/three_d_secure_results'
|
@@ -9,6 +10,7 @@ require 'onlinepayments/sdk/domain/three_d_secure_results'
|
|
9
10
|
module OnlinePayments::SDK
|
10
11
|
module Domain
|
11
12
|
|
13
|
+
# @attr [OnlinePayments::SDK::Domain::AcquirerInformation] acquirer_information
|
12
14
|
# @attr [String] authorisation_code
|
13
15
|
# @attr [OnlinePayments::SDK::Domain::CardFraudResults] fraud_results
|
14
16
|
# @attr [String] network
|
@@ -16,6 +18,7 @@ module OnlinePayments::SDK
|
|
16
18
|
# @attr [Integer] payment_product_id
|
17
19
|
# @attr [OnlinePayments::SDK::Domain::ThreeDSecureResults] three_d_secure_results
|
18
20
|
class MobilePaymentMethodSpecificOutput < OnlinePayments::SDK::DataObject
|
21
|
+
attr_accessor :acquirer_information
|
19
22
|
attr_accessor :authorisation_code
|
20
23
|
attr_accessor :fraud_results
|
21
24
|
attr_accessor :network
|
@@ -26,6 +29,7 @@ module OnlinePayments::SDK
|
|
26
29
|
# @return (Hash)
|
27
30
|
def to_h
|
28
31
|
hash = super
|
32
|
+
hash['acquirerInformation'] = @acquirer_information.to_h if @acquirer_information
|
29
33
|
hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
|
30
34
|
hash['fraudResults'] = @fraud_results.to_h if @fraud_results
|
31
35
|
hash['network'] = @network unless @network.nil?
|
@@ -37,6 +41,10 @@ module OnlinePayments::SDK
|
|
37
41
|
|
38
42
|
def from_hash(hash)
|
39
43
|
super
|
44
|
+
if hash.key? 'acquirerInformation'
|
45
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['acquirerInformation']] unless hash['acquirerInformation'].is_a? Hash
|
46
|
+
@acquirer_information = OnlinePayments::SDK::Domain::AcquirerInformation.new_from_hash(hash['acquirerInformation'])
|
47
|
+
end
|
40
48
|
@authorisation_code = hash['authorisationCode'] if hash.key? 'authorisationCode'
|
41
49
|
if hash.key? 'fraudResults'
|
42
50
|
raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']] unless hash['fraudResults'].is_a? Hash
|
@@ -0,0 +1,38 @@
|
|
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] bin
|
10
|
+
# @attr [String] country_code
|
11
|
+
# @attr [String] network_token
|
12
|
+
# @attr [String] token_expiry_date
|
13
|
+
class NetworkTokenEssentials < OnlinePayments::SDK::DataObject
|
14
|
+
attr_accessor :bin
|
15
|
+
attr_accessor :country_code
|
16
|
+
attr_accessor :network_token
|
17
|
+
attr_accessor :token_expiry_date
|
18
|
+
|
19
|
+
# @return (Hash)
|
20
|
+
def to_h
|
21
|
+
hash = super
|
22
|
+
hash['bin'] = @bin unless @bin.nil?
|
23
|
+
hash['countryCode'] = @country_code unless @country_code.nil?
|
24
|
+
hash['networkToken'] = @network_token unless @network_token.nil?
|
25
|
+
hash['tokenExpiryDate'] = @token_expiry_date unless @token_expiry_date.nil?
|
26
|
+
hash
|
27
|
+
end
|
28
|
+
|
29
|
+
def from_hash(hash)
|
30
|
+
super
|
31
|
+
@bin = hash['bin'] if hash.key? 'bin'
|
32
|
+
@country_code = hash['countryCode'] if hash.key? 'countryCode'
|
33
|
+
@network_token = hash['networkToken'] if hash.key? 'networkToken'
|
34
|
+
@token_expiry_date = hash['tokenExpiryDate'] if hash.key? 'tokenExpiryDate'
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
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] template
|
10
|
+
class PageCustomization < OnlinePayments::SDK::DataObject
|
11
|
+
attr_accessor :template
|
12
|
+
|
13
|
+
# @return (Hash)
|
14
|
+
def to_h
|
15
|
+
hash = super
|
16
|
+
hash['template'] = @template unless @template.nil?
|
17
|
+
hash
|
18
|
+
end
|
19
|
+
|
20
|
+
def from_hash(hash)
|
21
|
+
super
|
22
|
+
@template = hash['template'] if hash.key? 'template'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|