Class: ThePlaidApi::LinkTokenCreateRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/the_plaid_api/models/link_token_create_request.rb

Overview

LinkTokenCreateRequest defines the request schema for ‘/link/token/create`

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(client_name:, language:, country_codes:, client_id: SKIP, secret: SKIP, user: SKIP, user_id: SKIP, products: SKIP, required_if_supported_products: SKIP, optional_products: SKIP, additional_consented_products: SKIP, webhook: SKIP, access_token: SKIP, access_tokens: SKIP, link_customization_name: SKIP, appearance_mode: SKIP, redirect_uri: SKIP, android_package_name: SKIP, institution_data: SKIP, card_switch: SKIP, account_filters: SKIP, eu_config: SKIP, institution_id: SKIP, payment_configuration: SKIP, payment_initiation: SKIP, employment: SKIP, income_verification: SKIP, base_report: SKIP, credit_partner_insights: SKIP, cra_options: SKIP, consumer_report_permissible_purpose: SKIP, auth: SKIP, transfer: SKIP, update: SKIP, identity_verification: SKIP, statements: SKIP, third_party_user_token: SKIP, investments: SKIP, investments_auth: SKIP, hosted_link: SKIP, transactions: SKIP, cashflow_report: SKIP, cra_enabled: SKIP, identity: SKIP, financekit_supported: SKIP, enable_multi_item_link: SKIP, user_token: SKIP, additional_properties: nil) ⇒ LinkTokenCreateRequest

Returns a new instance of LinkTokenCreateRequest.



566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 566

def initialize(client_name:, language:, country_codes:, client_id: SKIP,
               secret: SKIP, user: SKIP, user_id: SKIP, products: SKIP,
               required_if_supported_products: SKIP,
               optional_products: SKIP, additional_consented_products: SKIP,
               webhook: SKIP, access_token: SKIP, access_tokens: SKIP,
               link_customization_name: SKIP, appearance_mode: SKIP,
               redirect_uri: SKIP, android_package_name: SKIP,
               institution_data: SKIP, card_switch: SKIP,
               account_filters: SKIP, eu_config: SKIP, institution_id: SKIP,
               payment_configuration: SKIP, payment_initiation: SKIP,
               employment: SKIP, income_verification: SKIP,
               base_report: SKIP, credit_partner_insights: SKIP,
               cra_options: SKIP, consumer_report_permissible_purpose: SKIP,
               auth: SKIP, transfer: SKIP, update: SKIP,
               identity_verification: SKIP, statements: SKIP,
               third_party_user_token: SKIP, investments: SKIP,
               investments_auth: SKIP, hosted_link: SKIP,
               transactions: SKIP, cashflow_report: SKIP, cra_enabled: SKIP,
               identity: SKIP, financekit_supported: SKIP,
               enable_multi_item_link: SKIP, user_token: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @client_id = client_id unless client_id == SKIP
  @secret = secret unless secret == SKIP
  @client_name = client_name
  @language = language
  @country_codes = country_codes
  @user = user unless user == SKIP
  @user_id = user_id unless user_id == SKIP
  @products = products unless products == SKIP
  unless required_if_supported_products == SKIP
    @required_if_supported_products =
      required_if_supported_products
  end
  @optional_products = optional_products unless optional_products == SKIP
  unless additional_consented_products == SKIP
    @additional_consented_products =
      additional_consented_products
  end
  @webhook = webhook unless webhook == SKIP
  @access_token = access_token unless access_token == SKIP
  @access_tokens = access_tokens unless access_tokens == SKIP
  @link_customization_name = link_customization_name unless link_customization_name == SKIP
  @appearance_mode = appearance_mode unless appearance_mode == SKIP
  @redirect_uri = redirect_uri unless redirect_uri == SKIP
  @android_package_name = android_package_name unless android_package_name == SKIP
  @institution_data = institution_data unless institution_data == SKIP
  @card_switch = card_switch unless card_switch == SKIP
  @account_filters =  unless  == SKIP
  @eu_config = eu_config unless eu_config == SKIP
  @institution_id = institution_id unless institution_id == SKIP
  @payment_configuration = payment_configuration unless payment_configuration == SKIP
  @payment_initiation = payment_initiation unless payment_initiation == SKIP
  @employment = employment unless employment == SKIP
  @income_verification = income_verification unless income_verification == SKIP
  @base_report = base_report unless base_report == SKIP
  @credit_partner_insights = credit_partner_insights unless credit_partner_insights == SKIP
  @cra_options = cra_options unless cra_options == SKIP
  unless consumer_report_permissible_purpose == SKIP
    @consumer_report_permissible_purpose =
      consumer_report_permissible_purpose
  end
  @auth = auth unless auth == SKIP
  @transfer = transfer unless transfer == SKIP
  @update = update unless update == SKIP
  @identity_verification = identity_verification unless identity_verification == SKIP
  @statements = statements unless statements == SKIP
  @third_party_user_token = third_party_user_token unless third_party_user_token == SKIP
  @investments = investments unless investments == SKIP
  @investments_auth = investments_auth unless investments_auth == SKIP
  @hosted_link = hosted_link unless hosted_link == SKIP
  @transactions = transactions unless transactions == SKIP
  @cashflow_report = cashflow_report unless cashflow_report == SKIP
  @cra_enabled = cra_enabled unless cra_enabled == SKIP
  @identity = identity unless identity == SKIP
  @financekit_supported = financekit_supported unless financekit_supported == SKIP
  @enable_multi_item_link = enable_multi_item_link unless enable_multi_item_link == SKIP
  @user_token = user_token unless user_token == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#access_tokenString

The ‘access_token` associated with the Item to update or reference, used when updating, modifying, or accessing an existing `access_token`. Used when launching Link in update mode, when completing the Same-day (manual) Micro-deposit flow, or (optionally) when initializing Link for a returning user as part of the Transfer UI flow.

Returns:

  • (String)


205
206
207
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 205

def access_token
  @access_token
end

#access_tokensArray[String]

A list of access tokens associated with the items to update in Link update mode for the Assets product. Using this instead of the ‘access_token` field allows the updating of multiple items at once. This feature is in closed beta, please contact your account manager for more info.

Returns:

  • (Array[String])


212
213
214
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 212

def access_tokens
  @access_tokens
end

#account_filtersLinkTokenAccountFilters

By default, Link will provide limited account filtering: it will only display Institutions that are compatible with all products supplied in the ‘products` parameter of `/link/token/create`, and, if `auth` is specified in the `products` array, will also filter out accounts other than `checking`, `savings`, and `cash management` accounts on the Account Select pane. You can further limit the accounts shown in Link by using `account_filters` to specify the account subtypes to be shown in Link. Only the specified subtypes will be shown. This filtering applies to both the Account Select view (if enabled) and the Institution Select view. Institutions that do not support the selected subtypes will be omitted from Link. To indicate that all subtypes should be shown, use the value `“all”`. If the `account_filters` filter is used, any account type for which a filter is not specified will be entirely omitted from Link. For a full list of valid types and subtypes, see the [Account schema](plaid.com/docs/api/accounts#account-type-schema). The filter may or may not impact the list of accounts shown by the institution in the OAuth account selection flow, depending on the specific institution. If the user selects excluded account subtypes in the OAuth flow, these accounts will not be added to the Item. If the user selects only excluded account subtypes, the link attempt will fail and the user will be prompted to try again.



281
282
283
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 281

def 
  @account_filters
end

#additional_consented_productsArray[Products]

List of additional Plaid product(s) you wish to collect consent for to support your use case. These products will not be billed until you start using them by calling the relevant endpoints. ‘balance` is not a valid value, the Balance product does not require explicit initialization and will automatically have consent collected. Institutions that do not support these products will still be shown in Link. There should be no overlap between this array and the `products` or `required_if_supported_products` arrays. If you include `signal` in `additional_consented_products`, you will need to call [`/signal/prepare`](plaid.com/docs/api/products/signal/#signalprep are) before calling `/signal/evaluate` for the first time on an Item in order to get the most accurate results. For more details, see [`/signal/prepare`](plaid.com/docs/api/products/signal/#signalprep are).

Returns:



187
188
189
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 187

def additional_consented_products
  @additional_consented_products
end

#android_package_nameString

The name of your app’s Android package. Required if using the ‘link_token` to initialize Link on Android. Any package name specified here must also be added to the Allowed Android package names setting on the [developer dashboard](dashboard.plaid.com/team/api). When creating a `link_token` for initializing Link on other platforms, `android_package_name` must be left blank and `redirect_uri` should be used instead.

Returns:

  • (String)


249
250
251
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 249

def android_package_name
  @android_package_name
end

#appearance_modeLinkTokenCreateRequestAppearanceMode

Enum representing the desired appearance mode for Link, used to force light or dark modes or set Link to change depending on user system settings. Currently in closed beta.



227
228
229
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 227

def appearance_mode
  @appearance_mode
end

#authLinkTokenCreateRequestAuth

Specifies options for initializing Link for use with the Auth product. This field can be used to enable or disable extended Auth flows for the resulting Link session. Omitting any field will result in a default that can be configured by your account manager. The default behavior described in the documentation is the default behavior that will apply if you have not requested your account manager to apply a different default. If you have enabled the [Dashboard Account Verification pane](dashboard.plaid.com/account-verification), the settings enabled there will override any settings in this object.



376
377
378
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 376

def auth
  @auth
end

#base_reportLinkTokenCreateRequestBaseReport

Specifies options for initializing Link for use with the Base Report product. This field is required if ‘assets` is included in the `products` array and the client is CRA-enabled.



320
321
322
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 320

def base_report
  @base_report
end

#card_switchLinkTokenCreateCardSwitch

A map containing data to pass in for the Card Switch flow.



257
258
259
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 257

def card_switch
  @card_switch
end

#cashflow_reportLinkTokenCashflowReport

Configuration parameters for the Cashflow Report product. Currently in closed beta.



421
422
423
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 421

def cashflow_report
  @cashflow_report
end

#client_idString

Your Plaid API ‘client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.

Returns:

  • (String)


16
17
18
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 16

def client_id
  @client_id
end

#client_nameString

The name of your application, as it should be displayed in Link. Maximum length of 30 characters. If a value longer than 30 characters is provided, Link will display “This Application” instead.

Returns:

  • (String)


27
28
29
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 27

def client_name
  @client_name
end

#consumer_report_permissible_purposeConsumerReportPermissiblePurpose

Describes the reason you are generating a Consumer Report for this user. When calling ‘/link/token/create`, this field is required when using Plaid Check (CRA) products; invalid if not using Plaid Check (CRA) products. `ACCOUNT_REVIEW_CREDIT`: In connection with a consumer credit transaction for the review or collection of an account pursuant to FCRA Section 604(a)(3)(A). `ACCOUNT_REVIEW_NON_CREDIT`: For a legitimate business need of the information to review a non-credit account provided primarily for personal, family, or household purposes to determine whether the consumer continues to meet the terms of the account pursuant to FCRA Section 604(a)(3)(F)(2). `EXTENSION_OF_CREDIT`: In connection with a credit transaction initiated by and involving the consumer pursuant to FCRA Section 604(a)(3)(A). `LEGITIMATE_BUSINESS_NEED_TENANT_SCREENING`: For a legitimate business need in connection with a business transaction initiated by the consumer primarily for personal, family, or household purposes in connection with a property rental assessment pursuant to FCRA Section 604(a)(3)(F)(i). `LEGITIMATE_BUSINESS_NEED_OTHER`: For a legitimate business need in connection with a business transaction made primarily for personal, family, or household initiated by the consumer pursuant to FCRA Section 604(a)(3)(F)(i). `WRITTEN_INSTRUCTION_PREQUALIFICATION`: In accordance with the written instructions of the consumer pursuant to FCRA Section 604(a)(2), to evaluate an application’s profile to make an offer to the consumer. `WRITTEN_INSTRUCTION_OTHER`: In accordance with the written instructions of the consumer pursuant to FCRA Section 604(a)(2), such as when an individual agrees to act as a guarantor or assumes personal liability for a consumer, business, or commercial loan. `ELIGIBILITY_FOR_GOVT_BENEFITS`: In connection with an eligibility determination for a government benefit where the entity is required to consider an applicant’s financial status pursuant to FCRA Section 604(a)(3)(D).



364
365
366
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 364

def consumer_report_permissible_purpose
  @consumer_report_permissible_purpose
end

#country_codesArray[CountryCode]

Specify an array of Plaid-supported country codes using the ISO-3166-1 alpha-2 country code standard. Institutions from all listed countries will be shown. For a complete mapping of supported products by country, see plaid.com/global/. For access to additional countries beyond what you have been approved for, [contact Sales](plaid.com/contact/), your account manager, or support. If using Identity Verification, ‘country_codes` should be set to the country where your company is based, not the country where your user is located. For all other products, `country_codes` represents the location of your user’s financial institution. If Link is launched with multiple country codes, only products that you are enabled for in all countries will be used by Link. While all countries are enabled by default in Sandbox, in Production only the countries you have requested access for are shown. To request access to additional countries, [file a product access Support ticket](dashboard.plaid.com/support/new/product-and-development/pr oduct-troubleshooting/request-product-access) via the Plaid dashboard. If using a Link customization, make sure the country codes in the customization match those specified in ‘country_codes`, or the customization may not be applied. If using the Auth features Instant Match, Instant Micro-deposits, Same-day Micro-deposits, Automated Micro-deposits, or Database Auth, `country_codes` must be set to `[’US’]‘.

Returns:



82
83
84
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 82

def country_codes
  @country_codes
end

#cra_enabledTrueClass | FalseClass

If ‘true`, request a CRA connection. Defaults to `false`.

Returns:

  • (TrueClass | FalseClass)


425
426
427
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 425

def cra_enabled
  @cra_enabled
end

#cra_optionsLinkTokenCreateRequestCraOptions

Specifies options for initializing Link for use with Plaid Check products



329
330
331
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 329

def cra_options
  @cra_options
end

#credit_partner_insightsLinkTokenCreateRequestCreditPartnerInsights

Specifies options for initializing Link for use with the Credit Partner Insights product.



325
326
327
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 325

def credit_partner_insights
  @credit_partner_insights
end

#employmentLinkTokenCreateRequestEmployment

Specifies options for initializing Link for use with the Employment product. This field is required if ‘employment` is included in the `products` array.



308
309
310
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 308

def employment
  @employment
end

If ‘true`, enable linking multiple items in the same Link session. Defaults to `false`.

Returns:

  • (TrueClass | FalseClass)


439
440
441
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 439

def enable_multi_item_link
  @enable_multi_item_link
end

#eu_configLinkTokenEuConfig

Configuration parameters for EU flows

Returns:



285
286
287
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 285

def eu_config
  @eu_config
end

#financekit_supportedTrueClass | FalseClass

If ‘true`, indicates that client supports linking FinanceKit / AppleCard items. Defaults to `false`.

Returns:

  • (TrueClass | FalseClass)


434
435
436
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 434

def financekit_supported
  @financekit_supported
end

Configuration parameters for Hosted Link. To enable the session for Hosted Link, send this object in the request. It can be empty.



412
413
414
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 412

def hosted_link
  @hosted_link
end

#identityLinkTokenCreateIdentity

Identity object used to specify document upload



429
430
431
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 429

def identity
  @identity
end

#identity_verificationLinkTokenCreateRequestIdentityVerification

Specifies option for initializing Link for use with the Identity Verification product.



390
391
392
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 390

def identity_verification
  @identity_verification
end

#income_verificationLinkTokenCreateRequestIncomeVerification

Specifies options for initializing Link for use with the Income product. This field is required if ‘income_verification` is included in the `products` array.



314
315
316
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 314

def income_verification
  @income_verification
end

#institution_dataLinkTokenCreateInstitutionData

A map containing data used to highlight institutions in Link.



253
254
255
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 253

def institution_data
  @institution_data
end

#institution_idString

Used for certain legacy use cases

Returns:

  • (String)


289
290
291
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 289

def institution_id
  @institution_id
end

#investmentsLinkTokenInvestments

Configuration parameters for the Investments product



403
404
405
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 403

def investments
  @investments
end

#investments_authLinkTokenInvestmentsAuth

Configuration parameters for the Investments Move product



407
408
409
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 407

def investments_auth
  @investments_auth
end

#languageString

The language that Link should be displayed in. When initializing with Identity Verification, this field is not used; for more details, see [Identity Verification supported languages](plaid.com/docs/identity-verification/#supported-languag es). Supported languages are:

  • Danish (‘’da’‘)

  • Dutch (‘’nl’‘)

  • English (‘’en’‘)

  • Estonian (‘’et’‘)

  • French (‘’fr’‘)

  • German (‘’de’‘)

  • Hindi (‘’hi’‘)

  • Italian (‘’it’‘)

  • Latvian (‘’lv’‘)

  • Lithuanian (‘’lt’‘)

  • Norwegian (‘’no’‘)

  • Polish (‘’pl’‘)

  • Portuguese (‘’pt’‘)

  • Romanian (‘’ro’‘)

  • Spanish (‘’es’‘)

  • Swedish (‘’sv’‘)

  • Vietnamese (‘’vi’‘)

When using a Link customization, the language configured here must match the setting in the customization, or the customization will not be applied.

Returns:

  • (String)


56
57
58
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 56

def language
  @language
end

The name of the Link customization from the Plaid Dashboard to be applied to Link. If not specified, the ‘default` customization will be used. When using a Link customization, the language in the customization must match the language selected via the `language` parameter, and the countries in the customization should match the country codes selected via `country_codes`.

Returns:

  • (String)


221
222
223
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 221

def link_customization_name
  @link_customization_name
end

#optional_productsArray[Products]

List of Plaid product(s) that will enhance the consumer’s use case, but that your app can function without. Plaid will attempt to fetch data for these products on a best-effort basis, and failure to support these products will not affect Item creation. There should be no overlap between this array and the ‘products`, `required_if_supported_products`, or `additional_consented_products` arrays. The `products` array must have at least one product. For more details on using this feature, see [Optional Products](plaid.com/docs/link/initializing-products/#optional-prod ucts).

Returns:



168
169
170
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 168

def optional_products
  @optional_products
end

#payment_configurationLinkTokenCreateRequestPaymentConfiguration

Specifies options for initializing Link for use with the Pay By Bank flow. This is an optional field to configure the user experience, and currently requires the amount field to be set.



295
296
297
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 295

def payment_configuration
  @payment_configuration
end

#payment_initiationLinkTokenCreateRequestPaymentInitiation

Specifies options for initializing Link for use with the Payment Initiation (Europe) product. This field is required if ‘payment_initiation` is included in the `products` array. Either `payment_id` or `consent_id` must be provided.



302
303
304
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 302

def payment_initiation
  @payment_initiation
end

#productsArray[Products]

List of Plaid product(s) that the linked Item must support. If launching Link in update mode, should be omitted (unless you are using update mode to add a credit product, such as Assets, Statements, Income, or Plaid Check Consumer Report, to an existing Item); at least one ‘product` is required otherwise. To maximize the number of institutions and accounts available, initialize Link with the minimal product set required for your use case, as the products specified will limit which institutions and account types will be available to your users in Link. Only institutions that support all requested products can be selected; if a user attempts to select an institution that does not support a listed product, a “Connectivity not supported” error message will appear in Link. For each specified product, the Item connected by the user must contain at least one compatible account. For details on compatible product / account type combinations, see [the account type/product support matrix](plaid.com/docs/api/accounts/#account-type–product-support -matrix). To add products without limiting the institution list or account types, use the [`optional_products`](plaid.com/docs/api/link/#link-token-create-r equest-optional-products) or [`required_if_supported_products`](plaid.com/docs/api/link/#link-t oken-create-request-required-if-supported-products) fields. Products can also be added to an Item by calling the product endpoint after obtaining an access token; this may require the product to be listed in the [`additional_consented_products`](plaid.com/docs/api/link/#link-to ken-create-request-additional-consented-products) array. For details, see [Choosing when to initialize products](plaid.com/docs/link/initializing-products/). `balance` is not a valid value, the Balance product does not require explicit initialization and will automatically be initialized when any other product is initialized. If launching Link with CRA products, `cra_base_reports` is required and must be included in the `products` array. Note that, unless you have opted to disable Instant Match support, institutions that support Instant Match will also be shown in Link if `auth` is specified as a product, even though these institutions do not contain `auth` in their product array. In Production, you will be billed for each product that you specify when initializing Link. Note that a product cannot be removed from an Item once the Item has been initialized with that product. To stop billing on an Item for subscription-based products, such as Liabilities, Investments, and Transactions, remove the Item via `/item/remove`.

Returns:



141
142
143
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 141

def products
  @products
end

#redirect_uriString

A URI indicating the destination where a user should be forwarded after completing the Link flow; used to support OAuth authentication flows when launching Link in the browser or another app. The ‘redirect_uri` should not contain any query parameters. When used in Production, must be an https URI. Note that any redirect URI must also be added to the Allowed redirect URIs list in the [developer dashboard](dashboard.plaid.com/team/api). If initializing on Android, `android_package_name` must be specified instead and `redirect_uri` should be left blank.

Returns:

  • (String)


239
240
241
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 239

def redirect_uri
  @redirect_uri
end

#required_if_supported_productsArray[Products]

List of Plaid product(s) you wish to use only if the institution and account(s) selected by the user support the product. Institutions that do not support these products will still be shown in Link. The products will only be extracted and billed if the user selects an institution and account type that supports them. There should be no overlap between this array and the ‘products`, `optional_products`, or `additional_consented_products` arrays. The `products` array must have at least one product. For more details on using this feature, see [Required if Supported Products](plaid.com/docs/link/initializing-products/#required-if-s upported-products).

Returns:



155
156
157
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 155

def required_if_supported_products
  @required_if_supported_products
end

#secretString

Your Plaid API ‘secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

Returns:

  • (String)


21
22
23
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 21

def secret
  @secret
end

#statementsLinkTokenCreateRequestStatements

Specifies options for initializing Link for use with the Statements product. This field is required for the statements product.



395
396
397
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 395

def statements
  @statements
end

#third_party_user_tokenString

A third party user token associated with the current user.

Returns:

  • (String)


399
400
401
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 399

def third_party_user_token
  @third_party_user_token
end

#transactionsLinkTokenTransactions

Configuration parameters for the Transactions product



416
417
418
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 416

def transactions
  @transactions
end

#transferLinkTokenCreateRequestTransfer

Specifies options for initializing Link for use with the Transfer product.



380
381
382
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 380

def transfer
  @transfer
end

#updateLinkTokenCreateRequestUpdate

Specifies options for initializing Link for [update mode](plaid.com/docs/link/update-mode).



385
386
387
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 385

def update
  @update
end

#userLinkTokenCreateRequestUser

An object specifying information about the end user who will be linking their account. Required if ‘user_id` isn’t included.



87
88
89
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 87

def user
  @user
end

#user_idString

A ‘user_id` generated using `/user/create`. Required for integrations that began using Plaid Protect, Multi-Item Link, or Plaid Check Consumer Report after December 10, 2025. For more details, see [new User APIs](plaid.com/docs/api/users/user-apis). One of either the `user_id` or the `user` field is required.

Returns:

  • (String)


95
96
97
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 95

def user_id
  @user_id
end

#user_tokenString

A user token generated using ‘/user/create`. Any Item created during the Link session will be associated with the user. Integrations that began using Plaid Protect, Multi-Item Link, or Plaid Check Consumer Report before December 10, 2025 use this field instead of the `user_id`.

Returns:

  • (String)


446
447
448
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 446

def user_token
  @user_token
end

#webhookString

The destination URL to which any webhooks should be sent. Note that webhooks for Payment Initiation (e-wallet transactions only), Transfer, Bank Transfer (including Auth micro-deposit notification webhooks), Monitor, and Identity Verification are configured via the Dashboard instead. In update mode, this field will not have an effect; to update the webhook receiver endpoint for an existing Item, use ‘/item/webhook/update` instead.

Returns:

  • (String)


197
198
199
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 197

def webhook
  @webhook
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 650

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  client_name = hash.key?('client_name') ? hash['client_name'] : nil
  language = hash.key?('language') ? hash['language'] : nil
  country_codes = hash.key?('country_codes') ? hash['country_codes'] : nil
  client_id = hash.key?('client_id') ? hash['client_id'] : SKIP
  secret = hash.key?('secret') ? hash['secret'] : SKIP
  user = LinkTokenCreateRequestUser.from_hash(hash['user']) if hash['user']
  user_id = hash.key?('user_id') ? hash['user_id'] : SKIP
  products = hash.key?('products') ? hash['products'] : SKIP
  required_if_supported_products =
    hash.key?('required_if_supported_products') ? hash['required_if_supported_products'] : SKIP
  optional_products =
    hash.key?('optional_products') ? hash['optional_products'] : SKIP
  additional_consented_products =
    hash.key?('additional_consented_products') ? hash['additional_consented_products'] : SKIP
  webhook = hash.key?('webhook') ? hash['webhook'] : SKIP
  access_token = hash.key?('access_token') ? hash['access_token'] : SKIP
  access_tokens = hash.key?('access_tokens') ? hash['access_tokens'] : SKIP
  link_customization_name =
    hash.key?('link_customization_name') ? hash['link_customization_name'] : SKIP
  appearance_mode =
    hash.key?('appearance_mode') ? hash['appearance_mode'] : SKIP
  redirect_uri = hash.key?('redirect_uri') ? hash['redirect_uri'] : SKIP
  android_package_name =
    hash.key?('android_package_name') ? hash['android_package_name'] : SKIP
  institution_data = LinkTokenCreateInstitutionData.from_hash(hash['institution_data']) if
    hash['institution_data']
  card_switch = LinkTokenCreateCardSwitch.from_hash(hash['card_switch']) if
    hash['card_switch']
   = LinkTokenAccountFilters.from_hash(hash['account_filters']) if
    hash['account_filters']
  eu_config = LinkTokenEuConfig.from_hash(hash['eu_config']) if hash['eu_config']
  institution_id =
    hash.key?('institution_id') ? hash['institution_id'] : SKIP
  if hash['payment_configuration']
    payment_configuration = LinkTokenCreateRequestPaymentConfiguration.from_hash(hash['payment_configuration'])
  end
  if hash['payment_initiation']
    payment_initiation = LinkTokenCreateRequestPaymentInitiation.from_hash(hash['payment_initiation'])
  end
  employment = LinkTokenCreateRequestEmployment.from_hash(hash['employment']) if
    hash['employment']
  if hash['income_verification']
    income_verification = LinkTokenCreateRequestIncomeVerification.from_hash(hash['income_verification'])
  end
  base_report = LinkTokenCreateRequestBaseReport.from_hash(hash['base_report']) if
    hash['base_report']
  if hash['credit_partner_insights']
    credit_partner_insights = LinkTokenCreateRequestCreditPartnerInsights.from_hash(hash['credit_partner_insights'])
  end
  cra_options = LinkTokenCreateRequestCraOptions.from_hash(hash['cra_options']) if
    hash['cra_options']
  consumer_report_permissible_purpose =
    hash.key?('consumer_report_permissible_purpose') ? hash['consumer_report_permissible_purpose'] : SKIP
  auth = LinkTokenCreateRequestAuth.from_hash(hash['auth']) if hash['auth']
  transfer = LinkTokenCreateRequestTransfer.from_hash(hash['transfer']) if hash['transfer']
  update = LinkTokenCreateRequestUpdate.from_hash(hash['update']) if hash['update']
  if hash['identity_verification']
    identity_verification = LinkTokenCreateRequestIdentityVerification.from_hash(hash['identity_verification'])
  end
  statements = LinkTokenCreateRequestStatements.from_hash(hash['statements']) if
    hash['statements']
  third_party_user_token =
    hash.key?('third_party_user_token') ? hash['third_party_user_token'] : SKIP
  investments = LinkTokenInvestments.from_hash(hash['investments']) if hash['investments']
  investments_auth = LinkTokenInvestmentsAuth.from_hash(hash['investments_auth']) if
    hash['investments_auth']
  hosted_link = LinkTokenCreateHostedLink.from_hash(hash['hosted_link']) if
    hash['hosted_link']
  transactions = LinkTokenTransactions.from_hash(hash['transactions']) if hash['transactions']
  cashflow_report = LinkTokenCashflowReport.from_hash(hash['cashflow_report']) if
    hash['cashflow_report']
  cra_enabled = hash.key?('cra_enabled') ? hash['cra_enabled'] : SKIP
  identity = LinkTokenCreateIdentity.from_hash(hash['identity']) if hash['identity']
  financekit_supported =
    hash.key?('financekit_supported') ? hash['financekit_supported'] : SKIP
  enable_multi_item_link =
    hash.key?('enable_multi_item_link') ? hash['enable_multi_item_link'] : SKIP
  user_token = hash.key?('user_token') ? hash['user_token'] : 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.
  LinkTokenCreateRequest.new(client_name: client_name,
                             language: language,
                             country_codes: country_codes,
                             client_id: client_id,
                             secret: secret,
                             user: user,
                             user_id: user_id,
                             products: products,
                             required_if_supported_products: required_if_supported_products,
                             optional_products: optional_products,
                             additional_consented_products: additional_consented_products,
                             webhook: webhook,
                             access_token: access_token,
                             access_tokens: access_tokens,
                             link_customization_name: link_customization_name,
                             appearance_mode: appearance_mode,
                             redirect_uri: redirect_uri,
                             android_package_name: android_package_name,
                             institution_data: institution_data,
                             card_switch: card_switch,
                             account_filters: ,
                             eu_config: eu_config,
                             institution_id: institution_id,
                             payment_configuration: payment_configuration,
                             payment_initiation: payment_initiation,
                             employment: employment,
                             income_verification: income_verification,
                             base_report: base_report,
                             credit_partner_insights: credit_partner_insights,
                             cra_options: cra_options,
                             consumer_report_permissible_purpose: consumer_report_permissible_purpose,
                             auth: auth,
                             transfer: transfer,
                             update: update,
                             identity_verification: identity_verification,
                             statements: statements,
                             third_party_user_token: third_party_user_token,
                             investments: investments,
                             investments_auth: investments_auth,
                             hosted_link: hosted_link,
                             transactions: transactions,
                             cashflow_report: cashflow_report,
                             cra_enabled: cra_enabled,
                             identity: identity,
                             financekit_supported: financekit_supported,
                             enable_multi_item_link: enable_multi_item_link,
                             user_token: user_token,
                             additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 449

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['client_id'] = 'client_id'
  @_hash['secret'] = 'secret'
  @_hash['client_name'] = 'client_name'
  @_hash['language'] = 'language'
  @_hash['country_codes'] = 'country_codes'
  @_hash['user'] = 'user'
  @_hash['user_id'] = 'user_id'
  @_hash['products'] = 'products'
  @_hash['required_if_supported_products'] =
    'required_if_supported_products'
  @_hash['optional_products'] = 'optional_products'
  @_hash['additional_consented_products'] =
    'additional_consented_products'
  @_hash['webhook'] = 'webhook'
  @_hash['access_token'] = 'access_token'
  @_hash['access_tokens'] = 'access_tokens'
  @_hash['link_customization_name'] = 'link_customization_name'
  @_hash['appearance_mode'] = 'appearance_mode'
  @_hash['redirect_uri'] = 'redirect_uri'
  @_hash['android_package_name'] = 'android_package_name'
  @_hash['institution_data'] = 'institution_data'
  @_hash['card_switch'] = 'card_switch'
  @_hash['account_filters'] = 'account_filters'
  @_hash['eu_config'] = 'eu_config'
  @_hash['institution_id'] = 'institution_id'
  @_hash['payment_configuration'] = 'payment_configuration'
  @_hash['payment_initiation'] = 'payment_initiation'
  @_hash['employment'] = 'employment'
  @_hash['income_verification'] = 'income_verification'
  @_hash['base_report'] = 'base_report'
  @_hash['credit_partner_insights'] = 'credit_partner_insights'
  @_hash['cra_options'] = 'cra_options'
  @_hash['consumer_report_permissible_purpose'] =
    'consumer_report_permissible_purpose'
  @_hash['auth'] = 'auth'
  @_hash['transfer'] = 'transfer'
  @_hash['update'] = 'update'
  @_hash['identity_verification'] = 'identity_verification'
  @_hash['statements'] = 'statements'
  @_hash['third_party_user_token'] = 'third_party_user_token'
  @_hash['investments'] = 'investments'
  @_hash['investments_auth'] = 'investments_auth'
  @_hash['hosted_link'] = 'hosted_link'
  @_hash['transactions'] = 'transactions'
  @_hash['cashflow_report'] = 'cashflow_report'
  @_hash['cra_enabled'] = 'cra_enabled'
  @_hash['identity'] = 'identity'
  @_hash['financekit_supported'] = 'financekit_supported'
  @_hash['enable_multi_item_link'] = 'enable_multi_item_link'
  @_hash['user_token'] = 'user_token'
  @_hash
end

.nullablesObject

An array for nullable fields



555
556
557
558
559
560
561
562
563
564
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 555

def self.nullables
  %w[
    products
    required_if_supported_products
    optional_products
    additional_consented_products
    access_token
    appearance_mode
  ]
end

.optionalsObject

An array for optional fields



505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 505

def self.optionals
  %w[
    client_id
    secret
    user
    user_id
    products
    required_if_supported_products
    optional_products
    additional_consented_products
    webhook
    access_token
    access_tokens
    link_customization_name
    appearance_mode
    redirect_uri
    android_package_name
    institution_data
    card_switch
    account_filters
    eu_config
    institution_id
    payment_configuration
    payment_initiation
    employment
    income_verification
    base_report
    credit_partner_insights
    cra_options
    consumer_report_permissible_purpose
    auth
    transfer
    update
    identity_verification
    statements
    third_party_user_token
    investments
    investments_auth
    hosted_link
    transactions
    cashflow_report
    cra_enabled
    identity
    financekit_supported
    enable_multi_item_link
    user_token
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 819

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.inspect}, client_name:"\
  " #{@client_name.inspect}, language: #{@language.inspect}, country_codes:"\
  " #{@country_codes.inspect}, user: #{@user.inspect}, user_id: #{@user_id.inspect}, products:"\
  " #{@products.inspect}, required_if_supported_products:"\
  " #{@required_if_supported_products.inspect}, optional_products:"\
  " #{@optional_products.inspect}, additional_consented_products:"\
  " #{@additional_consented_products.inspect}, webhook: #{@webhook.inspect}, access_token:"\
  " #{@access_token.inspect}, access_tokens: #{@access_tokens.inspect},"\
  " link_customization_name: #{@link_customization_name.inspect}, appearance_mode:"\
  " #{@appearance_mode.inspect}, redirect_uri: #{@redirect_uri.inspect}, android_package_name:"\
  " #{@android_package_name.inspect}, institution_data: #{@institution_data.inspect},"\
  " card_switch: #{@card_switch.inspect}, account_filters: #{@account_filters.inspect},"\
  " eu_config: #{@eu_config.inspect}, institution_id: #{@institution_id.inspect},"\
  " payment_configuration: #{@payment_configuration.inspect}, payment_initiation:"\
  " #{@payment_initiation.inspect}, employment: #{@employment.inspect}, income_verification:"\
  " #{@income_verification.inspect}, base_report: #{@base_report.inspect},"\
  " credit_partner_insights: #{@credit_partner_insights.inspect}, cra_options:"\
  " #{@cra_options.inspect}, consumer_report_permissible_purpose:"\
  " #{@consumer_report_permissible_purpose.inspect}, auth: #{@auth.inspect}, transfer:"\
  " #{@transfer.inspect}, update: #{@update.inspect}, identity_verification:"\
  " #{@identity_verification.inspect}, statements: #{@statements.inspect},"\
  " third_party_user_token: #{@third_party_user_token.inspect}, investments:"\
  " #{@investments.inspect}, investments_auth: #{@investments_auth.inspect}, hosted_link:"\
  " #{@hosted_link.inspect}, transactions: #{@transactions.inspect}, cashflow_report:"\
  " #{@cashflow_report.inspect}, cra_enabled: #{@cra_enabled.inspect}, identity:"\
  " #{@identity.inspect}, financekit_supported: #{@financekit_supported.inspect},"\
  " enable_multi_item_link: #{@enable_multi_item_link.inspect}, user_token:"\
  " #{@user_token.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
# File 'lib/the_plaid_api/models/link_token_create_request.rb', line 792

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, client_name: #{@client_name},"\
  " language: #{@language}, country_codes: #{@country_codes}, user: #{@user}, user_id:"\
  " #{@user_id}, products: #{@products}, required_if_supported_products:"\
  " #{@required_if_supported_products}, optional_products: #{@optional_products},"\
  " additional_consented_products: #{@additional_consented_products}, webhook: #{@webhook},"\
  " access_token: #{@access_token}, access_tokens: #{@access_tokens}, link_customization_name:"\
  " #{@link_customization_name}, appearance_mode: #{@appearance_mode}, redirect_uri:"\
  " #{@redirect_uri}, android_package_name: #{@android_package_name}, institution_data:"\
  " #{@institution_data}, card_switch: #{@card_switch}, account_filters: #{@account_filters},"\
  " eu_config: #{@eu_config}, institution_id: #{@institution_id}, payment_configuration:"\
  " #{@payment_configuration}, payment_initiation: #{@payment_initiation}, employment:"\
  " #{@employment}, income_verification: #{@income_verification}, base_report:"\
  " #{@base_report}, credit_partner_insights: #{@credit_partner_insights}, cra_options:"\
  " #{@cra_options}, consumer_report_permissible_purpose:"\
  " #{@consumer_report_permissible_purpose}, auth: #{@auth}, transfer: #{@transfer}, update:"\
  " #{@update}, identity_verification: #{@identity_verification}, statements: #{@statements},"\
  " third_party_user_token: #{@third_party_user_token}, investments: #{@investments},"\
  " investments_auth: #{@investments_auth}, hosted_link: #{@hosted_link}, transactions:"\
  " #{@transactions}, cashflow_report: #{@cashflow_report}, cra_enabled: #{@cra_enabled},"\
  " identity: #{@identity}, financekit_supported: #{@financekit_supported},"\
  " enable_multi_item_link: #{@enable_multi_item_link}, user_token: #{@user_token},"\
  " additional_properties: #{@additional_properties}>"
end