Class: OpenapiClient::RedirectAttributes
- Inherits:
-
Object
- Object
- OpenapiClient::RedirectAttributes
- Defined in:
- lib/openapi_client/models/redirect_attributes.rb
Overview
Attributes for controlling transactions with additional parameters like dccFlow, ‘3ds’ flows.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#authenticate_transaction ⇒ Object
If 3D secure should be applied.
-
#browser_java_script_enabled ⇒ Object
Browser Java Script Enabled flag.
-
#challenge_indicator ⇒ Object
Indicates whether or not a challenge should be performed.
-
#full_bypass ⇒ Object
Full by pass flag.
-
#language ⇒ Object
Language used by client.
-
#mobile_mode ⇒ Object
Mobile mode flag.
-
#override3ds_country_exclusion ⇒ Object
Override 3ds Country Exclusion flag.
-
#payment_mode ⇒ Object
Payment Mode.
-
#skip_tra ⇒ Object
skip TRA exemption for the transaction.
-
#three_ds_emv_co_message_category ⇒ Object
EmvCo Messag Category.
-
#three_ds_transaction_type ⇒ Object
Secure 3D Transaction Type.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes, attribute_map = self.class.attribute_map, openapi_types = self.class.openapi_types) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ RedirectAttributes
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash(attribute_map = self.class.attribute_map, openapi_nullable = Set.new([])) ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ RedirectAttributes
Initializes the object
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 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 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 109 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RedirectAttributes` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RedirectAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'challenge_indicator') self.challenge_indicator = attributes[:'challenge_indicator'] else self.challenge_indicator = '01' end if attributes.key?(:'authenticate_transaction') self.authenticate_transaction = attributes[:'authenticate_transaction'] end if attributes.key?(:'three_ds_emv_co_message_category') self. = attributes[:'three_ds_emv_co_message_category'] end if attributes.key?(:'browser_java_script_enabled') self.browser_java_script_enabled = attributes[:'browser_java_script_enabled'] else self.browser_java_script_enabled = false end if attributes.key?(:'override3ds_country_exclusion') self.override3ds_country_exclusion = attributes[:'override3ds_country_exclusion'] else self.override3ds_country_exclusion = false end if attributes.key?(:'three_ds_transaction_type') self.three_ds_transaction_type = attributes[:'three_ds_transaction_type'] end if attributes.key?(:'skip_tra') self.skip_tra = attributes[:'skip_tra'] else self.skip_tra = false end if attributes.key?(:'full_bypass') self.full_bypass = attributes[:'full_bypass'] else self.full_bypass = false end if attributes.key?(:'mobile_mode') self.mobile_mode = attributes[:'mobile_mode'] else self.mobile_mode = false end if attributes.key?(:'payment_mode') self.payment_mode = attributes[:'payment_mode'] end if attributes.key?(:'language') self.language = attributes[:'language'] end end |
Instance Attribute Details
#authenticate_transaction ⇒ Object
If 3D secure should be applied.
22 23 24 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 22 def authenticate_transaction @authenticate_transaction end |
#browser_java_script_enabled ⇒ Object
Browser Java Script Enabled flag
28 29 30 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 28 def browser_java_script_enabled @browser_java_script_enabled end |
#challenge_indicator ⇒ Object
Indicates whether or not a challenge should be performed. 01 = No preference (You have no preference whether a challenge should be performed. This is the default value) 02 = No challenge requested (You prefer that no challenge should be performed) 03 = Challenge requested: 3DS Requestor Preference (You prefer that a challenge should be performed) 04 = Challenge requested: Mandate (There are local or regional mandates that mean that a challenge must be performed)
19 20 21 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 19 def challenge_indicator @challenge_indicator end |
#full_bypass ⇒ Object
Full by pass flag
40 41 42 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 40 def full_bypass @full_bypass end |
#language ⇒ Object
Language used by client.
49 50 51 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 49 def language @language end |
#mobile_mode ⇒ Object
Mobile mode flag
43 44 45 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 43 def mobile_mode @mobile_mode end |
#override3ds_country_exclusion ⇒ Object
Override 3ds Country Exclusion flag
31 32 33 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 31 def override3ds_country_exclusion @override3ds_country_exclusion end |
#payment_mode ⇒ Object
Payment Mode
46 47 48 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 46 def payment_mode @payment_mode end |
#skip_tra ⇒ Object
skip TRA exemption for the transaction
37 38 39 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 37 def skip_tra @skip_tra end |
#three_ds_emv_co_message_category ⇒ Object
EmvCo Messag Category
25 26 27 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 25 def @three_ds_emv_co_message_category end |
#three_ds_transaction_type ⇒ Object
Secure 3D Transaction Type
34 35 36 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 34 def three_ds_transaction_type @three_ds_transaction_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 74 def self.attribute_map { :'challenge_indicator' => :'challengeIndicator', :'authenticate_transaction' => :'authenticateTransaction', :'three_ds_emv_co_message_category' => :'threeDSEmvCoMessageCategory', :'browser_java_script_enabled' => :'browserJavaScriptEnabled', :'override3ds_country_exclusion' => :'override3dsCountryExclusion', :'three_ds_transaction_type' => :'threeDSTransactionType', :'skip_tra' => :'skipTRA', :'full_bypass' => :'fullBypass', :'mobile_mode' => :'mobileMode', :'payment_mode' => :'paymentMode', :'language' => :'language' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
290 291 292 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 290 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_types ⇒ Object
Attribute type mapping.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 91 def self.openapi_types { :'challenge_indicator' => :'String', :'authenticate_transaction' => :'Boolean', :'three_ds_emv_co_message_category' => :'String', :'browser_java_script_enabled' => :'Boolean', :'override3ds_country_exclusion' => :'Boolean', :'three_ds_transaction_type' => :'String', :'skip_tra' => :'Boolean', :'full_bypass' => :'Boolean', :'mobile_mode' => :'Boolean', :'payment_mode' => :'String', :'language' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 259 def ==(o) return true if self.equal?(o) self.class == o.class && challenge_indicator == o.challenge_indicator && authenticate_transaction == o.authenticate_transaction && == o. && browser_java_script_enabled == o.browser_java_script_enabled && override3ds_country_exclusion == o.override3ds_country_exclusion && three_ds_transaction_type == o.three_ds_transaction_type && skip_tra == o.skip_tra && full_bypass == o.full_bypass && mobile_mode == o.mobile_mode && payment_mode == o.payment_mode && language == o.language end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 318 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model klass = OpenapiClient.const_get(type) if klass.respond_to?(:openapi_discriminator_name) klass = OpenapiClient.const_get(value[klass.attribute_map[klass.openapi_discriminator_name]]) end klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
392 393 394 395 396 397 398 399 400 401 402 403 404 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 392 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes, attribute_map = self.class.attribute_map, openapi_types = self.class.openapi_types) ⇒ Object
Builds the object from hash
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 297 def build_from_hash(attributes, attribute_map = self.class.attribute_map, openapi_types = self.class.openapi_types) return nil unless attributes.is_a?(Hash) openapi_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
277 278 279 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 277 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
283 284 285 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 283 def hash [challenge_indicator, authenticate_transaction, , browser_java_script_enabled, override3ds_country_exclusion, three_ds_transaction_type, skip_tra, full_bypass, mobile_mode, payment_mode, language].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
181 182 183 184 185 186 187 188 189 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 181 def list_invalid_properties invalid_properties = Array.new pattern = Regexp.new(/^(?!\s*$).+/) if !@language.nil? && @language !~ pattern invalid_properties.push("invalid value for \"language\", must conform to the pattern #{pattern}.") end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
368 369 370 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 368 def to_body to_hash end |
#to_hash(attribute_map = self.class.attribute_map, openapi_nullable = Set.new([])) ⇒ Hash
Returns the object in the form of hash
374 375 376 377 378 379 380 381 382 383 384 385 386 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 374 def to_hash(attribute_map = self.class.attribute_map, openapi_nullable = Set.new([])) hash = {} attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
362 363 364 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 362 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/openapi_client/models/redirect_attributes.rb', line 193 def valid? challenge_indicator_validator = EnumAttributeValidator.new('String', ["01", "02", "03", "04"]) return false unless challenge_indicator_validator.valid?(@challenge_indicator) = EnumAttributeValidator.new('String', ["01", "02", "80"]) return false unless .valid?(@three_ds_emv_co_message_category) three_ds_transaction_type_validator = EnumAttributeValidator.new('String', ["01", "03", "10", "11", "28"]) return false unless three_ds_transaction_type_validator.valid?(@three_ds_transaction_type) payment_mode_validator = EnumAttributeValidator.new('String', ["FULLPAY", "PAYONLY", "PAYPLUS"]) return false unless payment_mode_validator.valid?(@payment_mode) return false if !@language.nil? && @language !~ Regexp.new(/^(?!\s*$).+/) true end |