Class: Plaid::AccountsBalanceGetRequestOptions
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Plaid::AccountsBalanceGetRequestOptions
- Defined in:
- lib/plaid/models/accounts_balance_get_request_options.rb
Overview
An optional object to filter ‘/accounts/balance/get` results.
Instance Attribute Summary collapse
-
#account_ids ⇒ Array[String]
A list of ‘account_ids` to retrieve for the Item.
-
#min_last_updated_datetime ⇒ DateTime
Timestamp in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDTHH:mm:ssZ`) indicating the oldest acceptable balance when making a request to `/accounts/balance/get`.
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, min_last_updated_datetime: SKIP, additional_properties: nil) ⇒ AccountsBalanceGetRequestOptions
constructor
A new instance of AccountsBalanceGetRequestOptions.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_min_last_updated_datetime ⇒ Object
-
#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, min_last_updated_datetime: SKIP, additional_properties: nil) ⇒ AccountsBalanceGetRequestOptions
Returns a new instance of AccountsBalanceGetRequestOptions.
55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/plaid/models/accounts_balance_get_request_options.rb', line 55 def initialize(account_ids: SKIP, min_last_updated_datetime: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_ids = account_ids unless account_ids == SKIP unless min_last_updated_datetime == SKIP @min_last_updated_datetime = min_last_updated_datetime end @additional_properties = additional_properties end |
Instance Attribute Details
#account_ids ⇒ Array[String]
A list of ‘account_ids` to retrieve for the Item. The default value is `null`. Note: An error will be returned if a provided `account_id` is not associated with the Item.
18 19 20 |
# File 'lib/plaid/models/accounts_balance_get_request_options.rb', line 18 def account_ids @account_ids end |
#min_last_updated_datetime ⇒ DateTime
Timestamp in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDTHH:mm:ssZ`) indicating the oldest acceptable balance when making a request to `/accounts/balance/get`. If the balance that is pulled for `ins_128026` (Capital One) is older than the given timestamp, an `INVALID_REQUEST` error with the code of `LAST_UPDATED_DATETIME_OUT_OF_RANGE` will be returned with the most recent timestamp for the requested account contained in the response. This field is only used when the institution is `ins_128026` (Capital One), in which case a value must be provided or an `INVALID_REQUEST` error with the code of `INVALID_FIELD` will be returned. For all other institutions, this field is ignored.
32 33 34 |
# File 'lib/plaid/models/accounts_balance_get_request_options.rb', line 32 def min_last_updated_datetime @min_last_updated_datetime end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/plaid/models/accounts_balance_get_request_options.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_ids = hash.key?('account_ids') ? hash['account_ids'] : SKIP min_last_updated_datetime = if hash.key?('min_last_updated_datetime') (DateTimeHelper.from_rfc3339(hash['min_last_updated_datetime']) if hash['min_last_updated_datetime']) else SKIP end # 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. AccountsBalanceGetRequestOptions.new(account_ids: account_ids, min_last_updated_datetime: min_last_updated_datetime, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
35 36 37 38 39 40 |
# File 'lib/plaid/models/accounts_balance_get_request_options.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['account_ids'] = 'account_ids' @_hash['min_last_updated_datetime'] = 'min_last_updated_datetime' @_hash end |
.nullables ⇒ Object
An array for nullable fields
51 52 53 |
# File 'lib/plaid/models/accounts_balance_get_request_options.rb', line 51 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
43 44 45 46 47 48 |
# File 'lib/plaid/models/accounts_balance_get_request_options.rb', line 43 def self.optionals %w[ account_ids min_last_updated_datetime ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
105 106 107 108 109 |
# File 'lib/plaid/models/accounts_balance_get_request_options.rb', line 105 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_ids: #{@account_ids.inspect}, min_last_updated_datetime:"\ " #{@min_last_updated_datetime.inspect}, additional_properties: #{@additional_properties}>" end |
#to_custom_min_last_updated_datetime ⇒ Object
93 94 95 |
# File 'lib/plaid/models/accounts_balance_get_request_options.rb', line 93 def to_custom_min_last_updated_datetime DateTimeHelper.to_rfc3339(min_last_updated_datetime) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
98 99 100 101 102 |
# File 'lib/plaid/models/accounts_balance_get_request_options.rb', line 98 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_ids: #{@account_ids}, min_last_updated_datetime:"\ " #{@min_last_updated_datetime}, additional_properties: #{@additional_properties}>" end |