Class: ThePlaidApi::CraCashflowInsightsReport
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::CraCashflowInsightsReport
- Defined in:
- lib/the_plaid_api/models/cra_cashflow_insights_report.rb
Overview
Contains data for the CRA Cashflow Insights Report.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
A map of cash flow attributes, where the key is a string, and the value is a float, int, or boolean.
-
#generated_time ⇒ DateTime
The time when the report was generated.
-
#report_id ⇒ String
The unique identifier associated with the report object.
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(report_id:, generated_time:, attributes: SKIP, additional_properties: nil) ⇒ CraCashflowInsightsReport
constructor
A new instance of CraCashflowInsightsReport.
-
#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(report_id:, generated_time:, attributes: SKIP, additional_properties: nil) ⇒ CraCashflowInsightsReport
Returns a new instance of CraCashflowInsightsReport.
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/the_plaid_api/models/cra_cashflow_insights_report.rb', line 49 def initialize(report_id:, generated_time:, attributes: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @report_id = report_id @generated_time = generated_time @attributes = attributes unless attributes == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#attributes ⇒ Object
A map of cash flow attributes, where the key is a string, and the value is a float, int, or boolean. The specific list of attributes will depend on the cash flow attributes version used. For a full list of attributes, contact your account manager.
26 27 28 |
# File 'lib/the_plaid_api/models/cra_cashflow_insights_report.rb', line 26 def attributes @attributes end |
#generated_time ⇒ DateTime
The time when the report was generated.
19 20 21 |
# File 'lib/the_plaid_api/models/cra_cashflow_insights_report.rb', line 19 def generated_time @generated_time end |
#report_id ⇒ String
The unique identifier associated with the report object.
15 16 17 |
# File 'lib/the_plaid_api/models/cra_cashflow_insights_report.rb', line 15 def report_id @report_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/the_plaid_api/models/cra_cashflow_insights_report.rb', line 61 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. report_id = hash.key?('report_id') ? hash['report_id'] : nil generated_time = if hash.key?('generated_time') (DateTimeHelper.from_rfc3339(hash['generated_time']) if hash['generated_time']) end attributes = hash.key?('attributes') ? hash['attributes'] : 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. CraCashflowInsightsReport.new(report_id: report_id, generated_time: generated_time, attributes: attributes, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 |
# File 'lib/the_plaid_api/models/cra_cashflow_insights_report.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['report_id'] = 'report_id' @_hash['generated_time'] = 'generated_time' @_hash['attributes'] = 'attributes' @_hash end |
.nullables ⇒ Object
An array for nullable fields
45 46 47 |
# File 'lib/the_plaid_api/models/cra_cashflow_insights_report.rb', line 45 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
38 39 40 41 42 |
# File 'lib/the_plaid_api/models/cra_cashflow_insights_report.rb', line 38 def self.optionals %w[ attributes ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
97 98 99 100 101 102 |
# File 'lib/the_plaid_api/models/cra_cashflow_insights_report.rb', line 97 def inspect class_name = self.class.name.split('::').last "<#{class_name} report_id: #{@report_id.inspect}, generated_time:"\ " #{@generated_time.inspect}, attributes: #{@attributes.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_custom_generated_time ⇒ Object
85 86 87 |
# File 'lib/the_plaid_api/models/cra_cashflow_insights_report.rb', line 85 def to_custom_generated_time DateTimeHelper.to_rfc3339(generated_time) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
90 91 92 93 94 |
# File 'lib/the_plaid_api/models/cra_cashflow_insights_report.rb', line 90 def to_s class_name = self.class.name.split('::').last "<#{class_name} report_id: #{@report_id}, generated_time: #{@generated_time}, attributes:"\ " #{@attributes}, additional_properties: #{@additional_properties}>" end |