Class: ThePlaidApi::IdentityDocumentUploadRiskSignal
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::IdentityDocumentUploadRiskSignal
- Defined in:
- lib/the_plaid_api/models/identity_document_upload_risk_signal.rb
Overview
Risk signals tied to the document
Instance Attribute Summary collapse
-
#has_fraud_risk ⇒ TrueClass | FalseClass
Indicates whether fraud risk was detected on the field.
-
#page_number ⇒ Integer
The relevant page associated with the risk signal.
-
#signal_description ⇒ String
A human-readable explanation providing more detail about the specific risk signal.
-
#type ⇒ String
The type of risk found.
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(type: SKIP, has_fraud_risk: SKIP, signal_description: SKIP, page_number: SKIP, additional_properties: nil) ⇒ IdentityDocumentUploadRiskSignal
constructor
A new instance of IdentityDocumentUploadRiskSignal.
-
#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(type: SKIP, has_fraud_risk: SKIP, signal_description: SKIP, page_number: SKIP, additional_properties: nil) ⇒ IdentityDocumentUploadRiskSignal
Returns a new instance of IdentityDocumentUploadRiskSignal.
60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_signal.rb', line 60 def initialize(type: SKIP, has_fraud_risk: SKIP, signal_description: SKIP, page_number: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @type = type unless type == SKIP @has_fraud_risk = has_fraud_risk unless has_fraud_risk == SKIP @signal_description = signal_description unless signal_description == SKIP @page_number = page_number unless page_number == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#has_fraud_risk ⇒ TrueClass | FalseClass
Indicates whether fraud risk was detected on the field.
18 19 20 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_signal.rb', line 18 def has_fraud_risk @has_fraud_risk end |
#page_number ⇒ Integer
The relevant page associated with the risk signal. If the risk signal is not associated with a specific page, the value will be 0.
28 29 30 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_signal.rb', line 28 def page_number @page_number end |
#signal_description ⇒ String
A human-readable explanation providing more detail about the specific risk signal.
23 24 25 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_signal.rb', line 23 def signal_description @signal_description end |
#type ⇒ String
The type of risk found.
14 15 16 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_signal.rb', line 14 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_signal.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. type = hash.key?('type') ? hash['type'] : SKIP has_fraud_risk = hash.key?('has_fraud_risk') ? hash['has_fraud_risk'] : SKIP signal_description = hash.key?('signal_description') ? hash['signal_description'] : SKIP page_number = hash.key?('page_number') ? hash['page_number'] : 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. IdentityDocumentUploadRiskSignal.new(type: type, has_fraud_risk: has_fraud_risk, signal_description: signal_description, page_number: page_number, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
31 32 33 34 35 36 37 38 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_signal.rb', line 31 def self.names @_hash = {} if @_hash.nil? @_hash['type'] = 'type' @_hash['has_fraud_risk'] = 'has_fraud_risk' @_hash['signal_description'] = 'signal_description' @_hash['page_number'] = 'page_number' @_hash end |
.nullables ⇒ Object
An array for nullable fields
51 52 53 54 55 56 57 58 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_signal.rb', line 51 def self.nullables %w[ type has_fraud_risk signal_description page_number ] end |
.optionals ⇒ Object
An array for optional fields
41 42 43 44 45 46 47 48 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_signal.rb', line 41 def self.optionals %w[ type has_fraud_risk signal_description page_number ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
108 109 110 111 112 113 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_signal.rb', line 108 def inspect class_name = self.class.name.split('::').last "<#{class_name} type: #{@type.inspect}, has_fraud_risk: #{@has_fraud_risk.inspect},"\ " signal_description: #{@signal_description.inspect}, page_number: #{@page_number.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
100 101 102 103 104 105 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_signal.rb', line 100 def to_s class_name = self.class.name.split('::').last "<#{class_name} type: #{@type}, has_fraud_risk: #{@has_fraud_risk}, signal_description:"\ " #{@signal_description}, page_number: #{@page_number}, additional_properties:"\ " #{@additional_properties}>" end |