Class: ThePlaidApi::IssueResolvedWebhook
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::IssueResolvedWebhook
- Defined in:
- lib/the_plaid_api/models/issue_resolved_webhook.rb
Overview
Webhook notifications are sent only when a subscribed issue is marked as resolved. The payload contains details about the issue at the time of its resolution, focusing on the most essential information.
Instance Attribute Summary collapse
-
#institution_id ⇒ String
The unique identifier of the financial institution involved.
-
#institution_name ⇒ String
The name of the financial institution involved.
-
#issue_description ⇒ String
A simple description of the error for the end user.
-
#issue_id ⇒ String
The unique identifier of the connectivity issue.
-
#issue_resolved_at ⇒ DateTime
The time when the issue was marked as resolved.
-
#webhook_code ⇒ String
‘ISSUE_RESOLVED`.
-
#webhook_type ⇒ String
‘ISSUES`.
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:, issue_id:, issue_description:, issue_resolved_at:, institution_id:, institution_name:, additional_properties: nil) ⇒ IssueResolvedWebhook
constructor
A new instance of IssueResolvedWebhook.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_issue_resolved_at ⇒ Object
-
#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:, issue_id:, issue_description:, issue_resolved_at:, institution_id:, institution_name:, additional_properties: nil) ⇒ IssueResolvedWebhook
Returns a new instance of IssueResolvedWebhook.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 66 def initialize(webhook_type:, webhook_code:, issue_id:, issue_description:, issue_resolved_at:, institution_id:, institution_name:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @webhook_type = webhook_type @webhook_code = webhook_code @issue_id = issue_id @issue_description = issue_description @issue_resolved_at = issue_resolved_at @institution_id = institution_id @institution_name = institution_name @additional_properties = additional_properties end |
Instance Attribute Details
#institution_id ⇒ String
The unique identifier of the financial institution involved.
37 38 39 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 37 def institution_id @institution_id end |
#institution_name ⇒ String
The name of the financial institution involved.
41 42 43 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 41 def institution_name @institution_name end |
#issue_description ⇒ String
A simple description of the error for the end user.
29 30 31 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 29 def issue_description @issue_description end |
#issue_id ⇒ String
The unique identifier of the connectivity issue.
25 26 27 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 25 def issue_id @issue_id end |
#issue_resolved_at ⇒ DateTime
The time when the issue was marked as resolved.
33 34 35 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 33 def issue_resolved_at @issue_resolved_at end |
#webhook_code ⇒ String
‘ISSUE_RESOLVED`
21 22 23 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 21 def webhook_code @webhook_code end |
#webhook_type ⇒ String
‘ISSUES`
17 18 19 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 17 def webhook_type @webhook_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
83 84 85 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 111 112 113 114 115 116 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 83 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 issue_id = hash.key?('issue_id') ? hash['issue_id'] : nil issue_description = hash.key?('issue_description') ? hash['issue_description'] : nil issue_resolved_at = if hash.key?('issue_resolved_at') (DateTimeHelper.from_rfc3339(hash['issue_resolved_at']) if hash['issue_resolved_at']) end institution_id = hash.key?('institution_id') ? hash['institution_id'] : nil institution_name = hash.key?('institution_name') ? hash['institution_name'] : nil # 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. IssueResolvedWebhook.new(webhook_type: webhook_type, webhook_code: webhook_code, issue_id: issue_id, issue_description: issue_description, issue_resolved_at: issue_resolved_at, institution_id: institution_id, institution_name: institution_name, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 44 def self.names @_hash = {} if @_hash.nil? @_hash['webhook_type'] = 'webhook_type' @_hash['webhook_code'] = 'webhook_code' @_hash['issue_id'] = 'issue_id' @_hash['issue_description'] = 'issue_description' @_hash['issue_resolved_at'] = 'issue_resolved_at' @_hash['institution_id'] = 'institution_id' @_hash['institution_name'] = 'institution_name' @_hash end |
.nullables ⇒ Object
An array for nullable fields
62 63 64 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 62 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
57 58 59 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 57 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
132 133 134 135 136 137 138 139 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 132 def inspect class_name = self.class.name.split('::').last "<#{class_name} webhook_type: #{@webhook_type.inspect}, webhook_code:"\ " #{@webhook_code.inspect}, issue_id: #{@issue_id.inspect}, issue_description:"\ " #{@issue_description.inspect}, issue_resolved_at: #{@issue_resolved_at.inspect},"\ " institution_id: #{@institution_id.inspect}, institution_name:"\ " #{@institution_name.inspect}, additional_properties: #{@additional_properties}>" end |
#to_custom_issue_resolved_at ⇒ Object
118 119 120 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 118 def to_custom_issue_resolved_at DateTimeHelper.to_rfc3339(issue_resolved_at) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
123 124 125 126 127 128 129 |
# File 'lib/the_plaid_api/models/issue_resolved_webhook.rb', line 123 def to_s class_name = self.class.name.split('::').last "<#{class_name} webhook_type: #{@webhook_type}, webhook_code: #{@webhook_code}, issue_id:"\ " #{@issue_id}, issue_description: #{@issue_description}, issue_resolved_at:"\ " #{@issue_resolved_at}, institution_id: #{@institution_id}, institution_name:"\ " #{@institution_name}, additional_properties: #{@additional_properties}>" end |