Class: ThePlaidApi::IncomeVerificationStatusWebhook
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::IncomeVerificationStatusWebhook
- Defined in:
- lib/the_plaid_api/models/income_verification_status_webhook.rb
Overview
Fired when the status of an income verification instance has changed. This webhook is fired for both the Document and Payroll Income flows, but not the Bank Income flow. It will typically take several minutes for this webhook to fire after the end user has uploaded their documents in the Document Income flow.
Instance Attribute Summary collapse
-
#environment ⇒ WebhookEnvironmentValues
The Plaid environment the webhook was sent from.
-
#item_id ⇒ String
The Item ID associated with the verification.
-
#user_id ⇒ String
The Plaid ‘user_id` of the User associated with this webhook, warning, or error.
-
#verification_status ⇒ String
‘VERIFICATION_STATUS_PROCESSING_COMPLETE`: The income verification processing has completed.
-
#webhook_code ⇒ String
‘INCOME_VERIFICATION`.
-
#webhook_type ⇒ String
‘“INCOME”`.
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(webhook_type:, webhook_code:, item_id:, verification_status:, environment:, user_id: SKIP, additional_properties: nil) ⇒ IncomeVerificationStatusWebhook
constructor
A new instance of IncomeVerificationStatusWebhook.
-
#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(webhook_type:, webhook_code:, item_id:, verification_status:, environment:, user_id: SKIP, additional_properties: nil) ⇒ IncomeVerificationStatusWebhook
Returns a new instance of IncomeVerificationStatusWebhook.
75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/the_plaid_api/models/income_verification_status_webhook.rb', line 75 def initialize(webhook_type:, webhook_code:, item_id:, verification_status:, environment:, user_id: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @webhook_type = webhook_type @webhook_code = webhook_code @item_id = item_id @user_id = user_id unless user_id == SKIP @verification_status = verification_status @environment = environment @additional_properties = additional_properties end |
Instance Attribute Details
#environment ⇒ WebhookEnvironmentValues
The Plaid environment the webhook was sent from
49 50 51 |
# File 'lib/the_plaid_api/models/income_verification_status_webhook.rb', line 49 def environment @environment end |
#item_id ⇒ String
The Item ID associated with the verification.
26 27 28 |
# File 'lib/the_plaid_api/models/income_verification_status_webhook.rb', line 26 def item_id @item_id end |
#user_id ⇒ String
The Plaid ‘user_id` of the User associated with this webhook, warning, or error.
31 32 33 |
# File 'lib/the_plaid_api/models/income_verification_status_webhook.rb', line 31 def user_id @user_id end |
#verification_status ⇒ String
‘VERIFICATION_STATUS_PROCESSING_COMPLETE`: The income verification processing has completed. This indicates that the documents have been parsed successfully or that the documents were not parsable. If the user uploaded multiple documents, this webhook will fire when all documents have finished processing. Call the `/credit/payroll_income/get` endpoint and check the document metadata to see which documents were successfully parsed. `VERIFICATION_STATUS_PROCESSING_FAILED`: An unexpected internal error occurred when attempting to process the verification documentation. `VERIFICATION_STATUS_PENDING_APPROVAL`: (deprecated) The income verification has been sent to the user for review.
45 46 47 |
# File 'lib/the_plaid_api/models/income_verification_status_webhook.rb', line 45 def verification_status @verification_status end |
#webhook_code ⇒ String
‘INCOME_VERIFICATION`
22 23 24 |
# File 'lib/the_plaid_api/models/income_verification_status_webhook.rb', line 22 def webhook_code @webhook_code end |
#webhook_type ⇒ String
‘“INCOME”`
18 19 20 |
# File 'lib/the_plaid_api/models/income_verification_status_webhook.rb', line 18 def webhook_type @webhook_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/the_plaid_api/models/income_verification_status_webhook.rb', line 90 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. webhook_type = hash.key?('webhook_type') ? hash['webhook_type'] : nil webhook_code = hash.key?('webhook_code') ? hash['webhook_code'] : nil item_id = hash.key?('item_id') ? hash['item_id'] : nil verification_status = hash.key?('verification_status') ? hash['verification_status'] : nil environment = hash.key?('environment') ? hash['environment'] : nil user_id = hash.key?('user_id') ? hash['user_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. IncomeVerificationStatusWebhook.new(webhook_type: webhook_type, webhook_code: webhook_code, item_id: item_id, verification_status: verification_status, environment: environment, user_id: user_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/the_plaid_api/models/income_verification_status_webhook.rb', line 52 def self.names @_hash = {} if @_hash.nil? @_hash['webhook_type'] = 'webhook_type' @_hash['webhook_code'] = 'webhook_code' @_hash['item_id'] = 'item_id' @_hash['user_id'] = 'user_id' @_hash['verification_status'] = 'verification_status' @_hash['environment'] = 'environment' @_hash end |
.nullables ⇒ Object
An array for nullable fields
71 72 73 |
# File 'lib/the_plaid_api/models/income_verification_status_webhook.rb', line 71 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
64 65 66 67 68 |
# File 'lib/the_plaid_api/models/income_verification_status_webhook.rb', line 64 def self.optionals %w[ user_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
128 129 130 131 132 133 134 |
# File 'lib/the_plaid_api/models/income_verification_status_webhook.rb', line 128 def inspect class_name = self.class.name.split('::').last "<#{class_name} webhook_type: #{@webhook_type.inspect}, webhook_code:"\ " #{@webhook_code.inspect}, item_id: #{@item_id.inspect}, user_id: #{@user_id.inspect},"\ " verification_status: #{@verification_status.inspect}, environment:"\ " #{@environment.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
120 121 122 123 124 125 |
# File 'lib/the_plaid_api/models/income_verification_status_webhook.rb', line 120 def to_s class_name = self.class.name.split('::').last "<#{class_name} webhook_type: #{@webhook_type}, webhook_code: #{@webhook_code}, item_id:"\ " #{@item_id}, user_id: #{@user_id}, verification_status: #{@verification_status},"\ " environment: #{@environment}, additional_properties: #{@additional_properties}>" end |