Class: ThePlaidApi::LinkTokenCreateIdentity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::LinkTokenCreateIdentity
- Defined in:
- lib/the_plaid_api/models/link_token_create_identity.rb
Overview
Identity object used to specify document upload
Instance Attribute Summary collapse
-
#account_ids ⇒ Array[String]
An array of ‘account_ids`.
-
#is_document_upload ⇒ TrueClass | FalseClass
Used to specify whether the Link session is Identity Document Upload.
-
#parsing_configs ⇒ Array[IncomeVerificationDocParsingConfig]
An array of parsing configurations.
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_document_upload: SKIP, account_ids: SKIP, parsing_configs: SKIP, additional_properties: nil) ⇒ LinkTokenCreateIdentity
constructor
A new instance of LinkTokenCreateIdentity.
-
#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(is_document_upload: SKIP, account_ids: SKIP, parsing_configs: SKIP, additional_properties: nil) ⇒ LinkTokenCreateIdentity
Returns a new instance of LinkTokenCreateIdentity.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/the_plaid_api/models/link_token_create_identity.rb', line 50 def initialize(is_document_upload: SKIP, account_ids: SKIP, parsing_configs: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @is_document_upload = is_document_upload unless is_document_upload == SKIP @account_ids = account_ids unless account_ids == SKIP @parsing_configs = parsing_configs unless parsing_configs == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_ids ⇒ Array[String]
An array of ‘account_ids`. Currently can only contain one `account_id`. Must be populated if using Document Upload.
19 20 21 |
# File 'lib/the_plaid_api/models/link_token_create_identity.rb', line 19 def account_ids @account_ids end |
#is_document_upload ⇒ TrueClass | FalseClass
Used to specify whether the Link session is Identity Document Upload
14 15 16 |
# File 'lib/the_plaid_api/models/link_token_create_identity.rb', line 14 def is_document_upload @is_document_upload end |
#parsing_configs ⇒ Array[IncomeVerificationDocParsingConfig]
An array of parsing configurations. Valid parsing configurations are ‘ocr` and `risk_signals`. If parsing configurations are omitted, defaults to `ocr`
25 26 27 |
# File 'lib/the_plaid_api/models/link_token_create_identity.rb', line 25 def parsing_configs @parsing_configs end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/the_plaid_api/models/link_token_create_identity.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. is_document_upload = hash.key?('is_document_upload') ? hash['is_document_upload'] : SKIP account_ids = hash.key?('account_ids') ? hash['account_ids'] : SKIP parsing_configs = hash.key?('parsing_configs') ? hash['parsing_configs'] : 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. LinkTokenCreateIdentity.new(is_document_upload: is_document_upload, account_ids: account_ids, parsing_configs: parsing_configs, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 34 |
# File 'lib/the_plaid_api/models/link_token_create_identity.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['is_document_upload'] = 'is_document_upload' @_hash['account_ids'] = 'account_ids' @_hash['parsing_configs'] = 'parsing_configs' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 |
# File 'lib/the_plaid_api/models/link_token_create_identity.rb', line 46 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
37 38 39 40 41 42 43 |
# File 'lib/the_plaid_api/models/link_token_create_identity.rb', line 37 def self.optionals %w[ is_document_upload account_ids parsing_configs ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
94 95 96 97 98 99 |
# File 'lib/the_plaid_api/models/link_token_create_identity.rb', line 94 def inspect class_name = self.class.name.split('::').last "<#{class_name} is_document_upload: #{@is_document_upload.inspect}, account_ids:"\ " #{@account_ids.inspect}, parsing_configs: #{@parsing_configs.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
87 88 89 90 91 |
# File 'lib/the_plaid_api/models/link_token_create_identity.rb', line 87 def to_s class_name = self.class.name.split('::').last "<#{class_name} is_document_upload: #{@is_document_upload}, account_ids: #{@account_ids},"\ " parsing_configs: #{@parsing_configs}, additional_properties: #{@additional_properties}>" end |