Class: ThePlaidApi::IncomeSummaryFieldNumber
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::IncomeSummaryFieldNumber
- Defined in:
- lib/the_plaid_api/models/income_summary_field_number.rb
Overview
Field number for income summary
Instance Attribute Summary collapse
-
#value ⇒ Float
The value of the field.
-
#verification_status ⇒ VerificationStatus
The verification status.
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(value:, verification_status:, additional_properties: nil) ⇒ IncomeSummaryFieldNumber
constructor
A new instance of IncomeSummaryFieldNumber.
-
#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(value:, verification_status:, additional_properties: nil) ⇒ IncomeSummaryFieldNumber
Returns a new instance of IncomeSummaryFieldNumber.
45 46 47 48 49 50 51 52 |
# File 'lib/the_plaid_api/models/income_summary_field_number.rb', line 45 def initialize(value:, verification_status:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @value = value @verification_status = verification_status @additional_properties = additional_properties end |
Instance Attribute Details
#value ⇒ Float
The value of the field.
14 15 16 |
# File 'lib/the_plaid_api/models/income_summary_field_number.rb', line 14 def value @value end |
#verification_status ⇒ VerificationStatus
The verification status. One of the following: ‘“VERIFIED”`: The information was successfully verified. `“UNVERIFIED”`: The verification has not yet been performed. `“NEEDS_INFO”`: The verification was attempted but could not be completed due to missing information. “`UNABLE_TO_VERIFY`”: The verification was performed and the information could not be verified. `“UNKNOWN”`: The verification status is unknown.
25 26 27 |
# File 'lib/the_plaid_api/models/income_summary_field_number.rb', line 25 def verification_status @verification_status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/the_plaid_api/models/income_summary_field_number.rb', line 55 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. value = hash.key?('value') ? hash['value'] : nil verification_status = hash.key?('verification_status') ? hash['verification_status'] : 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. IncomeSummaryFieldNumber.new(value: value, verification_status: verification_status, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 |
# File 'lib/the_plaid_api/models/income_summary_field_number.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['value'] = 'value' @_hash['verification_status'] = 'verification_status' @_hash end |
.nullables ⇒ Object
An array for nullable fields
41 42 43 |
# File 'lib/the_plaid_api/models/income_summary_field_number.rb', line 41 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 |
# File 'lib/the_plaid_api/models/income_summary_field_number.rb', line 36 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
84 85 86 87 88 |
# File 'lib/the_plaid_api/models/income_summary_field_number.rb', line 84 def inspect class_name = self.class.name.split('::').last "<#{class_name} value: #{@value.inspect}, verification_status:"\ " #{@verification_status.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
77 78 79 80 81 |
# File 'lib/the_plaid_api/models/income_summary_field_number.rb', line 77 def to_s class_name = self.class.name.split('::').last "<#{class_name} value: #{@value}, verification_status: #{@verification_status},"\ " additional_properties: #{@additional_properties}>" end |