Class: ThePlaidApi::LinkTokenCreateRequestCraOptionsIncomeInsights
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::LinkTokenCreateRequestCraOptionsIncomeInsights
- Defined in:
- lib/the_plaid_api/models/link_token_create_request_cra_options_income_insights.rb
Overview
Specifies options for initializing Link for use with the CRA Income Insights product.
Instance Attribute Summary collapse
-
#income_insights_filter ⇒ IncomeInsightsFilter
Filters the returned income streams based on the specified income categories.
-
#income_insights_version ⇒ String
readonly
The version of Income Insights to use.
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(income_insights_filter: SKIP, additional_properties: nil) ⇒ LinkTokenCreateRequestCraOptionsIncomeInsights
constructor
A new instance of LinkTokenCreateRequestCraOptionsIncomeInsights.
-
#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(income_insights_filter: SKIP, additional_properties: nil) ⇒ LinkTokenCreateRequestCraOptionsIncomeInsights
Returns a new instance of LinkTokenCreateRequestCraOptionsIncomeInsights.
59 60 61 62 63 64 65 66 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options_income_insights.rb', line 59 def initialize(income_insights_filter: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @income_insights_filter = income_insights_filter unless income_insights_filter == SKIP @income_insights_version = 'II2' @additional_properties = additional_properties end |
Instance Attribute Details
#income_insights_filter ⇒ IncomeInsightsFilter
Filters the returned income streams based on the specified income categories. If no filters are requested, streams from the following default set of categories are returned:
-
‘EARNED_INCOME.*` (`EARNED_INCOME.SALARY`, `EARNED_INCOME.GIG_ECONOMY`,
‘EARNED_INCOME.SELF_EMPLOYED`)
-
‘BENEFITS.DISABILITY`
-
‘RETIREMENT.*` (`RETIREMENT.GOVERNMENT_DERIVED`,
‘RETIREMENT.PRIVATE_RETIREMENT`, `RETIREMENT.PLAN_DISTRIBUTION`) The final list of income categories is generated by adding the `included_categories`, then removing the `excluded_categories`. Priority is given to `excluded_categories` in the case of collisions. Filter patterns supported:
-
‘*`: All categories
-
‘PRIMARY.*`: All categories within the specified primary category
-
‘PRIMARY.SECONDARY`: A specific income category
For a list of income categories, see the [Income V2 Category Taxonomy](plaid.com/documents/income-v2-category-taxonomy.csv).
31 32 33 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options_income_insights.rb', line 31 def income_insights_filter @income_insights_filter end |
#income_insights_version ⇒ String (readonly)
The version of Income Insights to use.
35 36 37 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options_income_insights.rb', line 35 def income_insights_version @income_insights_version end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options_income_insights.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. income_insights_filter = IncomeInsightsFilter.from_hash(hash['income_insights_filter']) if hash['income_insights_filter'] # 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. LinkTokenCreateRequestCraOptionsIncomeInsights.new(income_insights_filter: income_insights_filter, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options_income_insights.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['income_insights_filter'] = 'income_insights_filter' @_hash['income_insights_version'] = 'income_insights_version' @_hash end |
.nullables ⇒ Object
An array for nullable fields
53 54 55 56 57 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options_income_insights.rb', line 53 def self.nullables %w[ income_insights_filter ] end |
.optionals ⇒ Object
An array for optional fields
46 47 48 49 50 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options_income_insights.rb', line 46 def self.optionals %w[ income_insights_filter ] 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/link_token_create_request_cra_options_income_insights.rb', line 97 def inspect class_name = self.class.name.split('::').last "<#{class_name} income_insights_filter: #{@income_insights_filter.inspect},"\ " income_insights_version: #{@income_insights_version.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
89 90 91 92 93 94 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options_income_insights.rb', line 89 def to_s class_name = self.class.name.split('::').last "<#{class_name} income_insights_filter: #{@income_insights_filter},"\ " income_insights_version: #{@income_insights_version}, additional_properties:"\ " #{@additional_properties}>" end |