Class: ThePlaidApi::AuthVerifyResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::AuthVerifyResponse
- Defined in:
- lib/the_plaid_api/models/auth_verify_response.rb
Overview
AuthVerifyResponse defines the response schema for ‘/auth/verify`
Instance Attribute Summary collapse
-
#item_id ⇒ String
The ‘item_id` value of the Item created for verification.
-
#request_id ⇒ String
A unique identifier for the request, which can be used for troubleshooting.
-
#verification_insights ⇒ VerificationInsights
Insights from performing database verification for the account.
-
#verification_status ⇒ String
Indicates the Item’s database verification status.
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(request_id:, verification_status:, verification_insights:, item_id: SKIP, additional_properties: nil) ⇒ AuthVerifyResponse
constructor
A new instance of AuthVerifyResponse.
-
#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(request_id:, verification_status:, verification_insights:, item_id: SKIP, additional_properties: nil) ⇒ AuthVerifyResponse
Returns a new instance of AuthVerifyResponse.
73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/the_plaid_api/models/auth_verify_response.rb', line 73 def initialize(request_id:, verification_status:, verification_insights:, item_id: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @request_id = request_id @item_id = item_id unless item_id == SKIP @verification_status = verification_status @verification_insights = verification_insights @additional_properties = additional_properties end |
Instance Attribute Details
#item_id ⇒ String
The ‘item_id` value of the Item created for verification. If numbers data provided is invalid, an item may not be created.
21 22 23 |
# File 'lib/the_plaid_api/models/auth_verify_response.rb', line 21 def item_id @item_id end |
#request_id ⇒ String
A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.
16 17 18 |
# File 'lib/the_plaid_api/models/auth_verify_response.rb', line 16 def request_id @request_id end |
#verification_insights ⇒ VerificationInsights
Insights from performing database verification for the account. Only returned for Auth Items using Database Auth.
47 48 49 |
# File 'lib/the_plaid_api/models/auth_verify_response.rb', line 47 def verification_insights @verification_insights end |
#verification_status ⇒ String
Indicates the Item’s database verification status. Possible values are: ‘database_insights_fail`: The Item’s numbers have been verified using Plaid’s data sources and have signal for being invalid and/or have no signal for being valid. Typically this indicates that the routing number is invalid, the account number does not match the account number format associated with the routing number, or the account has been reported as closed or frozen. Only returned for Auth Items created via Database Auth. ‘database_insights_pass`: The Item’s numbers have been verified using Plaid’s data sources: the routing and account number match a routing and account number of an account recognized on the Plaid network, and the account is not known by Plaid to be frozen or closed. Only returned for Auth Items created via Database Auth. ‘database_insights_pass_with_caution`: The Item’s numbers have been verified using Plaid’s data sources and have some signal for being valid: the routing and account number were not recognized on the Plaid network, but the routing number is valid and the account number is a potential valid account number for that routing number. Only returned for Auth Items created via Database Auth.
42 43 44 |
# File 'lib/the_plaid_api/models/auth_verify_response.rb', line 42 def verification_status @verification_status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/the_plaid_api/models/auth_verify_response.rb', line 86 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. request_id = hash.key?('request_id') ? hash['request_id'] : nil verification_status = hash.key?('verification_status') ? hash['verification_status'] : nil verification_insights = VerificationInsights.from_hash(hash['verification_insights']) if hash['verification_insights'] item_id = hash.key?('item_id') ? hash['item_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. AuthVerifyResponse.new(request_id: request_id, verification_status: verification_status, verification_insights: verification_insights, item_id: item_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
50 51 52 53 54 55 56 57 |
# File 'lib/the_plaid_api/models/auth_verify_response.rb', line 50 def self.names @_hash = {} if @_hash.nil? @_hash['request_id'] = 'request_id' @_hash['item_id'] = 'item_id' @_hash['verification_status'] = 'verification_status' @_hash['verification_insights'] = 'verification_insights' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 70 71 |
# File 'lib/the_plaid_api/models/auth_verify_response.rb', line 67 def self.nullables %w[ item_id ] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 63 64 |
# File 'lib/the_plaid_api/models/auth_verify_response.rb', line 60 def self.optionals %w[ item_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
121 122 123 124 125 126 |
# File 'lib/the_plaid_api/models/auth_verify_response.rb', line 121 def inspect class_name = self.class.name.split('::').last "<#{class_name} request_id: #{@request_id.inspect}, item_id: #{@item_id.inspect},"\ " verification_status: #{@verification_status.inspect}, verification_insights:"\ " #{@verification_insights.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
113 114 115 116 117 118 |
# File 'lib/the_plaid_api/models/auth_verify_response.rb', line 113 def to_s class_name = self.class.name.split('::').last "<#{class_name} request_id: #{@request_id}, item_id: #{@item_id}, verification_status:"\ " #{@verification_status}, verification_insights: #{@verification_insights},"\ " additional_properties: #{@additional_properties}>" end |