Class: ThePlaidApi::TransferSweepListRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransferSweepListRequest
- Defined in:
- lib/the_plaid_api/models/transfer_sweep_list_request.rb
Overview
Defines the request schema for ‘/transfer/sweep/list`
Instance Attribute Summary collapse
-
#amount ⇒ String
Filter sweeps to only those with the specified amount.
-
#client_id ⇒ String
Your Plaid API ‘client_id`.
-
#count ⇒ Integer
The maximum number of sweeps to return.
-
#end_date ⇒ DateTime
The end ‘created` datetime of sweeps to return (RFC 3339 format).
-
#funding_account_id ⇒ String
Filter sweeps to only those with the specified ‘funding_account_id`.
-
#offset ⇒ Integer
The number of sweeps to skip before returning results.
-
#originator_client_id ⇒ String
Filter sweeps to only those with the specified originator client.
-
#secret ⇒ String
Your Plaid API ‘secret`.
-
#start_date ⇒ DateTime
The start ‘created` datetime of sweeps to return (RFC 3339 format).
-
#status ⇒ SweepStatus
The status of a sweep transfer ‘“pending”` - The sweep is currently pending `“posted”` - The sweep has been posted `“settled”` - The sweep has settled.
-
#transfer_id ⇒ String
Filter sweeps to only those with the included ‘transfer_id`.
-
#trigger ⇒ SweepTrigger
The trigger of the sweep ‘“manual”` - The sweep is created manually by the customer `“incoming”` - The sweep is created by incoming funds flow (e.g. Incoming Wire) `“balance_threshold”` - The sweep is created by balance threshold setting `“automatic_aggregate”` - The sweep is created by the Plaid automatic aggregation process.
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, start_date: SKIP, end_date: SKIP, count: 25, offset: 0, amount: SKIP, status: SKIP, originator_client_id: SKIP, funding_account_id: SKIP, transfer_id: SKIP, trigger: SKIP, additional_properties: nil) ⇒ TransferSweepListRequest
constructor
A new instance of TransferSweepListRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_end_date ⇒ Object
- #to_custom_start_date ⇒ 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, start_date: SKIP, end_date: SKIP, count: 25, offset: 0, amount: SKIP, status: SKIP, originator_client_id: SKIP, funding_account_id: SKIP, transfer_id: SKIP, trigger: SKIP, additional_properties: nil) ⇒ TransferSweepListRequest
Returns a new instance of TransferSweepListRequest.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 134 def initialize(client_id: SKIP, secret: SKIP, start_date: SKIP, end_date: SKIP, count: 25, offset: 0, amount: SKIP, status: SKIP, originator_client_id: SKIP, funding_account_id: SKIP, transfer_id: SKIP, trigger: SKIP, 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 @start_date = start_date unless start_date == SKIP @end_date = end_date unless end_date == SKIP @count = count unless count == SKIP @offset = offset unless offset == SKIP @amount = amount unless amount == SKIP @status = status unless status == SKIP @originator_client_id = originator_client_id unless originator_client_id == SKIP @funding_account_id = funding_account_id unless funding_account_id == SKIP @transfer_id = transfer_id unless transfer_id == SKIP @trigger = trigger unless trigger == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#amount ⇒ String
Filter sweeps to only those with the specified amount.
42 43 44 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 42 def amount @amount end |
#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.
17 18 19 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 17 def client_id @client_id end |
#count ⇒ Integer
The maximum number of sweeps to return.
34 35 36 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 34 def count @count end |
#end_date ⇒ DateTime
The end ‘created` datetime of sweeps to return (RFC 3339 format).
30 31 32 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 30 def end_date @end_date end |
#funding_account_id ⇒ String
Filter sweeps to only those with the specified ‘funding_account_id`.
66 67 68 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 66 def funding_account_id @funding_account_id end |
#offset ⇒ Integer
The number of sweeps to skip before returning results.
38 39 40 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 38 def offset @offset end |
#originator_client_id ⇒ String
Filter sweeps to only those with the specified originator client.
62 63 64 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 62 def originator_client_id @originator_client_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.
22 23 24 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 22 def secret @secret end |
#start_date ⇒ DateTime
The start ‘created` datetime of sweeps to return (RFC 3339 format).
26 27 28 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 26 def start_date @start_date end |
#status ⇒ SweepStatus
The status of a sweep transfer ‘“pending”` - The sweep is currently pending `“posted”` - The sweep has been posted `“settled”` - The sweep has settled. This is the terminal state of a successful credit sweep. `“returned”` - The sweep has been returned. This is the terminal state of a returned sweep. Returns of a sweep are extremely rare, since sweeps are money movement between your own bank account and your own Ledger. `“funds_available”` - Funds from the sweep have been released from hold and applied to the ledger’s available balance. (Only applicable to deposits.) This is the terminal state of a successful deposit sweep. ‘“failed”` - The sweep has failed. This is the terminal state of a failed sweep.
58 59 60 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 58 def status @status end |
#transfer_id ⇒ String
Filter sweeps to only those with the included ‘transfer_id`.
70 71 72 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 70 def transfer_id @transfer_id end |
#trigger ⇒ SweepTrigger
The trigger of the sweep ‘“manual”` - The sweep is created manually by the customer `“incoming”` - The sweep is created by incoming funds flow (e.g. Incoming Wire) `“balance_threshold”` - The sweep is created by balance threshold setting `“automatic_aggregate”` - The sweep is created by the Plaid automatic aggregation process. These funds did not pass through the Plaid Ledger balance.
81 82 83 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 81 def trigger @trigger end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
158 159 160 161 162 163 164 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 203 204 205 206 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 158 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 start_date = if hash.key?('start_date') (DateTimeHelper.from_rfc3339(hash['start_date']) if hash['start_date']) else SKIP end end_date = if hash.key?('end_date') (DateTimeHelper.from_rfc3339(hash['end_date']) if hash['end_date']) else SKIP end count = hash['count'] ||= 25 offset = hash['offset'] ||= 0 amount = hash.key?('amount') ? hash['amount'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP originator_client_id = hash.key?('originator_client_id') ? hash['originator_client_id'] : SKIP funding_account_id = hash.key?('funding_account_id') ? hash['funding_account_id'] : SKIP transfer_id = hash.key?('transfer_id') ? hash['transfer_id'] : SKIP trigger = hash.key?('trigger') ? hash['trigger'] : SKIP # 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. TransferSweepListRequest.new(client_id: client_id, secret: secret, start_date: start_date, end_date: end_date, count: count, offset: offset, amount: amount, status: status, originator_client_id: originator_client_id, funding_account_id: funding_account_id, transfer_id: transfer_id, trigger: trigger, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 84 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['secret'] = 'secret' @_hash['start_date'] = 'start_date' @_hash['end_date'] = 'end_date' @_hash['count'] = 'count' @_hash['offset'] = 'offset' @_hash['amount'] = 'amount' @_hash['status'] = 'status' @_hash['originator_client_id'] = 'originator_client_id' @_hash['funding_account_id'] = 'funding_account_id' @_hash['transfer_id'] = 'transfer_id' @_hash['trigger'] = 'trigger' @_hash end |
.nullables ⇒ Object
An array for nullable fields
120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 120 def self.nullables %w[ start_date end_date count amount status originator_client_id funding_account_id transfer_id trigger ] end |
.optionals ⇒ Object
An array for optional fields
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 102 def self.optionals %w[ client_id secret start_date end_date count offset amount status originator_client_id funding_account_id transfer_id trigger ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
227 228 229 230 231 232 233 234 235 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 227 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.inspect}, start_date:"\ " #{@start_date.inspect}, end_date: #{@end_date.inspect}, count: #{@count.inspect}, offset:"\ " #{@offset.inspect}, amount: #{@amount.inspect}, status: #{@status.inspect},"\ " originator_client_id: #{@originator_client_id.inspect}, funding_account_id:"\ " #{@funding_account_id.inspect}, transfer_id: #{@transfer_id.inspect}, trigger:"\ " #{@trigger.inspect}, additional_properties: #{@additional_properties}>" end |
#to_custom_end_date ⇒ Object
212 213 214 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 212 def to_custom_end_date DateTimeHelper.to_rfc3339(end_date) end |
#to_custom_start_date ⇒ Object
208 209 210 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 208 def to_custom_start_date DateTimeHelper.to_rfc3339(start_date) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
217 218 219 220 221 222 223 224 |
# File 'lib/the_plaid_api/models/transfer_sweep_list_request.rb', line 217 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, start_date: #{@start_date},"\ " end_date: #{@end_date}, count: #{@count}, offset: #{@offset}, amount: #{@amount}, status:"\ " #{@status}, originator_client_id: #{@originator_client_id}, funding_account_id:"\ " #{@funding_account_id}, transfer_id: #{@transfer_id}, trigger: #{@trigger},"\ " additional_properties: #{@additional_properties}>" end |