Class: ThePlaidApi::TransferEventListRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransferEventListRequest
- Defined in:
- lib/the_plaid_api/models/transfer_event_list_request.rb
Overview
Defines the request schema for ‘/transfer/event/list`
Instance Attribute Summary collapse
-
#account_id ⇒ String
The account ID to get events for all transactions to/from an account.
-
#client_id ⇒ String
Your Plaid API ‘client_id`.
-
#count ⇒ Integer
The maximum number of transfer events to return.
-
#end_date ⇒ DateTime
The end ‘created` datetime of transfers to list.
-
#event_types ⇒ Array[TransferEventType]
Filter events by event type.
-
#funding_account_id ⇒ String
Filter transfer events to only those with the specified ‘funding_account_id`.
-
#offset ⇒ Integer
The offset into the list of transfer events.
-
#origination_account_id ⇒ String
The origination account ID to get events for transfers from a specific origination account.
-
#originator_client_id ⇒ String
Filter transfer events to only those with the specified originator client.
-
#secret ⇒ String
Your Plaid API ‘secret`.
-
#start_date ⇒ DateTime
The start ‘created` datetime of transfers to list.
-
#sweep_id ⇒ String
Plaid’s unique identifier for a sweep.
-
#transfer_id ⇒ String
Plaid’s unique identifier for a transfer.
-
#transfer_type ⇒ TransferType2
The type of transfer.
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, transfer_id: SKIP, account_id: SKIP, transfer_type: SKIP, event_types: SKIP, sweep_id: SKIP, count: 25, offset: 0, origination_account_id: SKIP, originator_client_id: SKIP, funding_account_id: SKIP, additional_properties: nil) ⇒ TransferEventListRequest
constructor
A new instance of TransferEventListRequest.
-
#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, transfer_id: SKIP, account_id: SKIP, transfer_type: SKIP, event_types: SKIP, sweep_id: SKIP, count: 25, offset: 0, origination_account_id: SKIP, originator_client_id: SKIP, funding_account_id: SKIP, additional_properties: nil) ⇒ TransferEventListRequest
Returns a new instance of TransferEventListRequest.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 138 def initialize(client_id: SKIP, secret: SKIP, start_date: SKIP, end_date: SKIP, transfer_id: SKIP, account_id: SKIP, transfer_type: SKIP, event_types: SKIP, sweep_id: SKIP, count: 25, offset: 0, origination_account_id: SKIP, originator_client_id: SKIP, funding_account_id: 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 @transfer_id = transfer_id unless transfer_id == SKIP @account_id = account_id unless account_id == SKIP @transfer_type = transfer_type unless transfer_type == SKIP @event_types = event_types unless event_types == SKIP @sweep_id = sweep_id unless sweep_id == SKIP @count = count unless count == SKIP @offset = offset unless offset == SKIP @origination_account_id = origination_account_id unless origination_account_id == SKIP @originator_client_id = originator_client_id unless originator_client_id == SKIP @funding_account_id = funding_account_id unless funding_account_id == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
The account ID to get events for all transactions to/from an account.
40 41 42 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 40 def account_id @account_id 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_event_list_request.rb', line 17 def client_id @client_id end |
#count ⇒ Integer
The maximum number of transfer events to return. If the number of events matching the above parameters is greater than ‘count`, the most recent events will be returned.
60 61 62 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 60 def count @count end |
#end_date ⇒ DateTime
The end ‘created` datetime of transfers to list. This should be in RFC 3339 format (i.e. `2019-12-06T22:35:49Z`)
32 33 34 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 32 def end_date @end_date end |
#event_types ⇒ Array[TransferEventType]
Filter events by event type.
50 51 52 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 50 def event_types @event_types end |
#funding_account_id ⇒ String
Filter transfer events to only those with the specified ‘funding_account_id`.
80 81 82 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 80 def funding_account_id @funding_account_id end |
#offset ⇒ Integer
The offset into the list of transfer events. When ‘count`=25 and `offset`=0, the first 25 events will be returned. When `count`=25 and `offset`=25, the next 25 events will be returned.
66 67 68 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 66 def offset @offset end |
#origination_account_id ⇒ String
The origination account ID to get events for transfers from a specific origination account.
71 72 73 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 71 def origination_account_id @origination_account_id end |
#originator_client_id ⇒ String
Filter transfer events to only those with the specified originator client.
75 76 77 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 75 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_event_list_request.rb', line 22 def secret @secret end |
#start_date ⇒ DateTime
The start ‘created` datetime of transfers to list. This should be in RFC 3339 format (i.e. `2019-12-06T22:35:49Z`)
27 28 29 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 27 def start_date @start_date end |
#sweep_id ⇒ String
Plaid’s unique identifier for a sweep.
54 55 56 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 54 def sweep_id @sweep_id end |
#transfer_id ⇒ String
Plaid’s unique identifier for a transfer.
36 37 38 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 36 def transfer_id @transfer_id end |
#transfer_type ⇒ TransferType2
The type of transfer. This will be either ‘debit` or `credit`. A `debit` indicates a transfer of money into your origination account; a `credit` indicates a transfer of money out of your origination account.
46 47 48 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 46 def transfer_type @transfer_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 165 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 transfer_id = hash.key?('transfer_id') ? hash['transfer_id'] : SKIP account_id = hash.key?('account_id') ? hash['account_id'] : SKIP transfer_type = hash.key?('transfer_type') ? hash['transfer_type'] : SKIP event_types = hash.key?('event_types') ? hash['event_types'] : SKIP sweep_id = hash.key?('sweep_id') ? hash['sweep_id'] : SKIP count = hash['count'] ||= 25 offset = hash['offset'] ||= 0 origination_account_id = hash.key?('origination_account_id') ? hash['origination_account_id'] : 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 # 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. TransferEventListRequest.new(client_id: client_id, secret: secret, start_date: start_date, end_date: end_date, transfer_id: transfer_id, account_id: account_id, transfer_type: transfer_type, event_types: event_types, sweep_id: sweep_id, count: count, offset: offset, origination_account_id: origination_account_id, originator_client_id: originator_client_id, funding_account_id: funding_account_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 83 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['transfer_id'] = 'transfer_id' @_hash['account_id'] = 'account_id' @_hash['transfer_type'] = 'transfer_type' @_hash['event_types'] = 'event_types' @_hash['sweep_id'] = 'sweep_id' @_hash['count'] = 'count' @_hash['offset'] = 'offset' @_hash['origination_account_id'] = 'origination_account_id' @_hash['originator_client_id'] = 'originator_client_id' @_hash['funding_account_id'] = 'funding_account_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 123 def self.nullables %w[ start_date end_date transfer_id account_id transfer_type count offset origination_account_id originator_client_id funding_account_id ] end |
.optionals ⇒ Object
An array for optional fields
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 103 def self.optionals %w[ client_id secret start_date end_date transfer_id account_id transfer_type event_types sweep_id count offset origination_account_id originator_client_id funding_account_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 240 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}, transfer_id:"\ " #{@transfer_id.inspect}, account_id: #{@account_id.inspect}, transfer_type:"\ " #{@transfer_type.inspect}, event_types: #{@event_types.inspect}, sweep_id:"\ " #{@sweep_id.inspect}, count: #{@count.inspect}, offset: #{@offset.inspect},"\ " origination_account_id: #{@origination_account_id.inspect}, originator_client_id:"\ " #{@originator_client_id.inspect}, funding_account_id: #{@funding_account_id.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_custom_end_date ⇒ Object
224 225 226 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 224 def to_custom_end_date DateTimeHelper.to_rfc3339(end_date) end |
#to_custom_start_date ⇒ Object
220 221 222 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 220 def to_custom_start_date DateTimeHelper.to_rfc3339(start_date) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
229 230 231 232 233 234 235 236 237 |
# File 'lib/the_plaid_api/models/transfer_event_list_request.rb', line 229 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}, transfer_id: #{@transfer_id}, account_id: #{@account_id},"\ " transfer_type: #{@transfer_type}, event_types: #{@event_types}, sweep_id: #{@sweep_id},"\ " count: #{@count}, offset: #{@offset}, origination_account_id: #{@origination_account_id},"\ " originator_client_id: #{@originator_client_id}, funding_account_id:"\ " #{@funding_account_id}, additional_properties: #{@additional_properties}>" end |