Class: ThePlaidApi::RiskSignalDocumentReference
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::RiskSignalDocumentReference
- Defined in:
- lib/the_plaid_api/models/risk_signal_document_reference.rb
Overview
Object containing metadata for the document
Instance Attribute Summary collapse
-
#document_id ⇒ String
An identifier of the document referenced by the document metadata.
-
#document_name ⇒ String
The name of the document.
-
#document_type ⇒ RiskSignalDocumentType
Type of a document for risk signal analysis.
-
#file_type ⇒ RiskSignalFileType
The file type for risk signal analysis.
-
#status ⇒ RiskSignalDocumentStatus
Status of a document for risk signal analysis.
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(document_id: SKIP, document_name: SKIP, status: SKIP, document_type: SKIP, file_type: SKIP, additional_properties: nil) ⇒ RiskSignalDocumentReference
constructor
A new instance of RiskSignalDocumentReference.
-
#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(document_id: SKIP, document_name: SKIP, status: SKIP, document_type: SKIP, file_type: SKIP, additional_properties: nil) ⇒ RiskSignalDocumentReference
Returns a new instance of RiskSignalDocumentReference.
63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/the_plaid_api/models/risk_signal_document_reference.rb', line 63 def initialize(document_id: SKIP, document_name: SKIP, status: SKIP, document_type: SKIP, file_type: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @document_id = document_id unless document_id == SKIP @document_name = document_name unless document_name == SKIP @status = status unless status == SKIP @document_type = document_type unless document_type == SKIP @file_type = file_type unless file_type == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#document_id ⇒ String
An identifier of the document referenced by the document metadata.
14 15 16 |
# File 'lib/the_plaid_api/models/risk_signal_document_reference.rb', line 14 def document_id @document_id end |
#document_name ⇒ String
The name of the document
18 19 20 |
# File 'lib/the_plaid_api/models/risk_signal_document_reference.rb', line 18 def document_name @document_name end |
#document_type ⇒ RiskSignalDocumentType
Type of a document for risk signal analysis
26 27 28 |
# File 'lib/the_plaid_api/models/risk_signal_document_reference.rb', line 26 def document_type @document_type end |
#file_type ⇒ RiskSignalFileType
The file type for risk signal analysis
30 31 32 |
# File 'lib/the_plaid_api/models/risk_signal_document_reference.rb', line 30 def file_type @file_type end |
#status ⇒ RiskSignalDocumentStatus
Status of a document for risk signal analysis
22 23 24 |
# File 'lib/the_plaid_api/models/risk_signal_document_reference.rb', line 22 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/the_plaid_api/models/risk_signal_document_reference.rb', line 78 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. document_id = hash.key?('document_id') ? hash['document_id'] : SKIP document_name = hash.key?('document_name') ? hash['document_name'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP document_type = hash.key?('document_type') ? hash['document_type'] : SKIP file_type = hash.key?('file_type') ? hash['file_type'] : 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. RiskSignalDocumentReference.new(document_id: document_id, document_name: document_name, status: status, document_type: document_type, file_type: file_type, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/the_plaid_api/models/risk_signal_document_reference.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['document_id'] = 'document_id' @_hash['document_name'] = 'document_name' @_hash['status'] = 'status' @_hash['document_type'] = 'document_type' @_hash['file_type'] = 'file_type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 58 59 60 61 |
# File 'lib/the_plaid_api/models/risk_signal_document_reference.rb', line 55 def self.nullables %w[ document_id document_type file_type ] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 52 |
# File 'lib/the_plaid_api/models/risk_signal_document_reference.rb', line 44 def self.optionals %w[ document_id document_name status document_type file_type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
113 114 115 116 117 118 119 |
# File 'lib/the_plaid_api/models/risk_signal_document_reference.rb', line 113 def inspect class_name = self.class.name.split('::').last "<#{class_name} document_id: #{@document_id.inspect}, document_name:"\ " #{@document_name.inspect}, status: #{@status.inspect}, document_type:"\ " #{@document_type.inspect}, file_type: #{@file_type.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
105 106 107 108 109 110 |
# File 'lib/the_plaid_api/models/risk_signal_document_reference.rb', line 105 def to_s class_name = self.class.name.split('::').last "<#{class_name} document_id: #{@document_id}, document_name: #{@document_name}, status:"\ " #{@status}, document_type: #{@document_type}, file_type: #{@file_type},"\ " additional_properties: #{@additional_properties}>" end |