Class: ThePlaidApi::CreditBankEmploymentReport
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::CreditBankEmploymentReport
- Defined in:
- lib/the_plaid_api/models/credit_bank_employment_report.rb
Overview
The report of the Bank Employment data for an end user.
Instance Attribute Summary collapse
-
#bank_employment_report_id ⇒ String
The unique identifier associated with the Bank Employment Report.
-
#days_requested ⇒ Integer
The number of days requested by the customer for the Bank Employment Report.
-
#generated_time ⇒ DateTime
The time when the Bank Employment Report was generated, in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (e.g. ā2018-04-12T03:32:11Zā).
-
#items ⇒ Array[CreditBankEmploymentItem]
The list of Items in the report along with the associated metadata about the Item.
-
#warnings ⇒ Array[CreditBankEmploymentWarning]
If data from the Bank Employment report was unable to be retrieved, the warnings will contain information about the error that caused the data to be incomplete.
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(bank_employment_report_id:, generated_time:, days_requested:, items:, warnings:, additional_properties: nil) ⇒ CreditBankEmploymentReport
constructor
A new instance of CreditBankEmploymentReport.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_generated_time ⇒ 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(bank_employment_report_id:, generated_time:, days_requested:, items:, warnings:, additional_properties: nil) ⇒ CreditBankEmploymentReport
Returns a new instance of CreditBankEmploymentReport.
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/the_plaid_api/models/credit_bank_employment_report.rb', line 60 def initialize(bank_employment_report_id:, generated_time:, days_requested:, items:, warnings:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @bank_employment_report_id = bank_employment_report_id @generated_time = generated_time @days_requested = days_requested @items = items @warnings = warnings @additional_properties = additional_properties end |
Instance Attribute Details
#bank_employment_report_id ⇒ String
The unique identifier associated with the Bank Employment Report.
15 16 17 |
# File 'lib/the_plaid_api/models/credit_bank_employment_report.rb', line 15 def bank_employment_report_id @bank_employment_report_id end |
#days_requested ⇒ Integer
The number of days requested by the customer for the Bank Employment Report.
26 27 28 |
# File 'lib/the_plaid_api/models/credit_bank_employment_report.rb', line 26 def days_requested @days_requested end |
#generated_time ⇒ DateTime
The time when the Bank Employment Report was generated, in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (e.g. ā2018-04-12T03:32:11Zā).
21 22 23 |
# File 'lib/the_plaid_api/models/credit_bank_employment_report.rb', line 21 def generated_time @generated_time end |
#items ⇒ Array[CreditBankEmploymentItem]
The list of Items in the report along with the associated metadata about the Item.
31 32 33 |
# File 'lib/the_plaid_api/models/credit_bank_employment_report.rb', line 31 def items @items end |
#warnings ⇒ Array[CreditBankEmploymentWarning]
If data from the Bank Employment report was unable to be retrieved, the warnings will contain information about the error that caused the data to be incomplete.
37 38 39 |
# File 'lib/the_plaid_api/models/credit_bank_employment_report.rb', line 37 def warnings @warnings end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
74 75 76 77 78 79 80 81 82 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 117 118 119 120 |
# File 'lib/the_plaid_api/models/credit_bank_employment_report.rb', line 74 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. bank_employment_report_id = hash.key?('bank_employment_report_id') ? hash['bank_employment_report_id'] : nil generated_time = if hash.key?('generated_time') (DateTimeHelper.from_rfc3339(hash['generated_time']) if hash['generated_time']) end days_requested = hash.key?('days_requested') ? hash['days_requested'] : nil # Parameter is an array, so we need to iterate through it items = nil unless hash['items'].nil? items = [] hash['items'].each do |structure| items << (CreditBankEmploymentItem.from_hash(structure) if structure) end end items = nil unless hash.key?('items') # Parameter is an array, so we need to iterate through it warnings = nil unless hash['warnings'].nil? warnings = [] hash['warnings'].each do |structure| warnings << (CreditBankEmploymentWarning.from_hash(structure) if structure) end end warnings = nil unless hash.key?('warnings') # 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. CreditBankEmploymentReport.new(bank_employment_report_id: bank_employment_report_id, generated_time: generated_time, days_requested: days_requested, items: items, warnings: warnings, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
40 41 42 43 44 45 46 47 48 |
# File 'lib/the_plaid_api/models/credit_bank_employment_report.rb', line 40 def self.names @_hash = {} if @_hash.nil? @_hash['bank_employment_report_id'] = 'bank_employment_report_id' @_hash['generated_time'] = 'generated_time' @_hash['days_requested'] = 'days_requested' @_hash['items'] = 'items' @_hash['warnings'] = 'warnings' @_hash end |
.nullables ⇒ Object
An array for nullable fields
56 57 58 |
# File 'lib/the_plaid_api/models/credit_bank_employment_report.rb', line 56 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
51 52 53 |
# File 'lib/the_plaid_api/models/credit_bank_employment_report.rb', line 51 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
135 136 137 138 139 140 141 |
# File 'lib/the_plaid_api/models/credit_bank_employment_report.rb', line 135 def inspect class_name = self.class.name.split('::').last "<#{class_name} bank_employment_report_id: #{@bank_employment_report_id.inspect},"\ " generated_time: #{@generated_time.inspect}, days_requested: #{@days_requested.inspect},"\ " items: #{@items.inspect}, warnings: #{@warnings.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_custom_generated_time ⇒ Object
122 123 124 |
# File 'lib/the_plaid_api/models/credit_bank_employment_report.rb', line 122 def to_custom_generated_time DateTimeHelper.to_rfc3339(generated_time) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
127 128 129 130 131 132 |
# File 'lib/the_plaid_api/models/credit_bank_employment_report.rb', line 127 def to_s class_name = self.class.name.split('::').last "<#{class_name} bank_employment_report_id: #{@bank_employment_report_id}, generated_time:"\ " #{@generated_time}, days_requested: #{@days_requested}, items: #{@items}, warnings:"\ " #{@warnings}, additional_properties: #{@additional_properties}>" end |