Class: ThePlaidApi::Issue
- Defined in:
- lib/the_plaid_api/models/issue.rb
Overview
Information on an issue encountered with financial institutions interactions with financial institutions during Linking.
Instance Attribute Summary collapse
-
#created_at ⇒ DateTime
The creation time of the record tracking this issue.
-
#detailed_description ⇒ String
A more detailed description for the customer.
-
#institution_ids ⇒ Array[String]
A list of ids of the financial institutions affected.
-
#institution_names ⇒ Array[String]
A list of names of the financial institutions affected.
-
#issue_id ⇒ String
The unique identifier of the issue.
-
#status ⇒ IssuesStatus
The current status of the issue.
-
#summary ⇒ String
A simple summary of the error for the end user.
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(issue_id: SKIP, institution_names: SKIP, institution_ids: SKIP, created_at: SKIP, summary: SKIP, detailed_description: SKIP, status: SKIP, additional_properties: nil) ⇒ Issue
constructor
A new instance of Issue.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_created_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(issue_id: SKIP, institution_names: SKIP, institution_ids: SKIP, created_at: SKIP, summary: SKIP, detailed_description: SKIP, status: SKIP, additional_properties: nil) ⇒ Issue
Returns a new instance of Issue.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/the_plaid_api/models/issue.rb', line 73 def initialize(issue_id: SKIP, institution_names: SKIP, institution_ids: SKIP, created_at: SKIP, summary: SKIP, detailed_description: SKIP, status: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @issue_id = issue_id unless issue_id == SKIP @institution_names = institution_names unless institution_names == SKIP @institution_ids = institution_ids unless institution_ids == SKIP @created_at = created_at unless created_at == SKIP @summary = summary unless summary == SKIP @detailed_description = detailed_description unless detailed_description == SKIP @status = status unless status == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#created_at ⇒ DateTime
The creation time of the record tracking this issue.
28 29 30 |
# File 'lib/the_plaid_api/models/issue.rb', line 28 def created_at @created_at end |
#detailed_description ⇒ String
A more detailed description for the customer.
36 37 38 |
# File 'lib/the_plaid_api/models/issue.rb', line 36 def detailed_description @detailed_description end |
#institution_ids ⇒ Array[String]
A list of ids of the financial institutions affected.
24 25 26 |
# File 'lib/the_plaid_api/models/issue.rb', line 24 def institution_ids @institution_ids end |
#institution_names ⇒ Array[String]
A list of names of the financial institutions affected.
20 21 22 |
# File 'lib/the_plaid_api/models/issue.rb', line 20 def institution_names @institution_names end |
#issue_id ⇒ String
The unique identifier of the issue.
16 17 18 |
# File 'lib/the_plaid_api/models/issue.rb', line 16 def issue_id @issue_id end |
#status ⇒ IssuesStatus
The current status of the issue.
40 41 42 |
# File 'lib/the_plaid_api/models/issue.rb', line 40 def status @status end |
#summary ⇒ String
A simple summary of the error for the end user.
32 33 34 |
# File 'lib/the_plaid_api/models/issue.rb', line 32 def summary @summary end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 118 119 120 121 122 123 124 125 126 |
# File 'lib/the_plaid_api/models/issue.rb', line 91 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. issue_id = hash.key?('issue_id') ? hash['issue_id'] : SKIP institution_names = hash.key?('institution_names') ? hash['institution_names'] : SKIP institution_ids = hash.key?('institution_ids') ? hash['institution_ids'] : SKIP created_at = if hash.key?('created_at') (DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at']) else SKIP end summary = hash.key?('summary') ? hash['summary'] : SKIP detailed_description = hash.key?('detailed_description') ? hash['detailed_description'] : SKIP status = hash.key?('status') ? hash['status'] : 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. Issue.new(issue_id: issue_id, institution_names: institution_names, institution_ids: institution_ids, created_at: created_at, summary: summary, detailed_description: detailed_description, status: status, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/the_plaid_api/models/issue.rb', line 43 def self.names @_hash = {} if @_hash.nil? @_hash['issue_id'] = 'issue_id' @_hash['institution_names'] = 'institution_names' @_hash['institution_ids'] = 'institution_ids' @_hash['created_at'] = 'created_at' @_hash['summary'] = 'summary' @_hash['detailed_description'] = 'detailed_description' @_hash['status'] = 'status' @_hash end |
.nullables ⇒ Object
An array for nullable fields
69 70 71 |
# File 'lib/the_plaid_api/models/issue.rb', line 69 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/the_plaid_api/models/issue.rb', line 56 def self.optionals %w[ issue_id institution_names institution_ids created_at summary detailed_description status ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
142 143 144 145 146 147 148 149 |
# File 'lib/the_plaid_api/models/issue.rb', line 142 def inspect class_name = self.class.name.split('::').last "<#{class_name} issue_id: #{@issue_id.inspect}, institution_names:"\ " #{@institution_names.inspect}, institution_ids: #{@institution_ids.inspect}, created_at:"\ " #{@created_at.inspect}, summary: #{@summary.inspect}, detailed_description:"\ " #{@detailed_description.inspect}, status: #{@status.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_custom_created_at ⇒ Object
128 129 130 |
# File 'lib/the_plaid_api/models/issue.rb', line 128 def to_custom_created_at DateTimeHelper.to_rfc3339(created_at) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
133 134 135 136 137 138 139 |
# File 'lib/the_plaid_api/models/issue.rb', line 133 def to_s class_name = self.class.name.split('::').last "<#{class_name} issue_id: #{@issue_id}, institution_names: #{@institution_names},"\ " institution_ids: #{@institution_ids}, created_at: #{@created_at}, summary: #{@summary},"\ " detailed_description: #{@detailed_description}, status: #{@status}, additional_properties:"\ " #{@additional_properties}>" end |