Class: Plaid::BankTransferSweepListRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Plaid::BankTransferSweepListRequest
- Defined in:
- lib/plaid/models/bank_transfer_sweep_list_request.rb
Overview
BankTransferSweepListRequest defines the request schema for ‘/bank_transfer/sweep/list`
Instance Attribute Summary collapse
-
#client_id ⇒ String
Your Plaid API ‘client_id`.
-
#count ⇒ Integer
The maximum number of sweeps to return.
-
#end_time ⇒ DateTime
The end datetime of sweeps to return (RFC 3339 format).
-
#origination_account_id ⇒ String
If multiple origination accounts are available, ‘origination_account_id` must be used to specify the account that the sweeps belong to.
-
#secret ⇒ String
Your Plaid API ‘secret`.
-
#start_id ⇒ Integer
Starting ID of sweeps to return.
-
#start_time ⇒ DateTime
The start datetime of sweeps to return (RFC 3339 format).
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(client_id: SKIP, secret: SKIP, origination_account_id: SKIP, start_id: SKIP, start_time: SKIP, end_time: SKIP, count: 25, additional_properties: nil) ⇒ BankTransferSweepListRequest
constructor
A new instance of BankTransferSweepListRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_end_time ⇒ Object
- #to_custom_start_time ⇒ 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(client_id: SKIP, secret: SKIP, origination_account_id: SKIP, start_id: SKIP, start_time: SKIP, end_time: SKIP, count: 25, additional_properties: nil) ⇒ BankTransferSweepListRequest
Returns a new instance of BankTransferSweepListRequest.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 83 def initialize(client_id: SKIP, secret: SKIP, origination_account_id: SKIP, start_id: SKIP, start_time: SKIP, end_time: SKIP, count: 25, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @client_id = client_id unless client_id == SKIP @secret = secret unless secret == SKIP @origination_account_id = origination_account_id unless origination_account_id == SKIP @start_id = start_id unless start_id == SKIP @start_time = start_time unless start_time == SKIP @end_time = end_time unless end_time == SKIP @count = count unless count == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#client_id ⇒ String
Your Plaid API ‘client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.
18 19 20 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 18 def client_id @client_id end |
#count ⇒ Integer
The maximum number of sweeps to return.
44 45 46 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 44 def count @count end |
#end_time ⇒ DateTime
The end datetime of sweeps to return (RFC 3339 format).
40 41 42 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 40 def end_time @end_time end |
#origination_account_id ⇒ String
If multiple origination accounts are available, ‘origination_account_id` must be used to specify the account that the sweeps belong to.
28 29 30 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 28 def origination_account_id @origination_account_id end |
#secret ⇒ String
Your Plaid API ‘secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.
23 24 25 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 23 def secret @secret end |
#start_id ⇒ Integer
Starting ID of sweeps to return.
32 33 34 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 32 def start_id @start_id end |
#start_time ⇒ DateTime
The start datetime of sweeps to return (RFC 3339 format).
36 37 38 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 36 def start_time @start_time end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 100 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. client_id = hash.key?('client_id') ? hash['client_id'] : SKIP secret = hash.key?('secret') ? hash['secret'] : SKIP origination_account_id = hash.key?('origination_account_id') ? hash['origination_account_id'] : SKIP start_id = hash.key?('start_id') ? hash['start_id'] : SKIP start_time = if hash.key?('start_time') (DateTimeHelper.from_rfc3339(hash['start_time']) if hash['start_time']) else SKIP end end_time = if hash.key?('end_time') (DateTimeHelper.from_rfc3339(hash['end_time']) if hash['end_time']) else SKIP end count = hash['count'] ||= 25 # 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. BankTransferSweepListRequest.new(client_id: client_id, secret: secret, origination_account_id: origination_account_id, start_id: start_id, start_time: start_time, end_time: end_time, count: count, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 47 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['secret'] = 'secret' @_hash['origination_account_id'] = 'origination_account_id' @_hash['start_id'] = 'start_id' @_hash['start_time'] = 'start_time' @_hash['end_time'] = 'end_time' @_hash['count'] = 'count' @_hash end |
.nullables ⇒ Object
An array for nullable fields
73 74 75 76 77 78 79 80 81 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 73 def self.nullables %w[ origination_account_id start_id start_time end_time count ] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 60 def self.optionals %w[ client_id secret origination_account_id start_id start_time end_time count ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
156 157 158 159 160 161 162 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 156 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.inspect},"\ " origination_account_id: #{@origination_account_id.inspect}, start_id:"\ " #{@start_id.inspect}, start_time: #{@start_time.inspect}, end_time: #{@end_time.inspect},"\ " count: #{@count.inspect}, additional_properties: #{@additional_properties}>" end |
#to_custom_end_time ⇒ Object
143 144 145 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 143 def to_custom_end_time DateTimeHelper.to_rfc3339(end_time) end |
#to_custom_start_time ⇒ Object
139 140 141 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 139 def to_custom_start_time DateTimeHelper.to_rfc3339(start_time) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
148 149 150 151 152 153 |
# File 'lib/plaid/models/bank_transfer_sweep_list_request.rb', line 148 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, origination_account_id:"\ " #{@origination_account_id}, start_id: #{@start_id}, start_time: #{@start_time}, end_time:"\ " #{@end_time}, count: #{@count}, additional_properties: #{@additional_properties}>" end |