Class: ThePlaidApi::LinkTokenCreateRequestUpdate
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::LinkTokenCreateRequestUpdate
- Defined in:
- lib/the_plaid_api/models/link_token_create_request_update.rb
Overview
Specifies options for initializing Link for [update mode](plaid.com/docs/link/update-mode).
Instance Attribute Summary collapse
-
#account_selection_enabled ⇒ TrueClass | FalseClass
If ‘true`, enables [update mode with Account Select](plaid.com/docs/link/update-mode/#using-update-mode-to-requ est-new-accounts) for institutions in the US and Canada that do not use OAuth, or that use OAuth but do not have their own account selection flow.
-
#item_ids ⇒ Array[String]
An array of ‘item_id`s associated with the user to be updated in update mode.
-
#reauthorization_enabled ⇒ TrueClass | FalseClass
Note: this field is not currently used.
-
#user ⇒ TrueClass | FalseClass
If ‘true`, a `user_token` must also be provided, and Link will open in update mode for the given user.
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(account_selection_enabled: false, reauthorization_enabled: SKIP, user: false, item_ids: SKIP, additional_properties: nil) ⇒ LinkTokenCreateRequestUpdate
constructor
A new instance of LinkTokenCreateRequestUpdate.
-
#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(account_selection_enabled: false, reauthorization_enabled: SKIP, user: false, item_ids: SKIP, additional_properties: nil) ⇒ LinkTokenCreateRequestUpdate
Returns a new instance of LinkTokenCreateRequestUpdate.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/the_plaid_api/models/link_token_create_request_update.rb', line 80 def initialize(account_selection_enabled: false, reauthorization_enabled: SKIP, user: false, item_ids: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? unless account_selection_enabled == SKIP @account_selection_enabled = account_selection_enabled end @reauthorization_enabled = unless == SKIP @user = user unless user == SKIP @item_ids = item_ids unless item_ids == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_selection_enabled ⇒ TrueClass | FalseClass
If ‘true`, enables [update mode with Account Select](plaid.com/docs/link/update-mode/#using-update-mode-to-requ est-new-accounts) for institutions in the US and Canada that do not use OAuth, or that use OAuth but do not have their own account selection flow. For institutions in the US that have an OAuth account selection flow (i.e. most OAuth-enabled institutions), update mode with Account Select will always be enabled, regardless of the value of this field.
21 22 23 |
# File 'lib/the_plaid_api/models/link_token_create_request_update.rb', line 21 def account_selection_enabled @account_selection_enabled end |
#item_ids ⇒ Array[String]
An array of ‘item_id`s associated with the user to be updated in update mode. If empty or `null`, this field will default to initializing update mode for the most recent unhealthy Item associated with the user. A `user_token` must also be provided to use this field.
51 52 53 |
# File 'lib/the_plaid_api/models/link_token_create_request_update.rb', line 51 def item_ids @item_ids end |
#reauthorization_enabled ⇒ TrueClass | FalseClass
Note: this field is not currently used. Plaid may enable this field in the future if 1033-related expiration begins to be enforced. By default, Plaid will enable the reauthorization flow during update mode for an Item enabled for [Data Transparency Messaging](plaid.com/docs/link/data-transparency-messaging-migrati on-guide/) if the Item expires within six months. During a reauthorization flow, an end user will review Plaid’s end user privacy policy, use case and data scope consents, and account access consents; they may also be required to log in to their financial institution’s OAuth flow. After the end user successfully completes the reauthorization flow, the Item’s expiration date will be extended to 12 months from the time that the reauthorization took place. This field allows you to optionally override the default reauthorization scheduling logic to either forcibly enable or disable the reauthorization flow for a given update mode session. This field does not impact the flow for Items at institutions in the EU or UK.
39 40 41 |
# File 'lib/the_plaid_api/models/link_token_create_request_update.rb', line 39 def @reauthorization_enabled end |
#user ⇒ TrueClass | FalseClass
If ‘true`, a `user_token` must also be provided, and Link will open in update mode for the given user.
44 45 46 |
# File 'lib/the_plaid_api/models/link_token_create_request_update.rb', line 44 def user @user end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/the_plaid_api/models/link_token_create_request_update.rb', line 97 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_selection_enabled = hash['account_selection_enabled'] ||= false = hash.key?('reauthorization_enabled') ? hash['reauthorization_enabled'] : SKIP user = hash['user'] ||= false item_ids = hash.key?('item_ids') ? hash['item_ids'] : 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. LinkTokenCreateRequestUpdate.new(account_selection_enabled: account_selection_enabled, reauthorization_enabled: , user: user, item_ids: item_ids, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
54 55 56 57 58 59 60 61 |
# File 'lib/the_plaid_api/models/link_token_create_request_update.rb', line 54 def self.names @_hash = {} if @_hash.nil? @_hash['account_selection_enabled'] = 'account_selection_enabled' @_hash['reauthorization_enabled'] = 'reauthorization_enabled' @_hash['user'] = 'user' @_hash['item_ids'] = 'item_ids' @_hash end |
.nullables ⇒ Object
An array for nullable fields
74 75 76 77 78 |
# File 'lib/the_plaid_api/models/link_token_create_request_update.rb', line 74 def self.nullables %w[ item_ids ] end |
.optionals ⇒ Object
An array for optional fields
64 65 66 67 68 69 70 71 |
# File 'lib/the_plaid_api/models/link_token_create_request_update.rb', line 64 def self.optionals %w[ account_selection_enabled reauthorization_enabled user item_ids ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
131 132 133 134 135 136 |
# File 'lib/the_plaid_api/models/link_token_create_request_update.rb', line 131 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_selection_enabled: #{@account_selection_enabled.inspect},"\ " reauthorization_enabled: #{@reauthorization_enabled.inspect}, user: #{@user.inspect},"\ " item_ids: #{@item_ids.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
123 124 125 126 127 128 |
# File 'lib/the_plaid_api/models/link_token_create_request_update.rb', line 123 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_selection_enabled: #{@account_selection_enabled},"\ " reauthorization_enabled: #{@reauthorization_enabled}, user: #{@user}, item_ids:"\ " #{@item_ids}, additional_properties: #{@additional_properties}>" end |