Class: ThePlaidApi::IdentityDocumentMetadata
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::IdentityDocumentMetadata
- Defined in:
- lib/the_plaid_api/models/identity_document_metadata.rb
Overview
In closed beta. Object representing metadata pertaining to the document.
Instance Attribute Summary collapse
-
#is_account_number_match ⇒ TrueClass | FalseClass
Boolean field indicating if the uploaded document’s account number matches the account number we have on file.
-
#last_updated ⇒ DateTime
Boolean field indicating if the uploaded document’s account number matches the account number we have on file.
-
#uploaded_at ⇒ DateTime
Boolean field indicating if the uploaded document’s account number matches the account number we have on file.
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(is_account_number_match: SKIP, last_updated: SKIP, uploaded_at: SKIP, additional_properties: nil) ⇒ IdentityDocumentMetadata
constructor
A new instance of IdentityDocumentMetadata.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_last_updated ⇒ Object
- #to_custom_uploaded_at ⇒ Object
-
#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(is_account_number_match: SKIP, last_updated: SKIP, uploaded_at: SKIP, additional_properties: nil) ⇒ IdentityDocumentMetadata
Returns a new instance of IdentityDocumentMetadata.
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/the_plaid_api/models/identity_document_metadata.rb', line 51 def initialize(is_account_number_match: SKIP, last_updated: SKIP, uploaded_at: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @is_account_number_match = is_account_number_match unless is_account_number_match == SKIP @last_updated = last_updated unless last_updated == SKIP @uploaded_at = uploaded_at unless uploaded_at == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#is_account_number_match ⇒ TrueClass | FalseClass
Boolean field indicating if the uploaded document’s account number matches the account number we have on file
16 17 18 |
# File 'lib/the_plaid_api/models/identity_document_metadata.rb', line 16 def is_account_number_match @is_account_number_match end |
#last_updated ⇒ DateTime
Boolean field indicating if the uploaded document’s account number matches the account number we have on file
21 22 23 |
# File 'lib/the_plaid_api/models/identity_document_metadata.rb', line 21 def last_updated @last_updated end |
#uploaded_at ⇒ DateTime
Boolean field indicating if the uploaded document’s account number matches the account number we have on file
26 27 28 |
# File 'lib/the_plaid_api/models/identity_document_metadata.rb', line 26 def uploaded_at @uploaded_at end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/the_plaid_api/models/identity_document_metadata.rb', line 63 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. is_account_number_match = hash.key?('is_account_number_match') ? hash['is_account_number_match'] : SKIP last_updated = if hash.key?('last_updated') (DateTimeHelper.from_rfc3339(hash['last_updated']) if hash['last_updated']) else SKIP end uploaded_at = if hash.key?('uploaded_at') (DateTimeHelper.from_rfc3339(hash['uploaded_at']) if hash['uploaded_at']) else SKIP end # 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. IdentityDocumentMetadata.new(is_account_number_match: is_account_number_match, last_updated: last_updated, uploaded_at: uploaded_at, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 |
# File 'lib/the_plaid_api/models/identity_document_metadata.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['is_account_number_match'] = 'is_account_number_match' @_hash['last_updated'] = 'last_updated' @_hash['uploaded_at'] = 'uploaded_at' @_hash end |
.nullables ⇒ Object
An array for nullable fields
47 48 49 |
# File 'lib/the_plaid_api/models/identity_document_metadata.rb', line 47 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
38 39 40 41 42 43 44 |
# File 'lib/the_plaid_api/models/identity_document_metadata.rb', line 38 def self.optionals %w[ is_account_number_match last_updated uploaded_at ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
111 112 113 114 115 116 |
# File 'lib/the_plaid_api/models/identity_document_metadata.rb', line 111 def inspect class_name = self.class.name.split('::').last "<#{class_name} is_account_number_match: #{@is_account_number_match.inspect}, last_updated:"\ " #{@last_updated.inspect}, uploaded_at: #{@uploaded_at.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_custom_last_updated ⇒ Object
94 95 96 |
# File 'lib/the_plaid_api/models/identity_document_metadata.rb', line 94 def to_custom_last_updated DateTimeHelper.to_rfc3339(last_updated) end |
#to_custom_uploaded_at ⇒ Object
98 99 100 |
# File 'lib/the_plaid_api/models/identity_document_metadata.rb', line 98 def to_custom_uploaded_at DateTimeHelper.to_rfc3339(uploaded_at) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
103 104 105 106 107 108 |
# File 'lib/the_plaid_api/models/identity_document_metadata.rb', line 103 def to_s class_name = self.class.name.split('::').last "<#{class_name} is_account_number_match: #{@is_account_number_match}, last_updated:"\ " #{@last_updated}, uploaded_at: #{@uploaded_at}, additional_properties:"\ " #{@additional_properties}>" end |