Class: ThePlaidApi::CreditSessionBankEmploymentResult
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::CreditSessionBankEmploymentResult
- Defined in:
- lib/the_plaid_api/models/credit_session_bank_employment_result.rb
Overview
The details of a bank employment verification in Link.
Instance Attribute Summary collapse
-
#institution_id ⇒ String
The Plaid Institution ID associated with the Item.
-
#item_id ⇒ String
The Plaid Item ID.
-
#status ⇒ CreditSessionBankEmploymentStatus
Status of the Bank Employment 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: SKIP, item_id: SKIP, institution_id: SKIP, additional_properties: nil) ⇒ CreditSessionBankEmploymentResult
constructor
A new instance of CreditSessionBankEmploymentResult.
-
#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: SKIP, item_id: SKIP, institution_id: SKIP, additional_properties: nil) ⇒ CreditSessionBankEmploymentResult
Returns a new instance of CreditSessionBankEmploymentResult.
57 58 59 60 61 62 63 64 65 66 |
# File 'lib/the_plaid_api/models/credit_session_bank_employment_result.rb', line 57 def initialize(status: SKIP, item_id: SKIP, institution_id: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @status = status unless status == SKIP @item_id = item_id unless item_id == SKIP @institution_id = institution_id unless institution_id == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#institution_id ⇒ String
The Plaid Institution ID associated with the Item.
32 33 34 |
# File 'lib/the_plaid_api/models/credit_session_bank_employment_result.rb', line 32 def institution_id @institution_id 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/credit_session_bank_employment_result.rb', line 28 def item_id @item_id end |
#status ⇒ CreditSessionBankEmploymentStatus
Status of the Bank Employment Link session. ‘APPROVED`: User has approved and verified their employment. `NO_EMPLOYMENTS_FOUND`: We attempted, but were unable to find any employment in the connected account. `EMPLOYER_NOT_LISTED`: The user explicitly indicated that they did not see their current or previous employer in the list of employer names found. `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/credit_session_bank_employment_result.rb', line 21 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/the_plaid_api/models/credit_session_bank_employment_result.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. status = hash.key?('status') ? hash['status'] : SKIP item_id = hash.key?('item_id') ? hash['item_id'] : SKIP institution_id = hash.key?('institution_id') ? hash['institution_id'] : 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. CreditSessionBankEmploymentResult.new(status: status, item_id: item_id, institution_id: institution_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
35 36 37 38 39 40 41 |
# File 'lib/the_plaid_api/models/credit_session_bank_employment_result.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['status'] = 'status' @_hash['item_id'] = 'item_id' @_hash['institution_id'] = 'institution_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
53 54 55 |
# File 'lib/the_plaid_api/models/credit_session_bank_employment_result.rb', line 53 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 |
# File 'lib/the_plaid_api/models/credit_session_bank_employment_result.rb', line 44 def self.optionals %w[ status item_id institution_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
100 101 102 103 104 |
# File 'lib/the_plaid_api/models/credit_session_bank_employment_result.rb', line 100 def inspect class_name = self.class.name.split('::').last "<#{class_name} status: #{@status.inspect}, item_id: #{@item_id.inspect}, institution_id:"\ " #{@institution_id.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
93 94 95 96 97 |
# File 'lib/the_plaid_api/models/credit_session_bank_employment_result.rb', line 93 def to_s class_name = self.class.name.split('::').last "<#{class_name} status: #{@status}, item_id: #{@item_id}, institution_id:"\ " #{@institution_id}, additional_properties: #{@additional_properties}>" end |