Class: ThePlaidApi::LinkSessionBankIncomeResult
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::LinkSessionBankIncomeResult
- Defined in:
- lib/the_plaid_api/models/link_session_bank_income_result.rb
Overview
The details of a bank income verification in Link.
Instance Attribute Summary collapse
-
#institution ⇒ LinkSessionSuccessMetadataInstitution
An institution object.
-
#item_id ⇒ String
The Plaid Item ID.
-
#status ⇒ CreditSessionBankIncomeStatus
Status of the Bank Income Link session.
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(status:, item_id:, institution:, additional_properties: nil) ⇒ LinkSessionBankIncomeResult
constructor
A new instance of LinkSessionBankIncomeResult.
-
#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(status:, item_id:, institution:, additional_properties: nil) ⇒ LinkSessionBankIncomeResult
Returns a new instance of LinkSessionBankIncomeResult.
56 57 58 59 60 61 62 63 64 |
# File 'lib/the_plaid_api/models/link_session_bank_income_result.rb', line 56 def initialize(status:, item_id:, institution:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @status = status @item_id = item_id @institution = institution @additional_properties = additional_properties end |
Instance Attribute Details
#institution ⇒ LinkSessionSuccessMetadataInstitution
An institution object. If the Item was created via Same-Day or Instant micro-deposit verification, will be ‘null`.
33 34 35 |
# File 'lib/the_plaid_api/models/link_session_bank_income_result.rb', line 33 def institution @institution end |
#item_id ⇒ String
The Plaid Item ID. The ‘item_id` is always unique; linking the same account at the same institution twice will result in two Items with different `item_id` values. Like all Plaid identifiers, the `item_id` is case-sensitive.
28 29 30 |
# File 'lib/the_plaid_api/models/link_session_bank_income_result.rb', line 28 def item_id @item_id end |
#status ⇒ CreditSessionBankIncomeStatus
Status of the Bank Income Link session. ‘APPROVED`: User has approved and verified their income `NO_DEPOSITS_FOUND`: We attempted, but were unable to find any income in the connected account. `USER_REPORTED_NO_INCOME`: The user explicitly indicated that they don’t receive income in the connected account. ‘STARTED`: The user began the bank income portion of the link flow. `INTERNAL_ERROR`: The user encountered an internal error.
21 22 23 |
# File 'lib/the_plaid_api/models/link_session_bank_income_result.rb', line 21 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/the_plaid_api/models/link_session_bank_income_result.rb', line 67 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. status = hash.key?('status') ? hash['status'] : nil item_id = hash.key?('item_id') ? hash['item_id'] : nil institution = LinkSessionSuccessMetadataInstitution.from_hash(hash['institution']) if hash['institution'] # 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. LinkSessionBankIncomeResult.new(status: status, item_id: item_id, institution: institution, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
36 37 38 39 40 41 42 |
# File 'lib/the_plaid_api/models/link_session_bank_income_result.rb', line 36 def self.names @_hash = {} if @_hash.nil? @_hash['status'] = 'status' @_hash['item_id'] = 'item_id' @_hash['institution'] = 'institution' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 53 54 |
# File 'lib/the_plaid_api/models/link_session_bank_income_result.rb', line 50 def self.nullables %w[ institution ] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 |
# File 'lib/the_plaid_api/models/link_session_bank_income_result.rb', line 45 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
98 99 100 101 102 |
# File 'lib/the_plaid_api/models/link_session_bank_income_result.rb', line 98 def inspect class_name = self.class.name.split('::').last "<#{class_name} status: #{@status.inspect}, item_id: #{@item_id.inspect}, institution:"\ " #{@institution.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
91 92 93 94 95 |
# File 'lib/the_plaid_api/models/link_session_bank_income_result.rb', line 91 def to_s class_name = self.class.name.split('::').last "<#{class_name} status: #{@status}, item_id: #{@item_id}, institution: #{@institution},"\ " additional_properties: #{@additional_properties}>" end |