Class: ThePlaidApi::CraUserCheckReportReadyWebhook
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::CraUserCheckReportReadyWebhook
- Defined in:
- lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb
Overview
Fired when the Check Report are ready to be retrieved. Once this webhook has fired, the report will be available to retrieve for 24 hours.
Instance Attribute Summary collapse
-
#environment ⇒ WebhookEnvironmentValues
The Plaid environment the webhook was sent from.
-
#failed_products ⇒ Array[Products]
Specifies a list of products that have failed to generate for the report.
-
#item_ids ⇒ Array[String]
A list of ‘item_ids` included in the Check Report.
-
#successful_products ⇒ Array[Products]
Specifies a list of products that have successfully been generated for the report.
-
#user_id ⇒ String
The ‘user_id` associated with the user whose data is being requested.
-
#webhook_code ⇒ String
‘USER_CHECK_REPORT_READY`.
-
#webhook_type ⇒ String
‘CHECK_REPORT`.
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:, user_id:, environment:, successful_products: SKIP, failed_products: SKIP, item_ids: SKIP, additional_properties: nil) ⇒ CraUserCheckReportReadyWebhook
constructor
A new instance of CraUserCheckReportReadyWebhook.
-
#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:, user_id:, environment:, successful_products: SKIP, failed_products: SKIP, item_ids: SKIP, additional_properties: nil) ⇒ CraUserCheckReportReadyWebhook
Returns a new instance of CraUserCheckReportReadyWebhook.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb', line 75 def initialize(webhook_type:, webhook_code:, user_id:, environment:, successful_products: SKIP, failed_products: SKIP, item_ids: 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 @user_id = user_id @successful_products = successful_products unless successful_products == SKIP @failed_products = failed_products unless failed_products == SKIP @item_ids = item_ids unless item_ids == SKIP @environment = environment @additional_properties = additional_properties end |
Instance Attribute Details
#environment ⇒ WebhookEnvironmentValues
The Plaid environment the webhook was sent from
44 45 46 |
# File 'lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb', line 44 def environment @environment end |
#failed_products ⇒ Array[Products]
Specifies a list of products that have failed to generate for the report. Additional detail on what caused the failure can be found by calling the product /get endpoint.
35 36 37 |
# File 'lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb', line 35 def failed_products @failed_products end |
#item_ids ⇒ Array[String]
A list of ‘item_ids` included in the Check Report. Access to this field is in closed beta.
40 41 42 |
# File 'lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb', line 40 def item_ids @item_ids end |
#successful_products ⇒ Array[Products]
Specifies a list of products that have successfully been generated for the report.
29 30 31 |
# File 'lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb', line 29 def successful_products @successful_products end |
#user_id ⇒ String
The ‘user_id` associated with the user whose data is being requested. This is received by calling `user/create`.
24 25 26 |
# File 'lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb', line 24 def user_id @user_id end |
#webhook_code ⇒ String
‘USER_CHECK_REPORT_READY`
19 20 21 |
# File 'lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb', line 19 def webhook_code @webhook_code end |
#webhook_type ⇒ String
‘CHECK_REPORT`
15 16 17 |
# File 'lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb', line 15 def webhook_type @webhook_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 118 119 120 121 122 |
# File 'lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb', line 92 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 user_id = hash.key?('user_id') ? hash['user_id'] : nil environment = hash.key?('environment') ? hash['environment'] : nil successful_products = hash.key?('successful_products') ? hash['successful_products'] : SKIP failed_products = hash.key?('failed_products') ? hash['failed_products'] : SKIP item_ids = hash.key?('item_ids') ? hash['item_ids'] : 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. CraUserCheckReportReadyWebhook.new(webhook_type: webhook_type, webhook_code: webhook_code, user_id: user_id, environment: environment, successful_products: successful_products, failed_products: failed_products, item_ids: item_ids, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb', line 47 def self.names @_hash = {} if @_hash.nil? @_hash['webhook_type'] = 'webhook_type' @_hash['webhook_code'] = 'webhook_code' @_hash['user_id'] = 'user_id' @_hash['successful_products'] = 'successful_products' @_hash['failed_products'] = 'failed_products' @_hash['item_ids'] = 'item_ids' @_hash['environment'] = 'environment' @_hash end |
.nullables ⇒ Object
An array for nullable fields
69 70 71 72 73 |
# File 'lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb', line 69 def self.nullables %w[ item_ids ] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 63 64 65 66 |
# File 'lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb', line 60 def self.optionals %w[ successful_products failed_products item_ids ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
134 135 136 137 138 139 140 141 |
# File 'lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb', line 134 def inspect class_name = self.class.name.split('::').last "<#{class_name} webhook_type: #{@webhook_type.inspect}, webhook_code:"\ " #{@webhook_code.inspect}, user_id: #{@user_id.inspect}, successful_products:"\ " #{@successful_products.inspect}, failed_products: #{@failed_products.inspect}, item_ids:"\ " #{@item_ids.inspect}, environment: #{@environment.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
125 126 127 128 129 130 131 |
# File 'lib/the_plaid_api/models/cra_user_check_report_ready_webhook.rb', line 125 def to_s class_name = self.class.name.split('::').last "<#{class_name} webhook_type: #{@webhook_type}, webhook_code: #{@webhook_code}, user_id:"\ " #{@user_id}, successful_products: #{@successful_products}, failed_products:"\ " #{@failed_products}, item_ids: #{@item_ids}, environment: #{@environment},"\ " additional_properties: #{@additional_properties}>" end |