Class: UnivapayClientSdk::CheckoutCardConfiguration
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UnivapayClientSdk::CheckoutCardConfiguration
- Defined in:
- lib/univapay_client_sdk/models/checkout_card_configuration.rb
Overview
Card payment settings applied to checkout.
Instance Attribute Summary collapse
-
#allow_direct_token_creation ⇒ TrueClass | FalseClass
Whether direct card token creation is allowed without a hosted capture flow.
-
#allow_empty_cvv ⇒ TrueClass | FalseClass
Whether card flows may proceed without a CVV.
-
#allowed_countries_by_ip ⇒ Array[String]
ISO 3166-1 alpha-2 country codes allowed to originate card payments by IP geolocation.
-
#card_limit ⇒ CardLimit
Per-card spending limit.
-
#debit_authorization_enabled ⇒ TrueClass | FalseClass
Whether authorization-only flows are allowed for debit cards.
-
#debit_enabled ⇒ TrueClass | FalseClass
Whether debit cards are allowed.
-
#enabled ⇒ TrueClass | FalseClass
Whether card payments are enabled.
-
#fail_on_new_email ⇒ TrueClass | FalseClass
Whether to reject card charges from previously unseen customer email addresses.
-
#forbidden_card_brands ⇒ Array[String]
Card brands rejected by merchant policy.
-
#foreign_cards_allowed ⇒ TrueClass | FalseClass
Whether cards issued outside the primary operating country are allowed.
-
#only_direct_currency ⇒ TrueClass | FalseClass
Whether card processing is restricted to direct-settlement currencies.
-
#prepaid_authorization_enabled ⇒ TrueClass | FalseClass
Whether authorization-only flows are allowed for prepaid cards.
-
#prepaid_enabled ⇒ TrueClass | FalseClass
Whether prepaid cards are allowed.
-
#three_ds_address_required ⇒ TrueClass | FalseClass
Whether billing address data is required when running 3-D Secure.
-
#three_ds_phone_number_required ⇒ TrueClass | FalseClass
Whether a phone number is required when running 3-D Secure.
-
#three_ds_required ⇒ TrueClass | FalseClass
Whether 3-D Secure is required for eligible card flows.
-
#three_ds_skip_enabled ⇒ TrueClass | FalseClass
Whether privileged callers may request a 3-D Secure skip.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(enabled: SKIP, debit_enabled: SKIP, prepaid_enabled: SKIP, debit_authorization_enabled: SKIP, prepaid_authorization_enabled: SKIP, only_direct_currency: SKIP, forbidden_card_brands: SKIP, allowed_countries_by_ip: SKIP, foreign_cards_allowed: SKIP, fail_on_new_email: SKIP, card_limit: SKIP, allow_empty_cvv: SKIP, allow_direct_token_creation: SKIP, three_ds_required: SKIP, three_ds_address_required: SKIP, three_ds_skip_enabled: SKIP, three_ds_phone_number_required: SKIP, additional_properties: nil) ⇒ CheckoutCardConfiguration
constructor
A new instance of CheckoutCardConfiguration.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(enabled: SKIP, debit_enabled: SKIP, prepaid_enabled: SKIP, debit_authorization_enabled: SKIP, prepaid_authorization_enabled: SKIP, only_direct_currency: SKIP, forbidden_card_brands: SKIP, allowed_countries_by_ip: SKIP, foreign_cards_allowed: SKIP, fail_on_new_email: SKIP, card_limit: SKIP, allow_empty_cvv: SKIP, allow_direct_token_creation: SKIP, three_ds_required: SKIP, three_ds_address_required: SKIP, three_ds_skip_enabled: SKIP, three_ds_phone_number_required: SKIP, additional_properties: nil) ⇒ CheckoutCardConfiguration
Returns a new instance of CheckoutCardConfiguration.
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 146 def initialize(enabled: SKIP, debit_enabled: SKIP, prepaid_enabled: SKIP, debit_authorization_enabled: SKIP, prepaid_authorization_enabled: SKIP, only_direct_currency: SKIP, forbidden_card_brands: SKIP, allowed_countries_by_ip: SKIP, foreign_cards_allowed: SKIP, fail_on_new_email: SKIP, card_limit: SKIP, allow_empty_cvv: SKIP, allow_direct_token_creation: SKIP, three_ds_required: SKIP, three_ds_address_required: SKIP, three_ds_skip_enabled: SKIP, three_ds_phone_number_required: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @enabled = enabled unless enabled == SKIP @debit_enabled = debit_enabled unless debit_enabled == SKIP @prepaid_enabled = prepaid_enabled unless prepaid_enabled == SKIP unless == SKIP @debit_authorization_enabled = end unless == SKIP @prepaid_authorization_enabled = end @only_direct_currency = only_direct_currency unless only_direct_currency == SKIP @forbidden_card_brands = forbidden_card_brands unless forbidden_card_brands == SKIP @allowed_countries_by_ip = allowed_countries_by_ip unless allowed_countries_by_ip == SKIP @foreign_cards_allowed = foreign_cards_allowed unless foreign_cards_allowed == SKIP @fail_on_new_email = fail_on_new_email unless fail_on_new_email == SKIP @card_limit = card_limit unless card_limit == SKIP @allow_empty_cvv = allow_empty_cvv unless allow_empty_cvv == SKIP unless allow_direct_token_creation == SKIP @allow_direct_token_creation = allow_direct_token_creation end @three_ds_required = three_ds_required unless three_ds_required == SKIP unless three_ds_address_required == SKIP @three_ds_address_required = three_ds_address_required end @three_ds_skip_enabled = three_ds_skip_enabled unless three_ds_skip_enabled == SKIP unless three_ds_phone_number_required == SKIP @three_ds_phone_number_required = three_ds_phone_number_required end @additional_properties = additional_properties end |
Instance Attribute Details
#allow_direct_token_creation ⇒ TrueClass | FalseClass
Whether direct card token creation is allowed without a hosted capture flow.
69 70 71 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 69 def allow_direct_token_creation @allow_direct_token_creation end |
#allow_empty_cvv ⇒ TrueClass | FalseClass
Whether card flows may proceed without a CVV. null when not configured.
64 65 66 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 64 def allow_empty_cvv @allow_empty_cvv end |
#allowed_countries_by_ip ⇒ Array[String]
ISO 3166-1 alpha-2 country codes allowed to originate card payments by IP
geolocation. null when unrestricted.
47 48 49 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 47 def allowed_countries_by_ip @allowed_countries_by_ip end |
#card_limit ⇒ CardLimit
Per-card spending limit. null when no limit is configured.
60 61 62 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 60 def card_limit @card_limit end |
#debit_authorization_enabled ⇒ TrueClass | FalseClass
Whether authorization-only flows are allowed for debit cards.
26 27 28 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 26 def @debit_authorization_enabled end |
#debit_enabled ⇒ TrueClass | FalseClass
Whether debit cards are allowed.
18 19 20 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 18 def debit_enabled @debit_enabled end |
#enabled ⇒ TrueClass | FalseClass
Whether card payments are enabled.
14 15 16 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 14 def enabled @enabled end |
#fail_on_new_email ⇒ TrueClass | FalseClass
Whether to reject card charges from previously unseen customer email
addresses. null when not configured.
56 57 58 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 56 def fail_on_new_email @fail_on_new_email end |
#forbidden_card_brands ⇒ Array[String]
Card brands rejected by merchant policy. Common values include visa,
mastercard, american_express, maestro, discover, jcb,
diners_club, private_label, and unionpay; gateway-specific brands
the platform cannot map appear as unmapped_<raw value>. null when no
brand is forbidden.
42 43 44 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 42 def forbidden_card_brands @forbidden_card_brands end |
#foreign_cards_allowed ⇒ TrueClass | FalseClass
Whether cards issued outside the primary operating country are allowed.
51 52 53 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 51 def foreign_cards_allowed @foreign_cards_allowed end |
#only_direct_currency ⇒ TrueClass | FalseClass
Whether card processing is restricted to direct-settlement currencies.
34 35 36 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 34 def only_direct_currency @only_direct_currency end |
#prepaid_authorization_enabled ⇒ TrueClass | FalseClass
Whether authorization-only flows are allowed for prepaid cards.
30 31 32 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 30 def @prepaid_authorization_enabled end |
#prepaid_enabled ⇒ TrueClass | FalseClass
Whether prepaid cards are allowed.
22 23 24 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 22 def prepaid_enabled @prepaid_enabled end |
#three_ds_address_required ⇒ TrueClass | FalseClass
Whether billing address data is required when running 3-D Secure.
77 78 79 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 77 def three_ds_address_required @three_ds_address_required end |
#three_ds_phone_number_required ⇒ TrueClass | FalseClass
Whether a phone number is required when running 3-D Secure.
85 86 87 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 85 def three_ds_phone_number_required @three_ds_phone_number_required end |
#three_ds_required ⇒ TrueClass | FalseClass
Whether 3-D Secure is required for eligible card flows.
73 74 75 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 73 def three_ds_required @three_ds_required end |
#three_ds_skip_enabled ⇒ TrueClass | FalseClass
Whether privileged callers may request a 3-D Secure skip.
81 82 83 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 81 def three_ds_skip_enabled @three_ds_skip_enabled end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 196 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. enabled = hash.key?('enabled') ? hash['enabled'] : SKIP debit_enabled = hash.key?('debit_enabled') ? hash['debit_enabled'] : SKIP prepaid_enabled = hash.key?('prepaid_enabled') ? hash['prepaid_enabled'] : SKIP = hash.key?('debit_authorization_enabled') ? hash['debit_authorization_enabled'] : SKIP = hash.key?('prepaid_authorization_enabled') ? hash['prepaid_authorization_enabled'] : SKIP only_direct_currency = hash.key?('only_direct_currency') ? hash['only_direct_currency'] : SKIP forbidden_card_brands = hash.key?('forbidden_card_brands') ? hash['forbidden_card_brands'] : SKIP allowed_countries_by_ip = hash.key?('allowed_countries_by_ip') ? hash['allowed_countries_by_ip'] : SKIP foreign_cards_allowed = hash.key?('foreign_cards_allowed') ? hash['foreign_cards_allowed'] : SKIP fail_on_new_email = hash.key?('fail_on_new_email') ? hash['fail_on_new_email'] : SKIP card_limit = CardLimit.from_hash(hash['card_limit']) if hash['card_limit'] allow_empty_cvv = hash.key?('allow_empty_cvv') ? hash['allow_empty_cvv'] : SKIP allow_direct_token_creation = hash.key?('allow_direct_token_creation') ? hash['allow_direct_token_creation'] : SKIP three_ds_required = hash.key?('three_ds_required') ? hash['three_ds_required'] : SKIP three_ds_address_required = hash.key?('three_ds_address_required') ? hash['three_ds_address_required'] : SKIP three_ds_skip_enabled = hash.key?('three_ds_skip_enabled') ? hash['three_ds_skip_enabled'] : SKIP three_ds_phone_number_required = hash.key?('three_ds_phone_number_required') ? hash['three_ds_phone_number_required'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. CheckoutCardConfiguration.new(enabled: enabled, debit_enabled: debit_enabled, prepaid_enabled: prepaid_enabled, debit_authorization_enabled: , prepaid_authorization_enabled: , only_direct_currency: only_direct_currency, forbidden_card_brands: forbidden_card_brands, allowed_countries_by_ip: allowed_countries_by_ip, foreign_cards_allowed: foreign_cards_allowed, fail_on_new_email: fail_on_new_email, card_limit: card_limit, allow_empty_cvv: allow_empty_cvv, allow_direct_token_creation: allow_direct_token_creation, three_ds_required: three_ds_required, three_ds_address_required: three_ds_address_required, three_ds_skip_enabled: three_ds_skip_enabled, three_ds_phone_number_required: three_ds_phone_number_required, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 88 def self.names @_hash = {} if @_hash.nil? @_hash['enabled'] = 'enabled' @_hash['debit_enabled'] = 'debit_enabled' @_hash['prepaid_enabled'] = 'prepaid_enabled' @_hash['debit_authorization_enabled'] = 'debit_authorization_enabled' @_hash['prepaid_authorization_enabled'] = 'prepaid_authorization_enabled' @_hash['only_direct_currency'] = 'only_direct_currency' @_hash['forbidden_card_brands'] = 'forbidden_card_brands' @_hash['allowed_countries_by_ip'] = 'allowed_countries_by_ip' @_hash['foreign_cards_allowed'] = 'foreign_cards_allowed' @_hash['fail_on_new_email'] = 'fail_on_new_email' @_hash['card_limit'] = 'card_limit' @_hash['allow_empty_cvv'] = 'allow_empty_cvv' @_hash['allow_direct_token_creation'] = 'allow_direct_token_creation' @_hash['three_ds_required'] = 'three_ds_required' @_hash['three_ds_address_required'] = 'three_ds_address_required' @_hash['three_ds_skip_enabled'] = 'three_ds_skip_enabled' @_hash['three_ds_phone_number_required'] = 'three_ds_phone_number_required' @_hash end |
.nullables ⇒ Object
An array for nullable fields
136 137 138 139 140 141 142 143 144 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 136 def self.nullables %w[ forbidden_card_brands allowed_countries_by_ip fail_on_new_email card_limit allow_empty_cvv ] end |
.optionals ⇒ Object
An array for optional fields
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 113 def self.optionals %w[ enabled debit_enabled prepaid_enabled debit_authorization_enabled prepaid_authorization_enabled only_direct_currency forbidden_card_brands allowed_countries_by_ip foreign_cards_allowed fail_on_new_email card_limit allow_empty_cvv allow_direct_token_creation three_ds_required three_ds_address_required three_ds_skip_enabled three_ds_phone_number_required ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 277 def inspect class_name = self.class.name.split('::').last "<#{class_name} enabled: #{@enabled.inspect}, debit_enabled: #{@debit_enabled.inspect},"\ " prepaid_enabled: #{@prepaid_enabled.inspect}, debit_authorization_enabled:"\ " #{@debit_authorization_enabled.inspect}, prepaid_authorization_enabled:"\ " #{@prepaid_authorization_enabled.inspect}, only_direct_currency:"\ " #{@only_direct_currency.inspect}, forbidden_card_brands:"\ " #{@forbidden_card_brands.inspect}, allowed_countries_by_ip:"\ " #{@allowed_countries_by_ip.inspect}, foreign_cards_allowed:"\ " #{@foreign_cards_allowed.inspect}, fail_on_new_email: #{@fail_on_new_email.inspect},"\ " card_limit: #{@card_limit.inspect}, allow_empty_cvv: #{@allow_empty_cvv.inspect},"\ " allow_direct_token_creation: #{@allow_direct_token_creation.inspect}, three_ds_required:"\ " #{@three_ds_required.inspect}, three_ds_address_required:"\ " #{@three_ds_address_required.inspect}, three_ds_skip_enabled:"\ " #{@three_ds_skip_enabled.inspect}, three_ds_phone_number_required:"\ " #{@three_ds_phone_number_required.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/univapay_client_sdk/models/checkout_card_configuration.rb', line 261 def to_s class_name = self.class.name.split('::').last "<#{class_name} enabled: #{@enabled}, debit_enabled: #{@debit_enabled}, prepaid_enabled:"\ " #{@prepaid_enabled}, debit_authorization_enabled: #{@debit_authorization_enabled},"\ " prepaid_authorization_enabled: #{@prepaid_authorization_enabled}, only_direct_currency:"\ " #{@only_direct_currency}, forbidden_card_brands: #{@forbidden_card_brands},"\ " allowed_countries_by_ip: #{@allowed_countries_by_ip}, foreign_cards_allowed:"\ " #{@foreign_cards_allowed}, fail_on_new_email: #{@fail_on_new_email}, card_limit:"\ " #{@card_limit}, allow_empty_cvv: #{@allow_empty_cvv}, allow_direct_token_creation:"\ " #{@allow_direct_token_creation}, three_ds_required: #{@three_ds_required},"\ " three_ds_address_required: #{@three_ds_address_required}, three_ds_skip_enabled:"\ " #{@three_ds_skip_enabled}, three_ds_phone_number_required:"\ " #{@three_ds_phone_number_required}, additional_properties: #{@additional_properties}>" end |