Class: ThePlaidApi::TransferLedgerEventListRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransferLedgerEventListRequest
- Defined in:
- lib/the_plaid_api/models/transfer_ledger_event_list_request.rb
Overview
Defines the request schema for ‘/transfer/ledger/event/list`
Instance Attribute Summary collapse
-
#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.
-
#ledger_event_id ⇒ String
Plaid’s unique identifier for the ledger event.
-
#ledger_id ⇒ String
Plaid’s unique identifier for a Plaid Ledger Balance.
-
#offset ⇒ Integer
The offset into the list of transfer events.
-
#originator_client_id ⇒ String
Filter transfer events to only those with the specified originator client.
-
#secret ⇒ String
Your Plaid API ‘secret`.
-
#source_id ⇒ String
Plaid’s unique identifier for a transfer, sweep, or refund.
-
#source_type ⇒ LedgerEventSourceType
Source of the ledger event.
-
#start_date ⇒ DateTime
The start created datetime of transfers to list.
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, originator_client_id: SKIP, secret: SKIP, start_date: SKIP, end_date: SKIP, ledger_id: SKIP, ledger_event_id: SKIP, source_type: SKIP, source_id: SKIP, count: 25, offset: 0, additional_properties: nil) ⇒ TransferLedgerEventListRequest
constructor
A new instance of TransferLedgerEventListRequest.
-
#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, originator_client_id: SKIP, secret: SKIP, start_date: SKIP, end_date: SKIP, ledger_id: SKIP, ledger_event_id: SKIP, source_type: SKIP, source_id: SKIP, count: 25, offset: 0, additional_properties: nil) ⇒ TransferLedgerEventListRequest
Returns a new instance of TransferLedgerEventListRequest.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 120 def initialize(client_id: SKIP, originator_client_id: SKIP, secret: SKIP, start_date: SKIP, end_date: SKIP, ledger_id: SKIP, ledger_event_id: SKIP, source_type: SKIP, source_id: SKIP, count: 25, offset: 0, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @client_id = client_id unless client_id == SKIP @originator_client_id = originator_client_id unless originator_client_id == SKIP @secret = secret unless secret == SKIP @start_date = start_date unless start_date == SKIP @end_date = end_date unless end_date == SKIP @ledger_id = ledger_id unless ledger_id == SKIP @ledger_event_id = ledger_event_id unless ledger_event_id == SKIP @source_type = source_type unless source_type == SKIP @source_id = source_id unless source_id == SKIP @count = count unless count == SKIP @offset = offset unless offset == 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.
17 18 19 |
# File 'lib/the_plaid_api/models/transfer_ledger_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.
63 64 65 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 63 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)
38 39 40 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 38 def end_date @end_date end |
#ledger_event_id ⇒ String
Plaid’s unique identifier for the ledger event.
46 47 48 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 46 def ledger_event_id @ledger_event_id end |
#ledger_id ⇒ String
Plaid’s unique identifier for a Plaid Ledger Balance.
42 43 44 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 42 def ledger_id @ledger_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.
69 70 71 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 69 def offset @offset end |
#originator_client_id ⇒ String
Filter transfer events to only those with the specified originator client. (This field is specifically for resellers. Caller’s client ID will be used if this field is not specified.)
23 24 25 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 23 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.
28 29 30 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 28 def secret @secret end |
#source_id ⇒ String
Plaid’s unique identifier for a transfer, sweep, or refund.
57 58 59 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 57 def source_id @source_id end |
#source_type ⇒ LedgerEventSourceType
Source of the ledger event. ‘“TRANSFER”` - The source of the ledger event is a transfer `“SWEEP”` - The source of the ledger event is a sweep `“REFUND”` - The source of the ledger event is a refund
53 54 55 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 53 def source_type @source_type 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)
33 34 35 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 33 def start_date @start_date end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 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 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 142 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. client_id = hash.key?('client_id') ? hash['client_id'] : SKIP originator_client_id = hash.key?('originator_client_id') ? hash['originator_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 ledger_id = hash.key?('ledger_id') ? hash['ledger_id'] : SKIP ledger_event_id = hash.key?('ledger_event_id') ? hash['ledger_event_id'] : SKIP source_type = hash.key?('source_type') ? hash['source_type'] : SKIP source_id = hash.key?('source_id') ? hash['source_id'] : SKIP count = hash['count'] ||= 25 offset = hash['offset'] ||= 0 # 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. TransferLedgerEventListRequest.new(client_id: client_id, originator_client_id: originator_client_id, secret: secret, start_date: start_date, end_date: end_date, ledger_id: ledger_id, ledger_event_id: ledger_event_id, source_type: source_type, source_id: source_id, count: count, offset: offset, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 72 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['originator_client_id'] = 'originator_client_id' @_hash['secret'] = 'secret' @_hash['start_date'] = 'start_date' @_hash['end_date'] = 'end_date' @_hash['ledger_id'] = 'ledger_id' @_hash['ledger_event_id'] = 'ledger_event_id' @_hash['source_type'] = 'source_type' @_hash['source_id'] = 'source_id' @_hash['count'] = 'count' @_hash['offset'] = 'offset' @_hash end |
.nullables ⇒ Object
An array for nullable fields
106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 106 def self.nullables %w[ originator_client_id start_date end_date ledger_id ledger_event_id source_type source_id count offset ] end |
.optionals ⇒ Object
An array for optional fields
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 89 def self.optionals %w[ client_id originator_client_id secret start_date end_date ledger_id ledger_event_id source_type source_id count offset ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
209 210 211 212 213 214 215 216 217 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 209 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, originator_client_id:"\ " #{@originator_client_id.inspect}, secret: #{@secret.inspect}, start_date:"\ " #{@start_date.inspect}, end_date: #{@end_date.inspect}, ledger_id: #{@ledger_id.inspect},"\ " ledger_event_id: #{@ledger_event_id.inspect}, source_type: #{@source_type.inspect},"\ " source_id: #{@source_id.inspect}, count: #{@count.inspect}, offset: #{@offset.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_custom_end_date ⇒ Object
194 195 196 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 194 def to_custom_end_date DateTimeHelper.to_rfc3339(end_date) end |
#to_custom_start_date ⇒ Object
190 191 192 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 190 def to_custom_start_date DateTimeHelper.to_rfc3339(start_date) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
199 200 201 202 203 204 205 206 |
# File 'lib/the_plaid_api/models/transfer_ledger_event_list_request.rb', line 199 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, originator_client_id: #{@originator_client_id},"\ " secret: #{@secret}, start_date: #{@start_date}, end_date: #{@end_date}, ledger_id:"\ " #{@ledger_id}, ledger_event_id: #{@ledger_event_id}, source_type: #{@source_type},"\ " source_id: #{@source_id}, count: #{@count}, offset: #{@offset}, additional_properties:"\ " #{@additional_properties}>" end |