onlinepayments-sdk-ruby 6.4.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/onlinepayments/sdk/client.rb +1 -1
- data/lib/onlinepayments/sdk/communication/metadata_provider.rb +1 -1
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input.rb +9 -0
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_base.rb +9 -0
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb +7 -0
- data/lib/onlinepayments/sdk/domain/create_payment_link_request.rb +7 -0
- data/lib/onlinepayments/sdk/domain/created_token_response.rb +9 -0
- data/lib/onlinepayments/sdk/domain/credit_card_specific_input_hosted_tokenization.rb +3 -3
- data/lib/onlinepayments/sdk/domain/{credit_card_validation_rules_hosted_tokenization.rb → credit_card_validation_rules.rb} +1 -1
- data/lib/onlinepayments/sdk/domain/crm_token.rb +37 -0
- data/lib/onlinepayments/sdk/domain/g_pay_three_d_secure.rb +7 -0
- data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb +9 -0
- data/lib/onlinepayments/sdk/domain/market_place.rb +37 -0
- data/lib/onlinepayments/sdk/domain/omnichannel_payout_specific_input.rb +7 -0
- data/lib/onlinepayments/sdk/domain/omnichannel_subsequent_specific_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/payment_link_response.rb +7 -0
- data/lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb +15 -0
- data/lib/onlinepayments/sdk/domain/payment_response.rb +9 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb +18 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product11_specific_input.rb +32 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product3307_specific_input.rb +13 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product5300_specific_input.rb +7 -0
- data/lib/onlinepayments/sdk/domain/refund_redirect_payment_method_specific_input.rb +32 -0
- data/lib/onlinepayments/sdk/domain/refund_redirect_payment_product900_specific_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/refund_request.rb +9 -0
- data/lib/onlinepayments/sdk/domain/session_details.rb +37 -0
- data/lib/onlinepayments/sdk/domain/split_payment_product_filter.rb +34 -0
- data/lib/onlinepayments/sdk/domain/split_payment_product_filters_hosted_checkout.rb +40 -0
- data/lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb +9 -0
- data/lib/onlinepayments/sdk/domain/subsequent_payment_request.rb +9 -0
- data/lib/onlinepayments/sdk/domain/token_response.rb +9 -0
- data/lib/onlinepayments/sdk/merchant/merchant_client.rb +2 -2
- data/lib/onlinepayments/sdk/merchant/paymentlinks/payment_links_client.rb +0 -29
- data/lib/onlinepayments/sdk/merchant/payouts/payouts_client.rb +19 -19
- data/lib/onlinepayments/sdk/merchant/productgroups/get_product_group_params.rb +6 -6
- data/lib/onlinepayments/sdk/merchant/productgroups/get_product_groups_params.rb +6 -6
- data/lib/onlinepayments/sdk/merchant/products/get_payment_product_networks_params.rb +4 -4
- data/lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb +6 -6
- data/lib/onlinepayments/sdk/merchant/products/get_payment_products_params.rb +6 -6
- data/lib/onlinepayments/sdk/merchant/products/get_product_directory_params.rb +2 -2
- data/lib/onlinepayments/sdk/merchant/tokens/tokens_client.rb +24 -24
- data/onlinepayments-sdk-ruby.gemspec +1 -1
- metadata +13 -4
- data/lib/onlinepayments/sdk/merchant/paymentlinks/get_payment_links_in_bulk_params.rb +0 -28
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6f0ccc29bcc6f58a324f66c0eef46a99d7464ffd16e2b2ff900668212f0f827c
|
|
4
|
+
data.tar.gz: ca86bed33c8e75468dc17f8549b7b9dba0814a37ab73cd5ec2e94f1f7da051ba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 522111d90f2eeabaf27f0da7f67a7a350befb7bb49ad898987021b42757e8b13746fef269e592f07a38240ec56c6eb15206f12baae6f652419830fb51e26b18b
|
|
7
|
+
data.tar.gz: b9991bb40cf14dcd9ef44462b19489b81ad9ea463f3af2d90d7decb4971608dc33421fe595d01555dddbb72c3abb78d41a1c2c6b8036ef4cb1648469797da190
|
data/README.md
CHANGED
|
@@ -10,7 +10,7 @@ The Ruby SDK helps you to communicate with the payment platform server API. Its
|
|
|
10
10
|
* handling of all the details concerning authentication
|
|
11
11
|
* handling of required metadata
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
See the [Online Payments Developer Hub](https://github.com/Online-Payments/sdk-ruby/) for more information on how to use the SDK.
|
|
14
14
|
|
|
15
15
|
## Structure of this repository
|
|
16
16
|
|
|
@@ -38,7 +38,7 @@ module OnlinePayments
|
|
|
38
38
|
return Client.new(@communicator, nil)
|
|
39
39
|
else
|
|
40
40
|
# Checking to see if this is valid JSON (no JSON parse exceptions)
|
|
41
|
-
@communicator.marshaller.unmarshal(client_meta_info, DataObject)
|
|
41
|
+
@communicator.marshaller.unmarshal(client_meta_info, OnlinePayments::SDK::Domain::DataObject)
|
|
42
42
|
client_meta_info = Base64.strict_encode64(client_meta_info)
|
|
43
43
|
if @client_meta_info == client_meta_info
|
|
44
44
|
self
|
|
@@ -13,7 +13,7 @@ module OnlinePayments
|
|
|
13
13
|
class MetadataProvider
|
|
14
14
|
private
|
|
15
15
|
|
|
16
|
-
SDK_VERSION = '
|
|
16
|
+
SDK_VERSION = '7.0.0'.freeze
|
|
17
17
|
SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'.freeze
|
|
18
18
|
PROHIBITED_HEADERS = [SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key', 'Date', 'Content-Type', 'Authorization'].sort!.freeze
|
|
19
19
|
CHARSET = 'utf-8'.freeze
|
|
@@ -5,6 +5,7 @@ require 'onlinepayments/sdk/domain/card'
|
|
|
5
5
|
require 'onlinepayments/sdk/domain/card_recurrence_details'
|
|
6
6
|
require 'onlinepayments/sdk/domain/currency_conversion_input'
|
|
7
7
|
require 'onlinepayments/sdk/domain/data_object'
|
|
8
|
+
require 'onlinepayments/sdk/domain/market_place'
|
|
8
9
|
require 'onlinepayments/sdk/domain/multiple_payment_information'
|
|
9
10
|
require 'onlinepayments/sdk/domain/network_token_data'
|
|
10
11
|
require 'onlinepayments/sdk/domain/payment_product130_specific_input'
|
|
@@ -26,6 +27,7 @@ module OnlinePayments
|
|
|
26
27
|
# @attr [OnlinePayments::SDK::Domain::CurrencyConversionInput] currency_conversion
|
|
27
28
|
# @attr [String] initial_scheme_transaction_id
|
|
28
29
|
# @attr [true/false] is_recurring
|
|
30
|
+
# @attr [OnlinePayments::SDK::Domain::MarketPlace] market_place
|
|
29
31
|
# @attr [OnlinePayments::SDK::Domain::MultiplePaymentInformation] multiple_payment_information
|
|
30
32
|
# @attr [OnlinePayments::SDK::Domain::NetworkTokenData] network_token_data
|
|
31
33
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
|
|
@@ -64,6 +66,8 @@ module OnlinePayments
|
|
|
64
66
|
|
|
65
67
|
attr_accessor :is_recurring
|
|
66
68
|
|
|
69
|
+
attr_accessor :market_place
|
|
70
|
+
|
|
67
71
|
attr_accessor :multiple_payment_information
|
|
68
72
|
|
|
69
73
|
attr_accessor :network_token_data
|
|
@@ -113,6 +117,7 @@ module OnlinePayments
|
|
|
113
117
|
hash['currencyConversion'] = @currency_conversion.to_h unless @currency_conversion.nil?
|
|
114
118
|
hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
|
|
115
119
|
hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
|
|
120
|
+
hash['marketPlace'] = @market_place.to_h unless @market_place.nil?
|
|
116
121
|
hash['multiplePaymentInformation'] = @multiple_payment_information.to_h unless @multiple_payment_information.nil?
|
|
117
122
|
hash['networkTokenData'] = @network_token_data.to_h unless @network_token_data.nil?
|
|
118
123
|
hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h unless @payment_product130_specific_input.nil?
|
|
@@ -165,6 +170,10 @@ module OnlinePayments
|
|
|
165
170
|
if hash.has_key? 'isRecurring'
|
|
166
171
|
@is_recurring = hash['isRecurring']
|
|
167
172
|
end
|
|
173
|
+
if hash.has_key? 'marketPlace'
|
|
174
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['marketPlace']] unless hash['marketPlace'].is_a? Hash
|
|
175
|
+
@market_place = OnlinePayments::SDK::Domain::MarketPlace.new_from_hash(hash['marketPlace'])
|
|
176
|
+
end
|
|
168
177
|
if hash.has_key? 'multiplePaymentInformation'
|
|
169
178
|
raise TypeError, "value '%s' is not a Hash" % [hash['multiplePaymentInformation']] unless hash['multiplePaymentInformation'].is_a? Hash
|
|
170
179
|
@multiple_payment_information = OnlinePayments::SDK::Domain::MultiplePaymentInformation.new_from_hash(hash['multiplePaymentInformation'])
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
require 'onlinepayments/sdk/domain/card_recurrence_details'
|
|
5
5
|
require 'onlinepayments/sdk/domain/currency_conversion_specific_input'
|
|
6
6
|
require 'onlinepayments/sdk/domain/data_object'
|
|
7
|
+
require 'onlinepayments/sdk/domain/market_place'
|
|
7
8
|
require 'onlinepayments/sdk/domain/multiple_payment_information'
|
|
8
9
|
require 'onlinepayments/sdk/domain/payment_product130_specific_input'
|
|
9
10
|
require 'onlinepayments/sdk/domain/payment_product3012_specific_input'
|
|
@@ -20,6 +21,7 @@ module OnlinePayments
|
|
|
20
21
|
# @attr [String] authorization_mode
|
|
21
22
|
# @attr [OnlinePayments::SDK::Domain::CurrencyConversionSpecificInput] currency_conversion_specific_input
|
|
22
23
|
# @attr [String] initial_scheme_transaction_id
|
|
24
|
+
# @attr [OnlinePayments::SDK::Domain::MarketPlace] market_place
|
|
23
25
|
# @attr [OnlinePayments::SDK::Domain::MultiplePaymentInformation] multiple_payment_information
|
|
24
26
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
|
|
25
27
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3012SpecificInput] payment_product3012_specific_input
|
|
@@ -45,6 +47,8 @@ module OnlinePayments
|
|
|
45
47
|
|
|
46
48
|
attr_accessor :initial_scheme_transaction_id
|
|
47
49
|
|
|
50
|
+
attr_accessor :market_place
|
|
51
|
+
|
|
48
52
|
attr_accessor :multiple_payment_information
|
|
49
53
|
|
|
50
54
|
attr_accessor :payment_product130_specific_input
|
|
@@ -82,6 +86,7 @@ module OnlinePayments
|
|
|
82
86
|
hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
|
|
83
87
|
hash['currencyConversionSpecificInput'] = @currency_conversion_specific_input.to_h unless @currency_conversion_specific_input.nil?
|
|
84
88
|
hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
|
|
89
|
+
hash['marketPlace'] = @market_place.to_h unless @market_place.nil?
|
|
85
90
|
hash['multiplePaymentInformation'] = @multiple_payment_information.to_h unless @multiple_payment_information.nil?
|
|
86
91
|
hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h unless @payment_product130_specific_input.nil?
|
|
87
92
|
hash['paymentProduct3012SpecificInput'] = @payment_product3012_specific_input.to_h unless @payment_product3012_specific_input.nil?
|
|
@@ -115,6 +120,10 @@ module OnlinePayments
|
|
|
115
120
|
if hash.has_key? 'initialSchemeTransactionId'
|
|
116
121
|
@initial_scheme_transaction_id = hash['initialSchemeTransactionId']
|
|
117
122
|
end
|
|
123
|
+
if hash.has_key? 'marketPlace'
|
|
124
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['marketPlace']] unless hash['marketPlace'].is_a? Hash
|
|
125
|
+
@market_place = OnlinePayments::SDK::Domain::MarketPlace.new_from_hash(hash['marketPlace'])
|
|
126
|
+
end
|
|
118
127
|
if hash.has_key? 'multiplePaymentInformation'
|
|
119
128
|
raise TypeError, "value '%s' is not a Hash" % [hash['multiplePaymentInformation']] unless hash['multiplePaymentInformation'].is_a? Hash
|
|
120
129
|
@multiple_payment_information = OnlinePayments::SDK::Domain::MultiplePaymentInformation.new_from_hash(hash['multiplePaymentInformation'])
|
data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb
CHANGED
|
@@ -9,6 +9,7 @@ module OnlinePayments
|
|
|
9
9
|
# @attr [true/false] click_to_pay
|
|
10
10
|
# @attr [true/false] group_cards
|
|
11
11
|
# @attr [Array<Integer>] payment_product_preferred_order
|
|
12
|
+
# @attr [String] tokenization_mode
|
|
12
13
|
class CardPaymentMethodSpecificInputForHostedCheckout < OnlinePayments::SDK::Domain::DataObject
|
|
13
14
|
|
|
14
15
|
attr_accessor :click_to_pay
|
|
@@ -17,12 +18,15 @@ module OnlinePayments
|
|
|
17
18
|
|
|
18
19
|
attr_accessor :payment_product_preferred_order
|
|
19
20
|
|
|
21
|
+
attr_accessor :tokenization_mode
|
|
22
|
+
|
|
20
23
|
# @return (Hash)
|
|
21
24
|
def to_h
|
|
22
25
|
hash = super
|
|
23
26
|
hash['clickToPay'] = @click_to_pay unless @click_to_pay.nil?
|
|
24
27
|
hash['groupCards'] = @group_cards unless @group_cards.nil?
|
|
25
28
|
hash['paymentProductPreferredOrder'] = @payment_product_preferred_order unless @payment_product_preferred_order.nil?
|
|
29
|
+
hash['tokenizationMode'] = @tokenization_mode unless @tokenization_mode.nil?
|
|
26
30
|
hash
|
|
27
31
|
end
|
|
28
32
|
|
|
@@ -41,6 +45,9 @@ module OnlinePayments
|
|
|
41
45
|
@payment_product_preferred_order << e
|
|
42
46
|
end
|
|
43
47
|
end
|
|
48
|
+
if hash.has_key? 'tokenizationMode'
|
|
49
|
+
@tokenization_mode = hash['tokenizationMode']
|
|
50
|
+
end
|
|
44
51
|
end
|
|
45
52
|
end
|
|
46
53
|
end
|
|
@@ -20,6 +20,7 @@ module OnlinePayments
|
|
|
20
20
|
module Domain
|
|
21
21
|
# @attr [OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputBase] card_payment_method_specific_input
|
|
22
22
|
# @attr [String] description
|
|
23
|
+
# @attr [true/false] display_qr_code
|
|
23
24
|
# @attr [DateTime] expiration_date
|
|
24
25
|
# @attr [OnlinePayments::SDK::Domain::Feedbacks] feedbacks
|
|
25
26
|
# @attr [OnlinePayments::SDK::Domain::FraudFields] fraud_fields
|
|
@@ -39,6 +40,8 @@ module OnlinePayments
|
|
|
39
40
|
# @deprecated A note related to the created payment link. Use paymentLinkSpecificInput/description instead.
|
|
40
41
|
attr_accessor :description
|
|
41
42
|
|
|
43
|
+
attr_accessor :display_qr_code
|
|
44
|
+
|
|
42
45
|
# @deprecated The date after which the payment link will not be usable to complete the payment. The date sent cannot be more than 6 months in the future or a past date. It must also contain the UTC offset. Use paymentLinkSpecificInput/expirationDate instead.
|
|
43
46
|
attr_accessor :expiration_date
|
|
44
47
|
|
|
@@ -70,6 +73,7 @@ module OnlinePayments
|
|
|
70
73
|
hash = super
|
|
71
74
|
hash['cardPaymentMethodSpecificInput'] = @card_payment_method_specific_input.to_h unless @card_payment_method_specific_input.nil?
|
|
72
75
|
hash['description'] = @description unless @description.nil?
|
|
76
|
+
hash['displayQRCode'] = @display_qr_code unless @display_qr_code.nil?
|
|
73
77
|
hash['expirationDate'] = @expiration_date.iso8601(3) unless @expiration_date.nil?
|
|
74
78
|
hash['feedbacks'] = @feedbacks.to_h unless @feedbacks.nil?
|
|
75
79
|
hash['fraudFields'] = @fraud_fields.to_h unless @fraud_fields.nil?
|
|
@@ -94,6 +98,9 @@ module OnlinePayments
|
|
|
94
98
|
if hash.has_key? 'description'
|
|
95
99
|
@description = hash['description']
|
|
96
100
|
end
|
|
101
|
+
if hash.has_key? 'displayQRCode'
|
|
102
|
+
@display_qr_code = hash['displayQRCode']
|
|
103
|
+
end
|
|
97
104
|
if hash.has_key? 'expirationDate'
|
|
98
105
|
@expiration_date = DateTime.parse(hash['expirationDate'])
|
|
99
106
|
end
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
# This file was automatically generated.
|
|
3
3
|
#
|
|
4
4
|
require 'onlinepayments/sdk/domain/card_without_cvv'
|
|
5
|
+
require 'onlinepayments/sdk/domain/crm_token'
|
|
5
6
|
require 'onlinepayments/sdk/domain/data_object'
|
|
6
7
|
require 'onlinepayments/sdk/domain/external_token_linked'
|
|
7
8
|
|
|
@@ -9,6 +10,7 @@ module OnlinePayments
|
|
|
9
10
|
module SDK
|
|
10
11
|
module Domain
|
|
11
12
|
# @attr [OnlinePayments::SDK::Domain::CardWithoutCvv] card
|
|
13
|
+
# @attr [OnlinePayments::SDK::Domain::CrmToken] crm_token
|
|
12
14
|
# @attr [OnlinePayments::SDK::Domain::ExternalTokenLinked] external_token_linked
|
|
13
15
|
# @attr [true/false] is_new_token
|
|
14
16
|
# @attr [String] token
|
|
@@ -17,6 +19,8 @@ module OnlinePayments
|
|
|
17
19
|
|
|
18
20
|
attr_accessor :card
|
|
19
21
|
|
|
22
|
+
attr_accessor :crm_token
|
|
23
|
+
|
|
20
24
|
attr_accessor :external_token_linked
|
|
21
25
|
|
|
22
26
|
attr_accessor :is_new_token
|
|
@@ -29,6 +33,7 @@ module OnlinePayments
|
|
|
29
33
|
def to_h
|
|
30
34
|
hash = super
|
|
31
35
|
hash['card'] = @card.to_h unless @card.nil?
|
|
36
|
+
hash['crmToken'] = @crm_token.to_h unless @crm_token.nil?
|
|
32
37
|
hash['externalTokenLinked'] = @external_token_linked.to_h unless @external_token_linked.nil?
|
|
33
38
|
hash['isNewToken'] = @is_new_token unless @is_new_token.nil?
|
|
34
39
|
hash['token'] = @token unless @token.nil?
|
|
@@ -42,6 +47,10 @@ module OnlinePayments
|
|
|
42
47
|
raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
|
|
43
48
|
@card = OnlinePayments::SDK::Domain::CardWithoutCvv.new_from_hash(hash['card'])
|
|
44
49
|
end
|
|
50
|
+
if hash.has_key? 'crmToken'
|
|
51
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['crmToken']] unless hash['crmToken'].is_a? Hash
|
|
52
|
+
@crm_token = OnlinePayments::SDK::Domain::CrmToken.new_from_hash(hash['crmToken'])
|
|
53
|
+
end
|
|
45
54
|
if hash.has_key? 'externalTokenLinked'
|
|
46
55
|
raise TypeError, "value '%s' is not a Hash" % [hash['externalTokenLinked']] unless hash['externalTokenLinked'].is_a? Hash
|
|
47
56
|
@external_token_linked = OnlinePayments::SDK::Domain::ExternalTokenLinked.new_from_hash(hash['externalTokenLinked'])
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#
|
|
2
2
|
# This file was automatically generated.
|
|
3
3
|
#
|
|
4
|
-
require 'onlinepayments/sdk/domain/
|
|
4
|
+
require 'onlinepayments/sdk/domain/credit_card_validation_rules'
|
|
5
5
|
require 'onlinepayments/sdk/domain/data_object'
|
|
6
6
|
|
|
7
7
|
module OnlinePayments
|
|
8
8
|
module SDK
|
|
9
9
|
module Domain
|
|
10
|
-
# @attr [OnlinePayments::SDK::Domain::
|
|
10
|
+
# @attr [OnlinePayments::SDK::Domain::CreditCardValidationRules] validation_rules
|
|
11
11
|
# @attr [Array<Integer>] payment_product_preferred_order
|
|
12
12
|
class CreditCardSpecificInputHostedTokenization < OnlinePayments::SDK::Domain::DataObject
|
|
13
13
|
|
|
@@ -27,7 +27,7 @@ module OnlinePayments
|
|
|
27
27
|
super
|
|
28
28
|
if hash.has_key? 'ValidationRules'
|
|
29
29
|
raise TypeError, "value '%s' is not a Hash" % [hash['ValidationRules']] unless hash['ValidationRules'].is_a? Hash
|
|
30
|
-
@validation_rules = OnlinePayments::SDK::Domain::
|
|
30
|
+
@validation_rules = OnlinePayments::SDK::Domain::CreditCardValidationRules.new_from_hash(hash['ValidationRules'])
|
|
31
31
|
end
|
|
32
32
|
if hash.has_key? 'paymentProductPreferredOrder'
|
|
33
33
|
raise TypeError, "value '%s' is not an Array" % [hash['paymentProductPreferredOrder']] unless hash['paymentProductPreferredOrder'].is_a? Array
|
|
@@ -8,7 +8,7 @@ module OnlinePayments
|
|
|
8
8
|
module Domain
|
|
9
9
|
# @attr [true/false] cvv_mandatory_for_existing_token
|
|
10
10
|
# @attr [true/false] cvv_mandatory_for_new_token
|
|
11
|
-
class
|
|
11
|
+
class CreditCardValidationRules < OnlinePayments::SDK::Domain::DataObject
|
|
12
12
|
|
|
13
13
|
attr_accessor :cvv_mandatory_for_existing_token
|
|
14
14
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file was automatically generated.
|
|
3
|
+
#
|
|
4
|
+
require 'onlinepayments/sdk/domain/data_object'
|
|
5
|
+
|
|
6
|
+
module OnlinePayments
|
|
7
|
+
module SDK
|
|
8
|
+
module Domain
|
|
9
|
+
# @attr [String] unique_account_identifier
|
|
10
|
+
# @attr [String] unique_card_identifier
|
|
11
|
+
class CrmToken < OnlinePayments::SDK::Domain::DataObject
|
|
12
|
+
|
|
13
|
+
attr_accessor :unique_account_identifier
|
|
14
|
+
|
|
15
|
+
attr_accessor :unique_card_identifier
|
|
16
|
+
|
|
17
|
+
# @return (Hash)
|
|
18
|
+
def to_h
|
|
19
|
+
hash = super
|
|
20
|
+
hash['uniqueAccountIdentifier'] = @unique_account_identifier unless @unique_account_identifier.nil?
|
|
21
|
+
hash['uniqueCardIdentifier'] = @unique_card_identifier unless @unique_card_identifier.nil?
|
|
22
|
+
hash
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def from_hash(hash)
|
|
26
|
+
super
|
|
27
|
+
if hash.has_key? 'uniqueAccountIdentifier'
|
|
28
|
+
@unique_account_identifier = hash['uniqueAccountIdentifier']
|
|
29
|
+
end
|
|
30
|
+
if hash.has_key? 'uniqueCardIdentifier'
|
|
31
|
+
@unique_card_identifier = hash['uniqueCardIdentifier']
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -12,6 +12,7 @@ module OnlinePayments
|
|
|
12
12
|
# @attr [String] exemption_request
|
|
13
13
|
# @attr [OnlinePayments::SDK::Domain::RedirectionData] redirection_data
|
|
14
14
|
# @attr [true/false] skip_authentication
|
|
15
|
+
# @attr [true/false] skip_soft_decline
|
|
15
16
|
class GPayThreeDSecure < OnlinePayments::SDK::Domain::DataObject
|
|
16
17
|
|
|
17
18
|
attr_accessor :challenge_canvas_size
|
|
@@ -24,6 +25,8 @@ module OnlinePayments
|
|
|
24
25
|
|
|
25
26
|
attr_accessor :skip_authentication
|
|
26
27
|
|
|
28
|
+
attr_accessor :skip_soft_decline
|
|
29
|
+
|
|
27
30
|
# @return (Hash)
|
|
28
31
|
def to_h
|
|
29
32
|
hash = super
|
|
@@ -32,6 +35,7 @@ module OnlinePayments
|
|
|
32
35
|
hash['exemptionRequest'] = @exemption_request unless @exemption_request.nil?
|
|
33
36
|
hash['redirectionData'] = @redirection_data.to_h unless @redirection_data.nil?
|
|
34
37
|
hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
|
|
38
|
+
hash['skipSoftDecline'] = @skip_soft_decline unless @skip_soft_decline.nil?
|
|
35
39
|
hash
|
|
36
40
|
end
|
|
37
41
|
|
|
@@ -53,6 +57,9 @@ module OnlinePayments
|
|
|
53
57
|
if hash.has_key? 'skipAuthentication'
|
|
54
58
|
@skip_authentication = hash['skipAuthentication']
|
|
55
59
|
end
|
|
60
|
+
if hash.has_key? 'skipSoftDecline'
|
|
61
|
+
@skip_soft_decline = hash['skipSoftDecline']
|
|
62
|
+
end
|
|
56
63
|
end
|
|
57
64
|
end
|
|
58
65
|
end
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
require 'onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout'
|
|
5
5
|
require 'onlinepayments/sdk/domain/data_object'
|
|
6
6
|
require 'onlinepayments/sdk/domain/payment_product_filters_hosted_checkout'
|
|
7
|
+
require 'onlinepayments/sdk/domain/split_payment_product_filters_hosted_checkout'
|
|
7
8
|
|
|
8
9
|
module OnlinePayments
|
|
9
10
|
module SDK
|
|
@@ -17,6 +18,7 @@ module OnlinePayments
|
|
|
17
18
|
# @attr [String] return_url
|
|
18
19
|
# @attr [Integer] session_timeout
|
|
19
20
|
# @attr [true/false] show_result_page
|
|
21
|
+
# @attr [OnlinePayments::SDK::Domain::SplitPaymentProductFiltersHostedCheckout] split_payment_product_filters
|
|
20
22
|
# @attr [String] tokens
|
|
21
23
|
# @attr [String] variant
|
|
22
24
|
class HostedCheckoutSpecificInput < OnlinePayments::SDK::Domain::DataObject
|
|
@@ -39,6 +41,8 @@ module OnlinePayments
|
|
|
39
41
|
|
|
40
42
|
attr_accessor :show_result_page
|
|
41
43
|
|
|
44
|
+
attr_accessor :split_payment_product_filters
|
|
45
|
+
|
|
42
46
|
attr_accessor :tokens
|
|
43
47
|
|
|
44
48
|
attr_accessor :variant
|
|
@@ -55,6 +59,7 @@ module OnlinePayments
|
|
|
55
59
|
hash['returnUrl'] = @return_url unless @return_url.nil?
|
|
56
60
|
hash['sessionTimeout'] = @session_timeout unless @session_timeout.nil?
|
|
57
61
|
hash['showResultPage'] = @show_result_page unless @show_result_page.nil?
|
|
62
|
+
hash['splitPaymentProductFilters'] = @split_payment_product_filters.to_h unless @split_payment_product_filters.nil?
|
|
58
63
|
hash['tokens'] = @tokens unless @tokens.nil?
|
|
59
64
|
hash['variant'] = @variant unless @variant.nil?
|
|
60
65
|
hash
|
|
@@ -91,6 +96,10 @@ module OnlinePayments
|
|
|
91
96
|
if hash.has_key? 'showResultPage'
|
|
92
97
|
@show_result_page = hash['showResultPage']
|
|
93
98
|
end
|
|
99
|
+
if hash.has_key? 'splitPaymentProductFilters'
|
|
100
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['splitPaymentProductFilters']] unless hash['splitPaymentProductFilters'].is_a? Hash
|
|
101
|
+
@split_payment_product_filters = OnlinePayments::SDK::Domain::SplitPaymentProductFiltersHostedCheckout.new_from_hash(hash['splitPaymentProductFilters'])
|
|
102
|
+
end
|
|
94
103
|
if hash.has_key? 'tokens'
|
|
95
104
|
@tokens = hash['tokens']
|
|
96
105
|
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file was automatically generated.
|
|
3
|
+
#
|
|
4
|
+
require 'onlinepayments/sdk/domain/data_object'
|
|
5
|
+
|
|
6
|
+
module OnlinePayments
|
|
7
|
+
module SDK
|
|
8
|
+
module Domain
|
|
9
|
+
# @attr [String] retailer_country
|
|
10
|
+
# @attr [String] retailer_name
|
|
11
|
+
class MarketPlace < OnlinePayments::SDK::Domain::DataObject
|
|
12
|
+
|
|
13
|
+
attr_accessor :retailer_country
|
|
14
|
+
|
|
15
|
+
attr_accessor :retailer_name
|
|
16
|
+
|
|
17
|
+
# @return (Hash)
|
|
18
|
+
def to_h
|
|
19
|
+
hash = super
|
|
20
|
+
hash['retailerCountry'] = @retailer_country unless @retailer_country.nil?
|
|
21
|
+
hash['retailerName'] = @retailer_name unless @retailer_name.nil?
|
|
22
|
+
hash
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def from_hash(hash)
|
|
26
|
+
super
|
|
27
|
+
if hash.has_key? 'retailerCountry'
|
|
28
|
+
@retailer_country = hash['retailerCountry']
|
|
29
|
+
end
|
|
30
|
+
if hash.has_key? 'retailerName'
|
|
31
|
+
@retailer_name = hash['retailerName']
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -6,20 +6,27 @@ require 'onlinepayments/sdk/domain/data_object'
|
|
|
6
6
|
module OnlinePayments
|
|
7
7
|
module SDK
|
|
8
8
|
module Domain
|
|
9
|
+
# @attr [String] operator_id
|
|
9
10
|
# @attr [String] payment_id
|
|
10
11
|
class OmnichannelPayoutSpecificInput < OnlinePayments::SDK::Domain::DataObject
|
|
11
12
|
|
|
13
|
+
attr_accessor :operator_id
|
|
14
|
+
|
|
12
15
|
attr_accessor :payment_id
|
|
13
16
|
|
|
14
17
|
# @return (Hash)
|
|
15
18
|
def to_h
|
|
16
19
|
hash = super
|
|
20
|
+
hash['operatorId'] = @operator_id unless @operator_id.nil?
|
|
17
21
|
hash['paymentId'] = @payment_id unless @payment_id.nil?
|
|
18
22
|
hash
|
|
19
23
|
end
|
|
20
24
|
|
|
21
25
|
def from_hash(hash)
|
|
22
26
|
super
|
|
27
|
+
if hash.has_key? 'operatorId'
|
|
28
|
+
@operator_id = hash['operatorId']
|
|
29
|
+
end
|
|
23
30
|
if hash.has_key? 'paymentId'
|
|
24
31
|
@payment_id = hash['paymentId']
|
|
25
32
|
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file was automatically generated.
|
|
3
|
+
#
|
|
4
|
+
require 'onlinepayments/sdk/domain/data_object'
|
|
5
|
+
|
|
6
|
+
module OnlinePayments
|
|
7
|
+
module SDK
|
|
8
|
+
module Domain
|
|
9
|
+
# @attr [String] operator_id
|
|
10
|
+
class OmnichannelSubsequentSpecificInput < OnlinePayments::SDK::Domain::DataObject
|
|
11
|
+
|
|
12
|
+
attr_accessor :operator_id
|
|
13
|
+
|
|
14
|
+
# @return (Hash)
|
|
15
|
+
def to_h
|
|
16
|
+
hash = super
|
|
17
|
+
hash['operatorId'] = @operator_id unless @operator_id.nil?
|
|
18
|
+
hash
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def from_hash(hash)
|
|
22
|
+
super
|
|
23
|
+
if hash.has_key? 'operatorId'
|
|
24
|
+
@operator_id = hash['operatorId']
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -16,6 +16,7 @@ module OnlinePayments
|
|
|
16
16
|
# @attr [Array<OnlinePayments::SDK::Domain::PaymentLinkEvent>] payment_link_events
|
|
17
17
|
# @attr [String] payment_link_id
|
|
18
18
|
# @attr [OnlinePayments::SDK::Domain::PaymentLinkOrderOutput] payment_link_order
|
|
19
|
+
# @attr [String] qr_code_base64
|
|
19
20
|
# @attr [String] recipient_name
|
|
20
21
|
# @attr [String] redirection_url
|
|
21
22
|
# @attr [String] status
|
|
@@ -33,6 +34,8 @@ module OnlinePayments
|
|
|
33
34
|
|
|
34
35
|
attr_accessor :payment_link_order
|
|
35
36
|
|
|
37
|
+
attr_accessor :qr_code_base64
|
|
38
|
+
|
|
36
39
|
attr_accessor :recipient_name
|
|
37
40
|
|
|
38
41
|
attr_accessor :redirection_url
|
|
@@ -48,6 +51,7 @@ module OnlinePayments
|
|
|
48
51
|
hash['paymentLinkEvents'] = @payment_link_events.collect{|val| val.to_h} unless @payment_link_events.nil?
|
|
49
52
|
hash['paymentLinkId'] = @payment_link_id unless @payment_link_id.nil?
|
|
50
53
|
hash['paymentLinkOrder'] = @payment_link_order.to_h unless @payment_link_order.nil?
|
|
54
|
+
hash['qrCodeBase64'] = @qr_code_base64 unless @qr_code_base64.nil?
|
|
51
55
|
hash['recipientName'] = @recipient_name unless @recipient_name.nil?
|
|
52
56
|
hash['redirectionUrl'] = @redirection_url unless @redirection_url.nil?
|
|
53
57
|
hash['status'] = @status unless @status.nil?
|
|
@@ -79,6 +83,9 @@ module OnlinePayments
|
|
|
79
83
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentLinkOrder']] unless hash['paymentLinkOrder'].is_a? Hash
|
|
80
84
|
@payment_link_order = OnlinePayments::SDK::Domain::PaymentLinkOrderOutput.new_from_hash(hash['paymentLinkOrder'])
|
|
81
85
|
end
|
|
86
|
+
if hash.has_key? 'qrCodeBase64'
|
|
87
|
+
@qr_code_base64 = hash['qrCodeBase64']
|
|
88
|
+
end
|
|
82
89
|
if hash.has_key? 'recipientName'
|
|
83
90
|
@recipient_name = hash['recipientName']
|
|
84
91
|
end
|
|
@@ -14,7 +14,9 @@ module OnlinePayments
|
|
|
14
14
|
# @attr [OnlinePayments::SDK::Domain::AddressPersonal] billing_personal_address
|
|
15
15
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct840CustomerAccount] customer_account
|
|
16
16
|
# @attr [OnlinePayments::SDK::Domain::Address] customer_address
|
|
17
|
+
# @attr [String] pay_pal_transaction_id
|
|
17
18
|
# @attr [OnlinePayments::SDK::Domain::ProtectionEligibility] protection_eligibility
|
|
19
|
+
# @attr [OnlinePayments::SDK::Domain::AddressPersonal] shipping_address
|
|
18
20
|
class PaymentProduct840SpecificOutput < OnlinePayments::SDK::Domain::DataObject
|
|
19
21
|
|
|
20
22
|
attr_accessor :billing_address
|
|
@@ -25,8 +27,12 @@ module OnlinePayments
|
|
|
25
27
|
|
|
26
28
|
attr_accessor :customer_address
|
|
27
29
|
|
|
30
|
+
attr_accessor :pay_pal_transaction_id
|
|
31
|
+
|
|
28
32
|
attr_accessor :protection_eligibility
|
|
29
33
|
|
|
34
|
+
attr_accessor :shipping_address
|
|
35
|
+
|
|
30
36
|
# @return (Hash)
|
|
31
37
|
def to_h
|
|
32
38
|
hash = super
|
|
@@ -34,7 +40,9 @@ module OnlinePayments
|
|
|
34
40
|
hash['billingPersonalAddress'] = @billing_personal_address.to_h unless @billing_personal_address.nil?
|
|
35
41
|
hash['customerAccount'] = @customer_account.to_h unless @customer_account.nil?
|
|
36
42
|
hash['customerAddress'] = @customer_address.to_h unless @customer_address.nil?
|
|
43
|
+
hash['payPalTransactionId'] = @pay_pal_transaction_id unless @pay_pal_transaction_id.nil?
|
|
37
44
|
hash['protectionEligibility'] = @protection_eligibility.to_h unless @protection_eligibility.nil?
|
|
45
|
+
hash['shippingAddress'] = @shipping_address.to_h unless @shipping_address.nil?
|
|
38
46
|
hash
|
|
39
47
|
end
|
|
40
48
|
|
|
@@ -56,10 +64,17 @@ module OnlinePayments
|
|
|
56
64
|
raise TypeError, "value '%s' is not a Hash" % [hash['customerAddress']] unless hash['customerAddress'].is_a? Hash
|
|
57
65
|
@customer_address = OnlinePayments::SDK::Domain::Address.new_from_hash(hash['customerAddress'])
|
|
58
66
|
end
|
|
67
|
+
if hash.has_key? 'payPalTransactionId'
|
|
68
|
+
@pay_pal_transaction_id = hash['payPalTransactionId']
|
|
69
|
+
end
|
|
59
70
|
if hash.has_key? 'protectionEligibility'
|
|
60
71
|
raise TypeError, "value '%s' is not a Hash" % [hash['protectionEligibility']] unless hash['protectionEligibility'].is_a? Hash
|
|
61
72
|
@protection_eligibility = OnlinePayments::SDK::Domain::ProtectionEligibility.new_from_hash(hash['protectionEligibility'])
|
|
62
73
|
end
|
|
74
|
+
if hash.has_key? 'shippingAddress'
|
|
75
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['shippingAddress']] unless hash['shippingAddress'].is_a? Hash
|
|
76
|
+
@shipping_address = OnlinePayments::SDK::Domain::AddressPersonal.new_from_hash(hash['shippingAddress'])
|
|
77
|
+
end
|
|
63
78
|
end
|
|
64
79
|
end
|
|
65
80
|
end
|
|
@@ -5,6 +5,7 @@ require 'onlinepayments/sdk/domain/data_object'
|
|
|
5
5
|
require 'onlinepayments/sdk/domain/hosted_checkout_specific_output'
|
|
6
6
|
require 'onlinepayments/sdk/domain/payment_output'
|
|
7
7
|
require 'onlinepayments/sdk/domain/payment_status_output'
|
|
8
|
+
require 'onlinepayments/sdk/domain/session_details'
|
|
8
9
|
|
|
9
10
|
module OnlinePayments
|
|
10
11
|
module SDK
|
|
@@ -12,6 +13,7 @@ module OnlinePayments
|
|
|
12
13
|
# @attr [OnlinePayments::SDK::Domain::HostedCheckoutSpecificOutput] hosted_checkout_specific_output
|
|
13
14
|
# @attr [String] id
|
|
14
15
|
# @attr [OnlinePayments::SDK::Domain::PaymentOutput] payment_output
|
|
16
|
+
# @attr [OnlinePayments::SDK::Domain::SessionDetails] session_details
|
|
15
17
|
# @attr [String] status
|
|
16
18
|
# @attr [OnlinePayments::SDK::Domain::PaymentStatusOutput] status_output
|
|
17
19
|
class PaymentResponse < OnlinePayments::SDK::Domain::DataObject
|
|
@@ -22,6 +24,8 @@ module OnlinePayments
|
|
|
22
24
|
|
|
23
25
|
attr_accessor :payment_output
|
|
24
26
|
|
|
27
|
+
attr_accessor :session_details
|
|
28
|
+
|
|
25
29
|
attr_accessor :status
|
|
26
30
|
|
|
27
31
|
attr_accessor :status_output
|
|
@@ -32,6 +36,7 @@ module OnlinePayments
|
|
|
32
36
|
hash['hostedCheckoutSpecificOutput'] = @hosted_checkout_specific_output.to_h unless @hosted_checkout_specific_output.nil?
|
|
33
37
|
hash['id'] = @id unless @id.nil?
|
|
34
38
|
hash['paymentOutput'] = @payment_output.to_h unless @payment_output.nil?
|
|
39
|
+
hash['sessionDetails'] = @session_details.to_h unless @session_details.nil?
|
|
35
40
|
hash['status'] = @status unless @status.nil?
|
|
36
41
|
hash['statusOutput'] = @status_output.to_h unless @status_output.nil?
|
|
37
42
|
hash
|
|
@@ -50,6 +55,10 @@ module OnlinePayments
|
|
|
50
55
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentOutput']] unless hash['paymentOutput'].is_a? Hash
|
|
51
56
|
@payment_output = OnlinePayments::SDK::Domain::PaymentOutput.new_from_hash(hash['paymentOutput'])
|
|
52
57
|
end
|
|
58
|
+
if hash.has_key? 'sessionDetails'
|
|
59
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['sessionDetails']] unless hash['sessionDetails'].is_a? Hash
|
|
60
|
+
@session_details = OnlinePayments::SDK::Domain::SessionDetails.new_from_hash(hash['sessionDetails'])
|
|
61
|
+
end
|
|
53
62
|
if hash.has_key? 'status'
|
|
54
63
|
@status = hash['status']
|
|
55
64
|
end
|