Class: ThePlaidApi::ProcessorBalanceGetRequestOptions
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::ProcessorBalanceGetRequestOptions
- Defined in:
- lib/the_plaid_api/models/processor_balance_get_request_options.rb
Overview
Optional parameters to ‘/processor/balance/get`.
Instance Attribute Summary collapse
-
#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(min_last_updated_datetime: SKIP, additional_properties: nil) ⇒ ProcessorBalanceGetRequestOptions
constructor
A new instance of ProcessorBalanceGetRequestOptions.
-
#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(min_last_updated_datetime: SKIP, additional_properties: nil) ⇒ ProcessorBalanceGetRequestOptions
Returns a new instance of ProcessorBalanceGetRequestOptions.
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/the_plaid_api/models/processor_balance_get_request_options.rb', line 49 def initialize(min_last_updated_datetime: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? unless min_last_updated_datetime == SKIP @min_last_updated_datetime = min_last_updated_datetime end @additional_properties = additional_properties end |
Instance Attribute Details
#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`. This field is only necessary when the institution is `ins_128026` (Capital One), and one or more account types being requested is a non-depository account (such as a credit card) as Capital One does not provide real-time balance for non-depository accounts. In this case, a value must be provided or an `INVALID_REQUEST` error with the code of `INVALID_FIELD` will be returned. For all other institutions, as well as for depository accounts at Capital One (including all checking and savings accounts) this field is ignored and real-time balance information will be fetched. If this field is not ignored, and no acceptable balance is available, an `INVALID_RESULT` error with the code `LAST_UPDATED_DATETIME_OUT_OF_RANGE` will be returned.
28 29 30 |
# File 'lib/the_plaid_api/models/processor_balance_get_request_options.rb', line 28 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.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/the_plaid_api/models/processor_balance_get_request_options.rb', line 61 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. 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. ProcessorBalanceGetRequestOptions.new(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.
31 32 33 34 35 |
# File 'lib/the_plaid_api/models/processor_balance_get_request_options.rb', line 31 def self.names @_hash = {} if @_hash.nil? @_hash['min_last_updated_datetime'] = 'min_last_updated_datetime' @_hash end |
.nullables ⇒ Object
An array for nullable fields
45 46 47 |
# File 'lib/the_plaid_api/models/processor_balance_get_request_options.rb', line 45 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
38 39 40 41 42 |
# File 'lib/the_plaid_api/models/processor_balance_get_request_options.rb', line 38 def self.optionals %w[ min_last_updated_datetime ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
95 96 97 98 99 |
# File 'lib/the_plaid_api/models/processor_balance_get_request_options.rb', line 95 def inspect class_name = self.class.name.split('::').last "<#{class_name} min_last_updated_datetime: #{@min_last_updated_datetime.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_custom_min_last_updated_datetime ⇒ Object
83 84 85 |
# File 'lib/the_plaid_api/models/processor_balance_get_request_options.rb', line 83 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.
88 89 90 91 92 |
# File 'lib/the_plaid_api/models/processor_balance_get_request_options.rb', line 88 def to_s class_name = self.class.name.split('::').last "<#{class_name} min_last_updated_datetime: #{@min_last_updated_datetime},"\ " additional_properties: #{@additional_properties}>" end |