Class: ThePlaidApi::RiskCheckDetails
- Defined in:
- lib/the_plaid_api/models/risk_check_details.rb
Overview
Additional information for the ‘risk_check` step.
Instance Attribute Summary collapse
-
#behavior ⇒ RiskCheckBehavior
Result summary object specifying values for ‘behavior` attributes of risk check, when available.
-
#devices ⇒ Array[RiskCheckDevice]
Array of result summary objects specifying values for ‘device` attributes of risk check.
-
#email ⇒ RiskCheckEmail
Result summary object specifying values for ‘email` attributes of risk check.
-
#facial_duplicates ⇒ Array[RiskCheckFacialDuplicate]
The attributes related to the facial duplicates captured in risk check.
-
#identity_abuse_signals ⇒ RiskCheckIdentityAbuseSignals
Result summary object capturing abuse signals related to ‘identity abuse`, e.g.
-
#network ⇒ RiskCheckNetwork
Result summary object specifying values for network attributes of risk check.
-
#phone ⇒ RiskCheckPhone
Result summary object specifying values for ‘phone` attributes of risk check.
-
#status ⇒ IdentityVerificationStepStatus
The status of a step in the Identity Verification process.
-
#trust_index_score ⇒ Integer
The trust index score for the ‘risk_check` step.
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(status:, behavior:, email:, phone:, devices:, identity_abuse_signals:, facial_duplicates:, trust_index_score:, network: SKIP, additional_properties: nil) ⇒ RiskCheckDetails
constructor
A new instance of RiskCheckDetails.
-
#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(status:, behavior:, email:, phone:, devices:, identity_abuse_signals:, facial_duplicates:, trust_index_score:, network: SKIP, additional_properties: nil) ⇒ RiskCheckDetails
Returns a new instance of RiskCheckDetails.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 90 def initialize(status:, behavior:, email:, phone:, devices:, identity_abuse_signals:, facial_duplicates:, trust_index_score:, network: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @status = status @behavior = behavior @email = email @phone = phone @devices = devices @identity_abuse_signals = identity_abuse_signals @network = network unless network == SKIP @facial_duplicates = facial_duplicates @trust_index_score = trust_index_score @additional_properties = additional_properties end |
Instance Attribute Details
#behavior ⇒ RiskCheckBehavior
Result summary object specifying values for ‘behavior` attributes of risk check, when available.
19 20 21 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 19 def behavior @behavior end |
#devices ⇒ Array[RiskCheckDevice]
Array of result summary objects specifying values for ‘device` attributes of risk check.
34 35 36 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 34 def devices @devices end |
#email ⇒ RiskCheckEmail
Result summary object specifying values for ‘email` attributes of risk check.
24 25 26 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 24 def email @email end |
#facial_duplicates ⇒ Array[RiskCheckFacialDuplicate]
The attributes related to the facial duplicates captured in risk check.
50 51 52 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 50 def facial_duplicates @facial_duplicates end |
#identity_abuse_signals ⇒ RiskCheckIdentityAbuseSignals
Result summary object capturing abuse signals related to ‘identity abuse`, e.g. stolen and synthetic identity fraud. These attributes are only available for US identities and some signals may not be available depending on what information was collected.
41 42 43 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 41 def identity_abuse_signals @identity_abuse_signals end |
#network ⇒ RiskCheckNetwork
Result summary object specifying values for network attributes of risk check.
46 47 48 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 46 def network @network end |
#phone ⇒ RiskCheckPhone
Result summary object specifying values for ‘phone` attributes of risk check.
29 30 31 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 29 def phone @phone end |
#status ⇒ IdentityVerificationStepStatus
The status of a step in the Identity Verification process.
14 15 16 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 14 def status @status end |
#trust_index_score ⇒ Integer
The trust index score for the ‘risk_check` step.
54 55 56 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 54 def trust_index_score @trust_index_score end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 110 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. status = hash.key?('status') ? hash['status'] : nil behavior = RiskCheckBehavior.from_hash(hash['behavior']) if hash['behavior'] email = RiskCheckEmail.from_hash(hash['email']) if hash['email'] phone = RiskCheckPhone.from_hash(hash['phone']) if hash['phone'] # Parameter is an array, so we need to iterate through it devices = nil unless hash['devices'].nil? devices = [] hash['devices'].each do |structure| devices << (RiskCheckDevice.from_hash(structure) if structure) end end devices = nil unless hash.key?('devices') if hash['identity_abuse_signals'] identity_abuse_signals = RiskCheckIdentityAbuseSignals.from_hash(hash['identity_abuse_signals']) end # Parameter is an array, so we need to iterate through it facial_duplicates = nil unless hash['facial_duplicates'].nil? facial_duplicates = [] hash['facial_duplicates'].each do |structure| facial_duplicates << (RiskCheckFacialDuplicate.from_hash(structure) if structure) end end facial_duplicates = nil unless hash.key?('facial_duplicates') trust_index_score = hash.key?('trust_index_score') ? hash['trust_index_score'] : nil network = RiskCheckNetwork.from_hash(hash['network']) if hash['network'] # 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. RiskCheckDetails.new(status: status, behavior: behavior, email: email, phone: phone, devices: devices, identity_abuse_signals: identity_abuse_signals, facial_duplicates: facial_duplicates, trust_index_score: trust_index_score, network: network, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 57 def self.names @_hash = {} if @_hash.nil? @_hash['status'] = 'status' @_hash['behavior'] = 'behavior' @_hash['email'] = 'email' @_hash['phone'] = 'phone' @_hash['devices'] = 'devices' @_hash['identity_abuse_signals'] = 'identity_abuse_signals' @_hash['network'] = 'network' @_hash['facial_duplicates'] = 'facial_duplicates' @_hash['trust_index_score'] = 'trust_index_score' @_hash end |
.nullables ⇒ Object
An array for nullable fields
79 80 81 82 83 84 85 86 87 88 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 79 def self.nullables %w[ behavior email phone identity_abuse_signals network trust_index_score ] end |
.optionals ⇒ Object
An array for optional fields
72 73 74 75 76 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 72 def self.optionals %w[ network ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
175 176 177 178 179 180 181 182 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 175 def inspect class_name = self.class.name.split('::').last "<#{class_name} status: #{@status.inspect}, behavior: #{@behavior.inspect}, email:"\ " #{@email.inspect}, phone: #{@phone.inspect}, devices: #{@devices.inspect},"\ " identity_abuse_signals: #{@identity_abuse_signals.inspect}, network: #{@network.inspect},"\ " facial_duplicates: #{@facial_duplicates.inspect}, trust_index_score:"\ " #{@trust_index_score.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
166 167 168 169 170 171 172 |
# File 'lib/the_plaid_api/models/risk_check_details.rb', line 166 def to_s class_name = self.class.name.split('::').last "<#{class_name} status: #{@status}, behavior: #{@behavior}, email: #{@email}, phone:"\ " #{@phone}, devices: #{@devices}, identity_abuse_signals: #{@identity_abuse_signals},"\ " network: #{@network}, facial_duplicates: #{@facial_duplicates}, trust_index_score:"\ " #{@trust_index_score}, additional_properties: #{@additional_properties}>" end |