Class: Plaid::TransactionsGetRequestOptions
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Plaid::TransactionsGetRequestOptions
- Defined in:
- lib/plaid/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.
-
#include_original_description ⇒ TrueClass | FalseClass
Include the raw unparsed transaction description from the financial institution.
-
#include_personal_finance_category_beta ⇒ TrueClass | FalseClass
Include the ‘personal_finance_category` object in the response.
-
#offset ⇒ Integer
The number of transactions to skip.
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, 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, additional_properties: nil) ⇒ TransactionsGetRequestOptions
Returns a new instance of TransactionsGetRequestOptions.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/plaid/models/transactions_get_request_options.rb', line 70 def initialize(account_ids: SKIP, count: 100, offset: 0, include_original_description: false, include_personal_finance_category_beta: false, 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 @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/plaid/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/plaid/models/transactions_get_request_options.rb', line 21 def count @count end |
#include_original_description ⇒ TrueClass | FalseClass
Include the raw unparsed transaction description from the financial institution. This field is disabled by default. If you need this information in addition to the parsed data provided, contact your Plaid Account Manager.
32 33 34 |
# File 'lib/plaid/models/transactions_get_request_options.rb', line 32 def include_original_description @include_original_description end |
#include_personal_finance_category_beta ⇒ TrueClass | FalseClass
Include the ‘personal_finance_category` object in the response. This feature is currently in beta – to request access, contact transactions-feedback@plaid.com.
38 39 40 |
# File 'lib/plaid/models/transactions_get_request_options.rb', line 38 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/plaid/models/transactions_get_request_options.rb', line 25 def offset @offset end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/plaid/models/transactions_get_request_options.rb', line 92 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 # 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, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/plaid/models/transactions_get_request_options.rb', line 41 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 end |
.nullables ⇒ Object
An array for nullable fields
64 65 66 67 68 |
# File 'lib/plaid/models/transactions_get_request_options.rb', line 64 def self.nullables %w[ include_original_description ] end |
.optionals ⇒ Object
An array for optional fields
53 54 55 56 57 58 59 60 61 |
# File 'lib/plaid/models/transactions_get_request_options.rb', line 53 def self.optionals %w[ account_ids count offset include_original_description include_personal_finance_category_beta ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
130 131 132 133 134 135 136 137 |
# File 'lib/plaid/models/transactions_get_request_options.rb', line 130 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}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
121 122 123 124 125 126 127 |
# File 'lib/plaid/models/transactions_get_request_options.rb', line 121 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},"\ " additional_properties: #{@additional_properties}>" end |