Class: Plaid::LinkTokenCreateRequestAccountSubtypes
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Plaid::LinkTokenCreateRequestAccountSubtypes
- Defined in:
- lib/plaid/models/link_token_create_request_account_subtypes.rb
Overview
By default, Link will only display account types that are compatible with all products supplied in the ‘products` parameter of `/link/token/create`. 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#accounts-schema). For institutions using OAuth, the filter will not affect the list of institutions or accounts shown by the bank in the OAuth window.
Instance Attribute Summary collapse
-
#credit ⇒ Credit
A filter to apply to ‘credit`-type accounts.
-
#depository ⇒ Depository
A filter to apply to ‘depository`-type accounts.
-
#investment ⇒ Investment
A filter to apply to ‘investment`-type accounts.
-
#loan ⇒ Loan
A filter to apply to ‘loan`-type accounts.
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(depository: SKIP, credit: SKIP, loan: SKIP, investment: SKIP, additional_properties: nil) ⇒ LinkTokenCreateRequestAccountSubtypes
constructor
A new instance of LinkTokenCreateRequestAccountSubtypes.
-
#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(depository: SKIP, credit: SKIP, loan: SKIP, investment: SKIP, additional_properties: nil) ⇒ LinkTokenCreateRequestAccountSubtypes
Returns a new instance of LinkTokenCreateRequestAccountSubtypes.
66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/plaid/models/link_token_create_request_account_subtypes.rb', line 66 def initialize(depository: SKIP, credit: SKIP, loan: SKIP, investment: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @depository = depository unless depository == SKIP @credit = credit unless credit == SKIP @loan = loan unless loan == SKIP @investment = investment unless investment == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#credit ⇒ Credit
A filter to apply to ‘credit`-type accounts
31 32 33 |
# File 'lib/plaid/models/link_token_create_request_account_subtypes.rb', line 31 def credit @credit end |
#depository ⇒ Depository
A filter to apply to ‘depository`-type accounts
27 28 29 |
# File 'lib/plaid/models/link_token_create_request_account_subtypes.rb', line 27 def depository @depository end |
#investment ⇒ Investment
A filter to apply to ‘investment`-type accounts
39 40 41 |
# File 'lib/plaid/models/link_token_create_request_account_subtypes.rb', line 39 def investment @investment end |
#loan ⇒ Loan
A filter to apply to ‘loan`-type accounts
35 36 37 |
# File 'lib/plaid/models/link_token_create_request_account_subtypes.rb', line 35 def loan @loan end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/plaid/models/link_token_create_request_account_subtypes.rb', line 79 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. depository = Depository.from_hash(hash['depository']) if hash['depository'] credit = Credit.from_hash(hash['credit']) if hash['credit'] loan = Loan.from_hash(hash['loan']) if hash['loan'] investment = Investment.from_hash(hash['investment']) if hash['investment'] # 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. LinkTokenCreateRequestAccountSubtypes.new(depository: depository, credit: credit, loan: loan, investment: investment, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
42 43 44 45 46 47 48 49 |
# File 'lib/plaid/models/link_token_create_request_account_subtypes.rb', line 42 def self.names @_hash = {} if @_hash.nil? @_hash['depository'] = 'depository' @_hash['credit'] = 'credit' @_hash['loan'] = 'loan' @_hash['investment'] = 'investment' @_hash end |
.nullables ⇒ Object
An array for nullable fields
62 63 64 |
# File 'lib/plaid/models/link_token_create_request_account_subtypes.rb', line 62 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
52 53 54 55 56 57 58 59 |
# File 'lib/plaid/models/link_token_create_request_account_subtypes.rb', line 52 def self.optionals %w[ depository credit loan investment ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
111 112 113 114 115 116 |
# File 'lib/plaid/models/link_token_create_request_account_subtypes.rb', line 111 def inspect class_name = self.class.name.split('::').last "<#{class_name} depository: #{@depository.inspect}, credit: #{@credit.inspect}, loan:"\ " #{@loan.inspect}, investment: #{@investment.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
104 105 106 107 108 |
# File 'lib/plaid/models/link_token_create_request_account_subtypes.rb', line 104 def to_s class_name = self.class.name.split('::').last "<#{class_name} depository: #{@depository}, credit: #{@credit}, loan: #{@loan}, investment:"\ " #{@investment}, additional_properties: #{@additional_properties}>" end |