Class: ThePlaidApi::IdentityDocumentUploadRiskSummary
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::IdentityDocumentUploadRiskSummary
- Defined in:
- lib/the_plaid_api/models/identity_document_upload_risk_summary.rb
Overview
Risk summary of an uploaded document.
Instance Attribute Summary collapse
-
#risk_score ⇒ Integer
A number between 0 and 100, inclusive, where a score closer to 0 indicates a document is likely to be trustworthy and a score closer to 100 indicates a document is likely to be fraudulent.
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(risk_score: SKIP, additional_properties: nil) ⇒ IdentityDocumentUploadRiskSummary
constructor
A new instance of IdentityDocumentUploadRiskSummary.
-
#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(risk_score: SKIP, additional_properties: nil) ⇒ IdentityDocumentUploadRiskSummary
Returns a new instance of IdentityDocumentUploadRiskSummary.
39 40 41 42 43 44 45 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_summary.rb', line 39 def initialize(risk_score: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @risk_score = risk_score unless risk_score == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#risk_score ⇒ Integer
A number between 0 and 100, inclusive, where a score closer to 0 indicates a document is likely to be trustworthy and a score closer to 100 indicates a document is likely to be fraudulent.
16 17 18 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_summary.rb', line 16 def risk_score @risk_score end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_summary.rb', line 48 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. risk_score = hash.key?('risk_score') ? hash['risk_score'] : 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. IdentityDocumentUploadRiskSummary.new(risk_score: risk_score, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
19 20 21 22 23 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_summary.rb', line 19 def self.names @_hash = {} if @_hash.nil? @_hash['risk_score'] = 'risk_score' @_hash end |
.nullables ⇒ Object
An array for nullable fields
33 34 35 36 37 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_summary.rb', line 33 def self.nullables %w[ risk_score ] end |
.optionals ⇒ Object
An array for optional fields
26 27 28 29 30 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_summary.rb', line 26 def self.optionals %w[ risk_score ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
74 75 76 77 78 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_summary.rb', line 74 def inspect class_name = self.class.name.split('::').last "<#{class_name} risk_score: #{@risk_score.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
67 68 69 70 71 |
# File 'lib/the_plaid_api/models/identity_document_upload_risk_summary.rb', line 67 def to_s class_name = self.class.name.split('::').last "<#{class_name} risk_score: #{@risk_score}, additional_properties:"\ " #{@additional_properties}>" end |