Class: ThePlaidApi::TransactionsGetRequestOptions
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransactionsGetRequestOptions
- Defined in:
- lib/the_plaid_api/models/transactions_get_request_options.rb
Overview
An optional object to be used with the request. If specified, ‘options` must not be `null`.
Instance Attribute Summary collapse
-
#account_ids ⇒ Array[String]
A list of ‘account_ids` to retrieve for the Item Note: An error will be returned if a provided `account_id` is not associated with the Item.
-
#count ⇒ Integer
The number of transactions to fetch.
-
#days_requested ⇒ Integer
This field only applies to calls for Items where the Transactions product has not already been initialized (i.e. by specifying ‘transactions` in the `products`, `optional_products`, or `required_if_consented_products` array when calling `/link/token/create` or by making a previous call to `/transactions/sync` or `/transactions/get`).
-
#include_logo_and_counterparty_beta ⇒ TrueClass | FalseClass
Counterparties and extra merchant fields are now returned by default.
-
#include_original_description ⇒ TrueClass | FalseClass
Include the raw unparsed transaction description from the financial institution.
-
#include_personal_finance_category ⇒ TrueClass | FalseClass
Personal finance categories are now returned by default.
-
#include_personal_finance_category_beta ⇒ TrueClass | FalseClass
Personal finance categories are now returned by default.
-
#offset ⇒ Integer
The number of transactions to skip.
-
#personal_finance_category_version ⇒ PersonalFinanceCategoryVersion
Indicates which version of the personal finance category taxonomy is being used.
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_ids: SKIP, count: 100, offset: 0, include_original_description: false, include_personal_finance_category_beta: false, include_personal_finance_category: false, include_logo_and_counterparty_beta: false, personal_finance_category_version: SKIP, days_requested: 90, additional_properties: nil) ⇒ TransactionsGetRequestOptions
constructor
A new instance of TransactionsGetRequestOptions.
-
#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_ids: SKIP, count: 100, offset: 0, include_original_description: false, include_personal_finance_category_beta: false, include_personal_finance_category: false, include_logo_and_counterparty_beta: false, personal_finance_category_version: SKIP, days_requested: 90, additional_properties: nil) ⇒ TransactionsGetRequestOptions
Returns a new instance of TransactionsGetRequestOptions.
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 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 127 def initialize(account_ids: SKIP, count: 100, offset: 0, include_original_description: false, include_personal_finance_category_beta: false, include_personal_finance_category: false, include_logo_and_counterparty_beta: false, personal_finance_category_version: SKIP, days_requested: 90, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_ids = account_ids unless account_ids == SKIP @count = count unless count == SKIP @offset = offset unless offset == SKIP unless include_original_description == SKIP @include_original_description = include_original_description end unless include_personal_finance_category_beta == SKIP @include_personal_finance_category_beta = include_personal_finance_category_beta end unless include_personal_finance_category == SKIP @include_personal_finance_category = include_personal_finance_category end unless include_logo_and_counterparty_beta == SKIP @include_logo_and_counterparty_beta = include_logo_and_counterparty_beta end unless personal_finance_category_version == SKIP @personal_finance_category_version = personal_finance_category_version end @days_requested = days_requested unless days_requested == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_ids ⇒ Array[String]
A list of ‘account_ids` to retrieve for the Item Note: An error will be returned if a provided `account_id` is not associated with the Item.
17 18 19 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 17 def account_ids @account_ids end |
#count ⇒ Integer
The number of transactions to fetch.
21 22 23 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 21 def count @count end |
#days_requested ⇒ Integer
This field only applies to calls for Items where the Transactions product has not already been initialized (i.e. by specifying ‘transactions` in the `products`, `optional_products`, or `required_if_consented_products` array when calling `/link/token/create` or by making a previous call to `/transactions/sync` or `/transactions/get`). In those cases, the field controls the maximum number of days of transaction history that Plaid will request from the financial institution. The more transaction history is requested, the longer the historical update poll will take. If no value is specified, 90 days of history will be requested by default. In Production, if a value under 30 is provided, a minimum of 30 days of history will be requested. If you are initializing your Items with transactions during the `/link/token/create` call (e.g. by including `transactions` in the `/link/token/create` `products` array), you must use the [`transactions.days_requested`](plaid.com/docs/api/link/#link-toke n-create-request-transactions-days-requested) field in the `/link/token/create` request instead of in the `/transactions/get` request. If the Item has already been initialized with the Transactions product, this field will have no effect. The maximum amount of transaction history to request on an Item cannot be updated if Transactions has already been added to the Item. To request older transaction history on an Item where Transactions has already been added, you must delete the Item via `/item/remove` and send the user through Link to create a new Item. Customers using [Recurring Transactions](plaid.com/docs/api/products/transactions/#transactio nsrecurringget) should request at least 180 days of history for optimal results.
84 85 86 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 84 def days_requested @days_requested end |
#include_logo_and_counterparty_beta ⇒ TrueClass | FalseClass
Counterparties and extra merchant fields are now returned by default.
42 43 44 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 42 def include_logo_and_counterparty_beta @include_logo_and_counterparty_beta end |
#include_original_description ⇒ TrueClass | FalseClass
Include the raw unparsed transaction description from the financial institution.
30 31 32 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 30 def include_original_description @include_original_description end |
#include_personal_finance_category ⇒ TrueClass | FalseClass
Personal finance categories are now returned by default.
38 39 40 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 38 def include_personal_finance_category @include_personal_finance_category end |
#include_personal_finance_category_beta ⇒ TrueClass | FalseClass
Personal finance categories are now returned by default.
34 35 36 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 34 def include_personal_finance_category_beta @include_personal_finance_category_beta end |
#offset ⇒ Integer
The number of transactions to skip. The default value is 0.
25 26 27 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 25 def offset @offset end |
#personal_finance_category_version ⇒ PersonalFinanceCategoryVersion
Indicates which version of the personal finance category taxonomy is being used. [View PFCv2 and PFCv1 taxonomies](plaid.com/documents/pfc-taxonomy-all.csv). If you enabled Transactions or Enrich before December 2025 you will receive the ‘v1` taxonomy by default and may request `v2` by explicitly setting this field to `v2` in the request. If you enabled Transactions or Enrich on or after December 2025, you may only receive the `v2` taxonomy.
53 54 55 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 53 def personal_finance_category_version @personal_finance_category_version end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 165 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_ids = hash.key?('account_ids') ? hash['account_ids'] : SKIP count = hash['count'] ||= 100 offset = hash['offset'] ||= 0 include_original_description = hash['include_original_description'] ||= false include_personal_finance_category_beta = hash['include_personal_finance_category_beta'] ||= false include_personal_finance_category = hash['include_personal_finance_category'] ||= false include_logo_and_counterparty_beta = hash['include_logo_and_counterparty_beta'] ||= false personal_finance_category_version = hash.key?('personal_finance_category_version') ? hash['personal_finance_category_version'] : SKIP days_requested = hash['days_requested'] ||= 90 # 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. TransactionsGetRequestOptions.new(account_ids: account_ids, count: count, offset: offset, include_original_description: include_original_description, include_personal_finance_category_beta: include_personal_finance_category_beta, include_personal_finance_category: include_personal_finance_category, include_logo_and_counterparty_beta: include_logo_and_counterparty_beta, personal_finance_category_version: personal_finance_category_version, days_requested: days_requested, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 87 def self.names @_hash = {} if @_hash.nil? @_hash['account_ids'] = 'account_ids' @_hash['count'] = 'count' @_hash['offset'] = 'offset' @_hash['include_original_description'] = 'include_original_description' @_hash['include_personal_finance_category_beta'] = 'include_personal_finance_category_beta' @_hash['include_personal_finance_category'] = 'include_personal_finance_category' @_hash['include_logo_and_counterparty_beta'] = 'include_logo_and_counterparty_beta' @_hash['personal_finance_category_version'] = 'personal_finance_category_version' @_hash['days_requested'] = 'days_requested' @_hash end |
.nullables ⇒ Object
An array for nullable fields
121 122 123 124 125 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 121 def self.nullables %w[ include_original_description ] end |
.optionals ⇒ Object
An array for optional fields
106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 106 def self.optionals %w[ account_ids count offset include_original_description include_personal_finance_category_beta include_personal_finance_category include_logo_and_counterparty_beta personal_finance_category_version days_requested ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 217 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_ids: #{@account_ids.inspect}, count: #{@count.inspect}, offset:"\ " #{@offset.inspect}, include_original_description:"\ " #{@include_original_description.inspect}, include_personal_finance_category_beta:"\ " #{@include_personal_finance_category_beta.inspect}, include_personal_finance_category:"\ " #{@include_personal_finance_category.inspect}, include_logo_and_counterparty_beta:"\ " #{@include_logo_and_counterparty_beta.inspect}, personal_finance_category_version:"\ " #{@personal_finance_category_version.inspect}, days_requested: #{@days_requested.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
205 206 207 208 209 210 211 212 213 214 |
# File 'lib/the_plaid_api/models/transactions_get_request_options.rb', line 205 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_ids: #{@account_ids}, count: #{@count}, offset: #{@offset},"\ " include_original_description: #{@include_original_description},"\ " include_personal_finance_category_beta: #{@include_personal_finance_category_beta},"\ " include_personal_finance_category: #{@include_personal_finance_category},"\ " include_logo_and_counterparty_beta: #{@include_logo_and_counterparty_beta},"\ " personal_finance_category_version: #{@personal_finance_category_version}, days_requested:"\ " #{@days_requested}, additional_properties: #{@additional_properties}>" end |