Class: VisaAcceptanceMergedSpec::InfoCodes
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::InfoCodes
- Defined in:
- lib/visa_acceptance_merged_spec/models/info_codes.rb
Overview
InfoCodes Model.
Instance Attribute Summary collapse
-
#address ⇒ Array[String]
Indicates a mismatch between the customer’s billing and shipping addresses.
-
#customer_list ⇒ Array[String]
Indicates that customer information is associated with transactions that are either on the negative or the positive list.
-
#device_behavior ⇒ Array[String]
Indicates the device behavior information code(s) returned from device fingerprinting.
-
#global_velocity ⇒ Array[String]
Indicates that the customer has a high purchase frequency.
-
#identity_change ⇒ Array[String]
Indicates excessive identity changes.
-
#internet ⇒ Array[String]
Indicates a problem with the customer’s email address, IP address, or billing address.
-
#phone ⇒ Array[String]
Indicates a problem with the customer’s phone number.
-
#suspicious ⇒ Array[String]
Indicates that the customer provided potentially suspicious information.
-
#velocity ⇒ Array[String]
List of information codes triggered by the order.
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(velocity: SKIP, address: SKIP, customer_list: SKIP, device_behavior: SKIP, identity_change: SKIP, internet: SKIP, phone: SKIP, suspicious: SKIP, global_velocity: SKIP, additional_properties: nil) ⇒ InfoCodes
constructor
A new instance of InfoCodes.
-
#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(velocity: SKIP, address: SKIP, customer_list: SKIP, device_behavior: SKIP, identity_change: SKIP, internet: SKIP, phone: SKIP, suspicious: SKIP, global_velocity: SKIP, additional_properties: nil) ⇒ InfoCodes
Returns a new instance of InfoCodes.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 93 def initialize(velocity: SKIP, address: SKIP, customer_list: SKIP, device_behavior: SKIP, identity_change: SKIP, internet: SKIP, phone: SKIP, suspicious: SKIP, global_velocity: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @velocity = velocity unless velocity == SKIP @address = address unless address == SKIP @customer_list = customer_list unless customer_list == SKIP @device_behavior = device_behavior unless device_behavior == SKIP @identity_change = identity_change unless identity_change == SKIP @internet = internet unless internet == SKIP @phone = phone unless phone == SKIP @suspicious = suspicious unless suspicious == SKIP @global_velocity = global_velocity unless global_velocity == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#address ⇒ Array[String]
Indicates a mismatch between the customer’s billing and shipping addresses.
22 23 24 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 22 def address @address end |
#customer_list ⇒ Array[String]
Indicates that customer information is associated with transactions that are either on the negative or the positive list.
28 29 30 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 28 def customer_list @customer_list end |
#device_behavior ⇒ Array[String]
Indicates the device behavior information code(s) returned from device fingerprinting.
33 34 35 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 33 def device_behavior @device_behavior end |
#global_velocity ⇒ Array[String]
Indicates that the customer has a high purchase frequency.
56 57 58 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 56 def global_velocity @global_velocity end |
#identity_change ⇒ Array[String]
Indicates excessive identity changes. The threshold is variable depending on the identity elements being compared.
39 40 41 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 39 def identity_change @identity_change end |
#internet ⇒ Array[String]
Indicates a problem with the customer’s email address, IP address, or billing address.
44 45 46 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 44 def internet @internet end |
#phone ⇒ Array[String]
Indicates a problem with the customer’s phone number.
48 49 50 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 48 def phone @phone end |
#suspicious ⇒ Array[String]
Indicates that the customer provided potentially suspicious information.
52 53 54 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 52 def suspicious @suspicious end |
#velocity ⇒ Array[String]
List of information codes triggered by the order. These information codes were generated when you created the order and product velocity rules and are returned so that you can associate them with the rules.
17 18 19 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 17 def velocity @velocity end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 113 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. velocity = hash.key?('velocity') ? hash['velocity'] : SKIP address = hash.key?('address') ? hash['address'] : SKIP customer_list = hash.key?('customerList') ? hash['customerList'] : SKIP device_behavior = hash.key?('deviceBehavior') ? hash['deviceBehavior'] : SKIP identity_change = hash.key?('identityChange') ? hash['identityChange'] : SKIP internet = hash.key?('internet') ? hash['internet'] : SKIP phone = hash.key?('phone') ? hash['phone'] : SKIP suspicious = hash.key?('suspicious') ? hash['suspicious'] : SKIP global_velocity = hash.key?('globalVelocity') ? hash['globalVelocity'] : 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. InfoCodes.new(velocity: velocity, address: address, customer_list: customer_list, device_behavior: device_behavior, identity_change: identity_change, internet: internet, phone: phone, suspicious: suspicious, global_velocity: global_velocity, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 59 def self.names @_hash = {} if @_hash.nil? @_hash['velocity'] = 'velocity' @_hash['address'] = 'address' @_hash['customer_list'] = 'customerList' @_hash['device_behavior'] = 'deviceBehavior' @_hash['identity_change'] = 'identityChange' @_hash['internet'] = 'internet' @_hash['phone'] = 'phone' @_hash['suspicious'] = 'suspicious' @_hash['global_velocity'] = 'globalVelocity' @_hash end |
.nullables ⇒ Object
An array for nullable fields
89 90 91 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 89 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 74 def self.optionals %w[ velocity address customer_list device_behavior identity_change internet phone suspicious global_velocity ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
160 161 162 163 164 165 166 167 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 160 def inspect class_name = self.class.name.split('::').last "<#{class_name} velocity: #{@velocity.inspect}, address: #{@address.inspect},"\ " customer_list: #{@customer_list.inspect}, device_behavior: #{@device_behavior.inspect},"\ " identity_change: #{@identity_change.inspect}, internet: #{@internet.inspect}, phone:"\ " #{@phone.inspect}, suspicious: #{@suspicious.inspect}, global_velocity:"\ " #{@global_velocity.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
151 152 153 154 155 156 157 |
# File 'lib/visa_acceptance_merged_spec/models/info_codes.rb', line 151 def to_s class_name = self.class.name.split('::').last "<#{class_name} velocity: #{@velocity}, address: #{@address}, customer_list:"\ " #{@customer_list}, device_behavior: #{@device_behavior}, identity_change:"\ " #{@identity_change}, internet: #{@internet}, phone: #{@phone}, suspicious: #{@suspicious},"\ " global_velocity: #{@global_velocity}, additional_properties: #{@additional_properties}>" end |