onlinepayments-sdk-ruby 6.3.1 → 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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/onlinepayments/sdk/authentication/v1hmac_authenticator.rb +2 -1
  4. data/lib/onlinepayments/sdk/client.rb +1 -1
  5. data/lib/onlinepayments/sdk/communication/metadata_provider.rb +1 -1
  6. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input.rb +9 -0
  7. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_base.rb +9 -0
  8. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb +7 -0
  9. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb +16 -0
  10. data/lib/onlinepayments/sdk/domain/create_payment_link_request.rb +7 -0
  11. data/lib/onlinepayments/sdk/domain/create_payment_request.rb +7 -0
  12. data/lib/onlinepayments/sdk/domain/created_token_response.rb +9 -0
  13. data/lib/onlinepayments/sdk/domain/credit_card_specific_input_hosted_tokenization.rb +3 -3
  14. data/lib/onlinepayments/sdk/domain/{credit_card_validation_rules_hosted_tokenization.rb → credit_card_validation_rules.rb} +1 -1
  15. data/lib/onlinepayments/sdk/domain/crm_token.rb +37 -0
  16. data/lib/onlinepayments/sdk/domain/g_pay_three_d_secure.rb +7 -0
  17. data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb +16 -0
  18. data/lib/onlinepayments/sdk/domain/market_place.rb +37 -0
  19. data/lib/onlinepayments/sdk/domain/network_token_essentials.rb +65 -0
  20. data/lib/onlinepayments/sdk/domain/network_token_linked.rb +44 -0
  21. data/lib/onlinepayments/sdk/domain/omnichannel_payout_specific_input.rb +7 -0
  22. data/lib/onlinepayments/sdk/domain/omnichannel_subsequent_specific_input.rb +30 -0
  23. data/lib/onlinepayments/sdk/domain/payment_link_response.rb +7 -0
  24. data/lib/onlinepayments/sdk/domain/payment_product350.rb +37 -0
  25. data/lib/onlinepayments/sdk/domain/payment_product5001.rb +1 -0
  26. data/lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb +15 -0
  27. data/lib/onlinepayments/sdk/domain/payment_response.rb +9 -0
  28. data/lib/onlinepayments/sdk/domain/pending_authentication.rb +30 -0
  29. data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb +18 -0
  30. data/lib/onlinepayments/sdk/domain/redirect_payment_product11_specific_input.rb +32 -0
  31. data/lib/onlinepayments/sdk/domain/redirect_payment_product3307_specific_input.rb +13 -0
  32. data/lib/onlinepayments/sdk/domain/redirect_payment_product5300_specific_input.rb +7 -0
  33. data/lib/onlinepayments/sdk/domain/redirect_payment_product5412_specific_input.rb +7 -0
  34. data/lib/onlinepayments/sdk/domain/refund_redirect_payment_method_specific_input.rb +32 -0
  35. data/lib/onlinepayments/sdk/domain/refund_redirect_payment_product900_specific_input.rb +30 -0
  36. data/lib/onlinepayments/sdk/domain/refund_request.rb +9 -0
  37. data/lib/onlinepayments/sdk/domain/session_details.rb +37 -0
  38. data/lib/onlinepayments/sdk/domain/show_form_data.rb +18 -0
  39. data/lib/onlinepayments/sdk/domain/split_payment_product_filter.rb +34 -0
  40. data/lib/onlinepayments/sdk/domain/split_payment_product_filters_hosted_checkout.rb +40 -0
  41. data/lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb +9 -0
  42. data/lib/onlinepayments/sdk/domain/subsequent_payment_product5001_specific_input.rb +0 -7
  43. data/lib/onlinepayments/sdk/domain/subsequent_payment_request.rb +9 -0
  44. data/lib/onlinepayments/sdk/domain/token_response.rb +18 -0
  45. data/lib/onlinepayments/sdk/merchant/merchant_client.rb +2 -2
  46. data/lib/onlinepayments/sdk/merchant/paymentlinks/payment_links_client.rb +0 -29
  47. data/lib/onlinepayments/sdk/merchant/payouts/payouts_client.rb +19 -19
  48. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_group_params.rb +6 -6
  49. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_groups_params.rb +6 -6
  50. data/lib/onlinepayments/sdk/merchant/products/get_payment_product_networks_params.rb +4 -4
  51. data/lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb +6 -6
  52. data/lib/onlinepayments/sdk/merchant/products/get_payment_products_params.rb +6 -6
  53. data/lib/onlinepayments/sdk/merchant/products/get_product_directory_params.rb +2 -2
  54. data/lib/onlinepayments/sdk/merchant/tokens/tokens_client.rb +24 -24
  55. data/onlinepayments-sdk-ruby.gemspec +1 -1
  56. metadata +17 -4
  57. 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: fe015629d32e6e358cf0bfe83726a3e80fc22dd3f12f0be5c6b806e99f12fb4a
4
- data.tar.gz: 360e97f6ce3a57ef4db88a546e32c24b94b02c0fed060afcf59526f99df46d88
3
+ metadata.gz: 6f0ccc29bcc6f58a324f66c0eef46a99d7464ffd16e2b2ff900668212f0f827c
4
+ data.tar.gz: ca86bed33c8e75468dc17f8549b7b9dba0814a37ab73cd5ec2e94f1f7da051ba
5
5
  SHA512:
6
- metadata.gz: f04d811c01094bcc5f337eb9aa29a94a3bdbc1eec988ea02478cf228331bcf1d12823c5ddd521e0f7833e2064ef8cfc033141529972f082ff5664090df25b689
7
- data.tar.gz: d8192455c69d32cbbfe1a16e46c3399a506a36748becd639ffe3ece3f98c564575407dc71e3833d348da863ced1f5efda12cad2a9d50ac17884b53e87614681c
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
- Its use is demonstrated by an example for each possible call. The examples execute a call using the provided API keys.
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
 
@@ -16,6 +16,7 @@ module OnlinePayments
16
16
  CONTENT_TYPE = 'Content-Type'.freeze
17
17
  DATE = 'Date'.freeze
18
18
  XGCS = 'X-GCS'.freeze
19
+ XGCS_LOWER = XGCS.downcase.freeze
19
20
 
20
21
  # Constructs a new V1HmacAuthenticator instance using the provided CommunicatorConfiguration.
21
22
  #
@@ -66,7 +67,7 @@ module OnlinePayments
66
67
  content_type = value
67
68
  when name.casecmp(DATE).zero?
68
69
  date = value
69
- when to_canonical_header_name(name).start_with?("X-GCS")
70
+ when to_canonical_header_name(name).start_with?(XGCS_LOWER)
70
71
  xgc_http_headers << [to_canonical_header_name(name), to_canonical_header_value(value)]
71
72
  end
72
73
  end
@@ -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 = '6.3.1'.freeze
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'])
@@ -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
@@ -8,6 +8,7 @@ require 'onlinepayments/sdk/domain/click_to_pay'
8
8
  require 'onlinepayments/sdk/domain/currency_conversion'
9
9
  require 'onlinepayments/sdk/domain/data_object'
10
10
  require 'onlinepayments/sdk/domain/external_token_linked'
11
+ require 'onlinepayments/sdk/domain/network_token_essentials'
11
12
  require 'onlinepayments/sdk/domain/payment_product3208_specific_output'
12
13
  require 'onlinepayments/sdk/domain/payment_product3209_specific_output'
13
14
  require 'onlinepayments/sdk/domain/reattempt_instructions'
@@ -21,10 +22,12 @@ module OnlinePayments
21
22
  # @attr [String] authorisation_code
22
23
  # @attr [OnlinePayments::SDK::Domain::CardEssentials] card
23
24
  # @attr [OnlinePayments::SDK::Domain::ClickToPay] click_to_pay
25
+ # @attr [String] cobrand_selection_indicator
24
26
  # @attr [OnlinePayments::SDK::Domain::CurrencyConversion] currency_conversion
25
27
  # @attr [OnlinePayments::SDK::Domain::ExternalTokenLinked] external_token_linked
26
28
  # @attr [OnlinePayments::SDK::Domain::CardFraudResults] fraud_results
27
29
  # @attr [String] initial_scheme_transaction_id
30
+ # @attr [OnlinePayments::SDK::Domain::NetworkTokenEssentials] network_token_data
28
31
  # @attr [String] payment_account_reference
29
32
  # @attr [String] payment_option
30
33
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct3208SpecificOutput] payment_product3208_specific_output
@@ -46,6 +49,8 @@ module OnlinePayments
46
49
 
47
50
  attr_accessor :click_to_pay
48
51
 
52
+ attr_accessor :cobrand_selection_indicator
53
+
49
54
  attr_accessor :currency_conversion
50
55
 
51
56
  attr_accessor :external_token_linked
@@ -54,6 +59,8 @@ module OnlinePayments
54
59
 
55
60
  attr_accessor :initial_scheme_transaction_id
56
61
 
62
+ attr_accessor :network_token_data
63
+
57
64
  attr_accessor :payment_account_reference
58
65
 
59
66
  attr_accessor :payment_option
@@ -80,10 +87,12 @@ module OnlinePayments
80
87
  hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
81
88
  hash['card'] = @card.to_h unless @card.nil?
82
89
  hash['clickToPay'] = @click_to_pay.to_h unless @click_to_pay.nil?
90
+ hash['cobrandSelectionIndicator'] = @cobrand_selection_indicator unless @cobrand_selection_indicator.nil?
83
91
  hash['currencyConversion'] = @currency_conversion.to_h unless @currency_conversion.nil?
84
92
  hash['externalTokenLinked'] = @external_token_linked.to_h unless @external_token_linked.nil?
85
93
  hash['fraudResults'] = @fraud_results.to_h unless @fraud_results.nil?
86
94
  hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
95
+ hash['networkTokenData'] = @network_token_data.to_h unless @network_token_data.nil?
87
96
  hash['paymentAccountReference'] = @payment_account_reference unless @payment_account_reference.nil?
88
97
  hash['paymentOption'] = @payment_option unless @payment_option.nil?
89
98
  hash['paymentProduct3208SpecificOutput'] = @payment_product3208_specific_output.to_h unless @payment_product3208_specific_output.nil?
@@ -116,6 +125,9 @@ module OnlinePayments
116
125
  raise TypeError, "value '%s' is not a Hash" % [hash['clickToPay']] unless hash['clickToPay'].is_a? Hash
117
126
  @click_to_pay = OnlinePayments::SDK::Domain::ClickToPay.new_from_hash(hash['clickToPay'])
118
127
  end
128
+ if hash.has_key? 'cobrandSelectionIndicator'
129
+ @cobrand_selection_indicator = hash['cobrandSelectionIndicator']
130
+ end
119
131
  if hash.has_key? 'currencyConversion'
120
132
  raise TypeError, "value '%s' is not a Hash" % [hash['currencyConversion']] unless hash['currencyConversion'].is_a? Hash
121
133
  @currency_conversion = OnlinePayments::SDK::Domain::CurrencyConversion.new_from_hash(hash['currencyConversion'])
@@ -131,6 +143,10 @@ module OnlinePayments
131
143
  if hash.has_key? 'initialSchemeTransactionId'
132
144
  @initial_scheme_transaction_id = hash['initialSchemeTransactionId']
133
145
  end
146
+ if hash.has_key? 'networkTokenData'
147
+ raise TypeError, "value '%s' is not a Hash" % [hash['networkTokenData']] unless hash['networkTokenData'].is_a? Hash
148
+ @network_token_data = OnlinePayments::SDK::Domain::NetworkTokenEssentials.new_from_hash(hash['networkTokenData'])
149
+ end
134
150
  if hash.has_key? 'paymentAccountReference'
135
151
  @payment_account_reference = hash['paymentAccountReference']
136
152
  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
@@ -17,6 +17,7 @@ module OnlinePayments
17
17
  # @attr [String] encrypted_customer_input
18
18
  # @attr [OnlinePayments::SDK::Domain::Feedbacks] feedbacks
19
19
  # @attr [OnlinePayments::SDK::Domain::FraudFields] fraud_fields
20
+ # @attr [String] hosted_fields_session_id
20
21
  # @attr [String] hosted_tokenization_id
21
22
  # @attr [OnlinePayments::SDK::Domain::MobilePaymentMethodSpecificInput] mobile_payment_method_specific_input
22
23
  # @attr [OnlinePayments::SDK::Domain::Order] order
@@ -32,6 +33,8 @@ module OnlinePayments
32
33
 
33
34
  attr_accessor :fraud_fields
34
35
 
36
+ attr_accessor :hosted_fields_session_id
37
+
35
38
  attr_accessor :hosted_tokenization_id
36
39
 
37
40
  attr_accessor :mobile_payment_method_specific_input
@@ -49,6 +52,7 @@ module OnlinePayments
49
52
  hash['encryptedCustomerInput'] = @encrypted_customer_input unless @encrypted_customer_input.nil?
50
53
  hash['feedbacks'] = @feedbacks.to_h unless @feedbacks.nil?
51
54
  hash['fraudFields'] = @fraud_fields.to_h unless @fraud_fields.nil?
55
+ hash['hostedFieldsSessionId'] = @hosted_fields_session_id unless @hosted_fields_session_id.nil?
52
56
  hash['hostedTokenizationId'] = @hosted_tokenization_id unless @hosted_tokenization_id.nil?
53
57
  hash['mobilePaymentMethodSpecificInput'] = @mobile_payment_method_specific_input.to_h unless @mobile_payment_method_specific_input.nil?
54
58
  hash['order'] = @order.to_h unless @order.nil?
@@ -74,6 +78,9 @@ module OnlinePayments
74
78
  raise TypeError, "value '%s' is not a Hash" % [hash['fraudFields']] unless hash['fraudFields'].is_a? Hash
75
79
  @fraud_fields = OnlinePayments::SDK::Domain::FraudFields.new_from_hash(hash['fraudFields'])
76
80
  end
81
+ if hash.has_key? 'hostedFieldsSessionId'
82
+ @hosted_fields_session_id = hash['hostedFieldsSessionId']
83
+ end
77
84
  if hash.has_key? 'hostedTokenizationId'
78
85
  @hosted_tokenization_id = hash['hostedTokenizationId']
79
86
  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/credit_card_validation_rules_hosted_tokenization'
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::CreditCardValidationRulesHostedTokenization] validation_rules
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::CreditCardValidationRulesHostedTokenization.new_from_hash(hash['ValidationRules'])
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 CreditCardValidationRulesHostedTokenization < OnlinePayments::SDK::Domain::DataObject
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,18 +4,21 @@
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
10
11
  module Domain
11
12
  # @attr [Integer] allowed_number_of_payment_attempts
12
13
  # @attr [OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout] card_payment_method_specific_input
14
+ # @attr [true/false] is_new_unscheduled_card_on_file_series
13
15
  # @attr [true/false] is_recurring
14
16
  # @attr [String] locale
15
17
  # @attr [OnlinePayments::SDK::Domain::PaymentProductFiltersHostedCheckout] payment_product_filters
16
18
  # @attr [String] return_url
17
19
  # @attr [Integer] session_timeout
18
20
  # @attr [true/false] show_result_page
21
+ # @attr [OnlinePayments::SDK::Domain::SplitPaymentProductFiltersHostedCheckout] split_payment_product_filters
19
22
  # @attr [String] tokens
20
23
  # @attr [String] variant
21
24
  class HostedCheckoutSpecificInput < OnlinePayments::SDK::Domain::DataObject
@@ -24,6 +27,8 @@ module OnlinePayments
24
27
 
25
28
  attr_accessor :card_payment_method_specific_input
26
29
 
30
+ attr_accessor :is_new_unscheduled_card_on_file_series
31
+
27
32
  attr_accessor :is_recurring
28
33
 
29
34
  attr_accessor :locale
@@ -36,6 +41,8 @@ module OnlinePayments
36
41
 
37
42
  attr_accessor :show_result_page
38
43
 
44
+ attr_accessor :split_payment_product_filters
45
+
39
46
  attr_accessor :tokens
40
47
 
41
48
  attr_accessor :variant
@@ -45,12 +52,14 @@ module OnlinePayments
45
52
  hash = super
46
53
  hash['allowedNumberOfPaymentAttempts'] = @allowed_number_of_payment_attempts unless @allowed_number_of_payment_attempts.nil?
47
54
  hash['cardPaymentMethodSpecificInput'] = @card_payment_method_specific_input.to_h unless @card_payment_method_specific_input.nil?
55
+ hash['isNewUnscheduledCardOnFileSeries'] = @is_new_unscheduled_card_on_file_series unless @is_new_unscheduled_card_on_file_series.nil?
48
56
  hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
49
57
  hash['locale'] = @locale unless @locale.nil?
50
58
  hash['paymentProductFilters'] = @payment_product_filters.to_h unless @payment_product_filters.nil?
51
59
  hash['returnUrl'] = @return_url unless @return_url.nil?
52
60
  hash['sessionTimeout'] = @session_timeout unless @session_timeout.nil?
53
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?
54
63
  hash['tokens'] = @tokens unless @tokens.nil?
55
64
  hash['variant'] = @variant unless @variant.nil?
56
65
  hash
@@ -65,6 +74,9 @@ module OnlinePayments
65
74
  raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificInput']] unless hash['cardPaymentMethodSpecificInput'].is_a? Hash
66
75
  @card_payment_method_specific_input = OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout.new_from_hash(hash['cardPaymentMethodSpecificInput'])
67
76
  end
77
+ if hash.has_key? 'isNewUnscheduledCardOnFileSeries'
78
+ @is_new_unscheduled_card_on_file_series = hash['isNewUnscheduledCardOnFileSeries']
79
+ end
68
80
  if hash.has_key? 'isRecurring'
69
81
  @is_recurring = hash['isRecurring']
70
82
  end
@@ -84,6 +96,10 @@ module OnlinePayments
84
96
  if hash.has_key? 'showResultPage'
85
97
  @show_result_page = hash['showResultPage']
86
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
87
103
  if hash.has_key? 'tokens'
88
104
  @tokens = hash['tokens']
89
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
@@ -0,0 +1,65 @@
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] bin
10
+ # @attr [String] country_code
11
+ # @attr [String] network_token
12
+ # @attr [String] network_token_state
13
+ # @attr [true/false] network_token_used
14
+ # @attr [String] token_expiry_date
15
+ class NetworkTokenEssentials < OnlinePayments::SDK::Domain::DataObject
16
+
17
+ attr_accessor :bin
18
+
19
+ attr_accessor :country_code
20
+
21
+ attr_accessor :network_token
22
+
23
+ attr_accessor :network_token_state
24
+
25
+ attr_accessor :network_token_used
26
+
27
+ attr_accessor :token_expiry_date
28
+
29
+ # @return (Hash)
30
+ def to_h
31
+ hash = super
32
+ hash['bin'] = @bin unless @bin.nil?
33
+ hash['countryCode'] = @country_code unless @country_code.nil?
34
+ hash['networkToken'] = @network_token unless @network_token.nil?
35
+ hash['networkTokenState'] = @network_token_state unless @network_token_state.nil?
36
+ hash['networkTokenUsed'] = @network_token_used unless @network_token_used.nil?
37
+ hash['tokenExpiryDate'] = @token_expiry_date unless @token_expiry_date.nil?
38
+ hash
39
+ end
40
+
41
+ def from_hash(hash)
42
+ super
43
+ if hash.has_key? 'bin'
44
+ @bin = hash['bin']
45
+ end
46
+ if hash.has_key? 'countryCode'
47
+ @country_code = hash['countryCode']
48
+ end
49
+ if hash.has_key? 'networkToken'
50
+ @network_token = hash['networkToken']
51
+ end
52
+ if hash.has_key? 'networkTokenState'
53
+ @network_token_state = hash['networkTokenState']
54
+ end
55
+ if hash.has_key? 'networkTokenUsed'
56
+ @network_token_used = hash['networkTokenUsed']
57
+ end
58
+ if hash.has_key? 'tokenExpiryDate'
59
+ @token_expiry_date = hash['tokenExpiryDate']
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end