Class: ThePlaidApi::CreditBankEmploymentWarning
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::CreditBankEmploymentWarning
- Defined in:
- lib/the_plaid_api/models/credit_bank_employment_warning.rb
Overview
The warning associated with the data that was unavailable for the Bank Employment Report.
Instance Attribute Summary collapse
-
#cause ⇒ CreditBankIncomeCause
An error object and associated ‘item_id` used to identify a specific Item and error when a batch operation operating on multiple Items has encountered an error in one of the Items.
-
#warning_code ⇒ CreditBankIncomeWarningCode
The warning code identifies a specific kind of warning.
-
#warning_type ⇒ String
readonly
The warning type which will always be ‘BANK_EMPLOYMENT_WARNING`.
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(warning_code:, cause:, additional_properties: nil) ⇒ CreditBankEmploymentWarning
constructor
A new instance of CreditBankEmploymentWarning.
-
#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(warning_code:, cause:, additional_properties: nil) ⇒ CreditBankEmploymentWarning
Returns a new instance of CreditBankEmploymentWarning.
52 53 54 55 56 57 58 59 60 |
# File 'lib/the_plaid_api/models/credit_bank_employment_warning.rb', line 52 def initialize(warning_code:, cause:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @warning_type = 'BANK_EMPLOYMENT_WARNING' @warning_code = warning_code @cause = cause @additional_properties = additional_properties end |
Instance Attribute Details
#cause ⇒ CreditBankIncomeCause
An error object and associated ‘item_id` used to identify a specific Item and error when a batch operation operating on multiple Items has encountered an error in one of the Items.
31 32 33 |
# File 'lib/the_plaid_api/models/credit_bank_employment_warning.rb', line 31 def cause @cause end |
#warning_code ⇒ CreditBankIncomeWarningCode
The warning code identifies a specific kind of warning. ‘IDENTITY_UNAVAILABLE`: Unable to extract identity for the Item `TRANSACTIONS_UNAVAILABLE`: Unable to extract transactions for the Item `ITEM_UNAPPROVED`: User exited flow before giving permission to share data for the Item `REPORT_DELETED`: Report deleted due to customer or consumer request `DATA_UNAVAILABLE`: No relevant data was found for the Item
25 26 27 |
# File 'lib/the_plaid_api/models/credit_bank_employment_warning.rb', line 25 def warning_code @warning_code end |
#warning_type ⇒ String (readonly)
The warning type which will always be ‘BANK_EMPLOYMENT_WARNING`.
15 16 17 |
# File 'lib/the_plaid_api/models/credit_bank_employment_warning.rb', line 15 def warning_type @warning_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/the_plaid_api/models/credit_bank_employment_warning.rb', line 63 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. warning_code = hash.key?('warning_code') ? hash['warning_code'] : nil cause = CreditBankIncomeCause.from_hash(hash['cause']) if hash['cause'] # 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. CreditBankEmploymentWarning.new(warning_code: warning_code, cause: cause, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
34 35 36 37 38 39 40 |
# File 'lib/the_plaid_api/models/credit_bank_employment_warning.rb', line 34 def self.names @_hash = {} if @_hash.nil? @_hash['warning_type'] = 'warning_type' @_hash['warning_code'] = 'warning_code' @_hash['cause'] = 'cause' @_hash end |
.nullables ⇒ Object
An array for nullable fields
48 49 50 |
# File 'lib/the_plaid_api/models/credit_bank_employment_warning.rb', line 48 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
43 44 45 |
# File 'lib/the_plaid_api/models/credit_bank_employment_warning.rb', line 43 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
91 92 93 94 95 96 |
# File 'lib/the_plaid_api/models/credit_bank_employment_warning.rb', line 91 def inspect class_name = self.class.name.split('::').last "<#{class_name} warning_type: #{@warning_type.inspect}, warning_code:"\ " #{@warning_code.inspect}, cause: #{@cause.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
84 85 86 87 88 |
# File 'lib/the_plaid_api/models/credit_bank_employment_warning.rb', line 84 def to_s class_name = self.class.name.split('::').last "<#{class_name} warning_type: #{@warning_type}, warning_code: #{@warning_code}, cause:"\ " #{@cause}, additional_properties: #{@additional_properties}>" end |