Class: ThePlaidApi::LinkTokenCreateRequestCraOptions
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::LinkTokenCreateRequestCraOptions
- Defined in:
- lib/the_plaid_api/models/link_token_create_request_cra_options.rb
Overview
Specifies options for initializing Link for use with Plaid Check products
Instance Attribute Summary collapse
-
#base_report ⇒ LinkTokenCreateRequestCraOptionsBaseReport
Specifies options for initializing Link for use with the Base Report product, specifically the ‘client_report_id`.
-
#cashflow_insights ⇒ LinkTokenCreateRequestCraOptionsCashflowInsights
Specifies options for initializing Link for use with the Cashflow Insights product.
-
#client_report_id ⇒ String
Client-generated identifier, which can be used by lenders to track loan applications.
-
#days_requested ⇒ Integer
The number of days of history to include in Plaid Check products.
-
#days_required ⇒ Integer
The minimum number of days of data required for the report to be successfully generated.
-
#include_investments ⇒ TrueClass | FalseClass
Indicates that investment data should be extracted from the linked account(s).
-
#income_insights ⇒ LinkTokenCreateRequestCraOptionsIncomeInsights
Specifies options for initializing Link for use with the CRA Income Insights product.
-
#lend_score ⇒ LinkTokenCreateRequestCraOptionsLendScore
Specifies options for initializing Link for use with the CRA LendScore product.
-
#network_insights ⇒ LinkTokenCreateRequestCraOptionsNetworkInsights
Specifies options for initializing Link for use with the CRA Network Insights product.
-
#partner_insights ⇒ LinkTokenCreateRequestCraOptionsPartnerInsights
Specifies options for initializing Link for use with the Credit Partner Insights product.
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(days_requested:, days_required: SKIP, client_report_id: SKIP, partner_insights: SKIP, base_report: SKIP, cashflow_insights: SKIP, lend_score: SKIP, network_insights: SKIP, include_investments: SKIP, income_insights: SKIP, additional_properties: nil) ⇒ LinkTokenCreateRequestCraOptions
constructor
A new instance of LinkTokenCreateRequestCraOptions.
-
#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(days_requested:, days_required: SKIP, client_report_id: SKIP, partner_insights: SKIP, base_report: SKIP, cashflow_insights: SKIP, lend_score: SKIP, network_insights: SKIP, include_investments: SKIP, income_insights: SKIP, additional_properties: nil) ⇒ LinkTokenCreateRequestCraOptions
Returns a new instance of LinkTokenCreateRequestCraOptions.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 102 def initialize(days_requested:, days_required: SKIP, client_report_id: SKIP, partner_insights: SKIP, base_report: SKIP, cashflow_insights: SKIP, lend_score: SKIP, network_insights: SKIP, include_investments: SKIP, income_insights: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @days_requested = days_requested @days_required = days_required unless days_required == SKIP @client_report_id = client_report_id unless client_report_id == SKIP @partner_insights = partner_insights unless partner_insights == SKIP @base_report = base_report unless base_report == SKIP @cashflow_insights = cashflow_insights unless cashflow_insights == SKIP @lend_score = lend_score unless lend_score == SKIP @network_insights = network_insights unless network_insights == SKIP @include_investments = include_investments unless include_investments == SKIP @income_insights = income_insights unless income_insights == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#base_report ⇒ LinkTokenCreateRequestCraOptionsBaseReport
Specifies options for initializing Link for use with the Base Report product, specifically the ‘client_report_id`.
36 37 38 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 36 def base_report @base_report end |
#cashflow_insights ⇒ LinkTokenCreateRequestCraOptionsCashflowInsights
Specifies options for initializing Link for use with the Cashflow Insights product.
41 42 43 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 41 def cashflow_insights @cashflow_insights end |
#client_report_id ⇒ String
Client-generated identifier, which can be used by lenders to track loan applications.
26 27 28 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 26 def client_report_id @client_report_id end |
#days_requested ⇒ Integer
The number of days of history to include in Plaid Check products. Maximum is 731; minimum is 180. If a value lower than 180 is provided, a minimum of 180 days of history will be requested.
16 17 18 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 16 def days_requested @days_requested end |
#days_required ⇒ Integer
The minimum number of days of data required for the report to be successfully generated.
21 22 23 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 21 def days_required @days_required end |
#include_investments ⇒ TrueClass | FalseClass
Indicates that investment data should be extracted from the linked account(s).
56 57 58 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 56 def include_investments @include_investments end |
#income_insights ⇒ LinkTokenCreateRequestCraOptionsIncomeInsights
Specifies options for initializing Link for use with the CRA Income Insights product.
61 62 63 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 61 def income_insights @income_insights end |
#lend_score ⇒ LinkTokenCreateRequestCraOptionsLendScore
Specifies options for initializing Link for use with the CRA LendScore product.
46 47 48 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 46 def lend_score @lend_score end |
#network_insights ⇒ LinkTokenCreateRequestCraOptionsNetworkInsights
Specifies options for initializing Link for use with the CRA Network Insights product.
51 52 53 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 51 def network_insights @network_insights end |
#partner_insights ⇒ LinkTokenCreateRequestCraOptionsPartnerInsights
Specifies options for initializing Link for use with the Credit Partner Insights product.
31 32 33 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 31 def partner_insights @partner_insights end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 124 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. days_requested = hash.key?('days_requested') ? hash['days_requested'] : nil days_required = hash.key?('days_required') ? hash['days_required'] : SKIP client_report_id = hash.key?('client_report_id') ? hash['client_report_id'] : SKIP if hash['partner_insights'] partner_insights = LinkTokenCreateRequestCraOptionsPartnerInsights.from_hash(hash['partner_insights']) end base_report = LinkTokenCreateRequestCraOptionsBaseReport.from_hash(hash['base_report']) if hash['base_report'] if hash['cashflow_insights'] cashflow_insights = LinkTokenCreateRequestCraOptionsCashflowInsights.from_hash(hash['cashflow_insights']) end lend_score = LinkTokenCreateRequestCraOptionsLendScore.from_hash(hash['lend_score']) if hash['lend_score'] if hash['network_insights'] network_insights = LinkTokenCreateRequestCraOptionsNetworkInsights.from_hash(hash['network_insights']) end include_investments = hash.key?('include_investments') ? hash['include_investments'] : SKIP if hash['income_insights'] income_insights = LinkTokenCreateRequestCraOptionsIncomeInsights.from_hash(hash['income_insights']) end # 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. LinkTokenCreateRequestCraOptions.new(days_requested: days_requested, days_required: days_required, client_report_id: client_report_id, partner_insights: partner_insights, base_report: base_report, cashflow_insights: cashflow_insights, lend_score: lend_score, network_insights: network_insights, include_investments: include_investments, income_insights: income_insights, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 64 def self.names @_hash = {} if @_hash.nil? @_hash['days_requested'] = 'days_requested' @_hash['days_required'] = 'days_required' @_hash['client_report_id'] = 'client_report_id' @_hash['partner_insights'] = 'partner_insights' @_hash['base_report'] = 'base_report' @_hash['cashflow_insights'] = 'cashflow_insights' @_hash['lend_score'] = 'lend_score' @_hash['network_insights'] = 'network_insights' @_hash['include_investments'] = 'include_investments' @_hash['income_insights'] = 'income_insights' @_hash end |
.nullables ⇒ Object
An array for nullable fields
95 96 97 98 99 100 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 95 def self.nullables %w[ client_report_id include_investments ] end |
.optionals ⇒ Object
An array for optional fields
80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 80 def self.optionals %w[ days_required client_report_id partner_insights base_report cashflow_insights lend_score network_insights include_investments income_insights ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
185 186 187 188 189 190 191 192 193 194 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 185 def inspect class_name = self.class.name.split('::').last "<#{class_name} days_requested: #{@days_requested.inspect}, days_required:"\ " #{@days_required.inspect}, client_report_id: #{@client_report_id.inspect},"\ " partner_insights: #{@partner_insights.inspect}, base_report: #{@base_report.inspect},"\ " cashflow_insights: #{@cashflow_insights.inspect}, lend_score: #{@lend_score.inspect},"\ " network_insights: #{@network_insights.inspect}, include_investments:"\ " #{@include_investments.inspect}, income_insights: #{@income_insights.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
174 175 176 177 178 179 180 181 182 |
# File 'lib/the_plaid_api/models/link_token_create_request_cra_options.rb', line 174 def to_s class_name = self.class.name.split('::').last "<#{class_name} days_requested: #{@days_requested}, days_required: #{@days_required},"\ " client_report_id: #{@client_report_id}, partner_insights: #{@partner_insights},"\ " base_report: #{@base_report}, cashflow_insights: #{@cashflow_insights}, lend_score:"\ " #{@lend_score}, network_insights: #{@network_insights}, include_investments:"\ " #{@include_investments}, income_insights: #{@income_insights}, additional_properties:"\ " #{@additional_properties}>" end |