Class: ThePlaidApi::TransferRecurringCreateRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransferRecurringCreateRequest
- Defined in:
- lib/the_plaid_api/models/transfer_recurring_create_request.rb
Overview
Defines the request schema for ‘/transfer/recurring/create`
Instance Attribute Summary collapse
-
#access_token ⇒ String
The Plaid ‘access_token` for the account that will be debited or credited.
-
#account_id ⇒ String
The Plaid ‘account_id` corresponding to the end-user account that will be debited or credited.
-
#ach_class ⇒ AchClass
Specifies the use case of the transfer.
-
#amount ⇒ String
The amount of the transfer (decimal string with two digits of precision e.g. “10.00”).
-
#client_id ⇒ String
Your Plaid API ‘client_id`.
-
#description ⇒ String
The description of the recurring transfer.
-
#device ⇒ TransferDevice
Information about the device being used to initiate the authorization.
-
#funding_account_id ⇒ String
Specify the account used to fund the transfer.
-
#idempotency_key ⇒ String
A random key provided by the client, per unique recurring transfer.
-
#iso_currency_code ⇒ String
The currency of the transfer amount.
-
#network ⇒ TransferRecurrinngNetwork
Networks eligible for recurring transfers.
-
#schedule ⇒ TransferRecurringSchedule
The schedule that the recurring transfer will be executed on.
-
#secret ⇒ String
Your Plaid API ‘secret`.
-
#test_clock_id ⇒ String
Plaid’s unique identifier for a test clock.
-
#type ⇒ TransferType1
The type of transfer.
-
#user ⇒ TransferUserInRequest
The legal name and other information for the account holder.
-
#user_present ⇒ TrueClass | FalseClass
If the end user is initiating the specific transfer themselves via an interactive UI, this should be ‘true`; for automatic recurring payments where the end user is not actually initiating each individual transfer, it should be `false`.
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(access_token:, idempotency_key:, account_id:, type:, network:, amount:, description:, schedule:, user:, client_id: SKIP, secret: SKIP, funding_account_id: SKIP, ach_class: SKIP, user_present: SKIP, iso_currency_code: SKIP, test_clock_id: SKIP, device: SKIP, additional_properties: nil) ⇒ TransferRecurringCreateRequest
constructor
A new instance of TransferRecurringCreateRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#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(access_token:, idempotency_key:, account_id:, type:, network:, amount:, description:, schedule:, user:, client_id: SKIP, secret: SKIP, funding_account_id: SKIP, ach_class: SKIP, user_present: SKIP, iso_currency_code: SKIP, test_clock_id: SKIP, device: SKIP, additional_properties: nil) ⇒ TransferRecurringCreateRequest
Returns a new instance of TransferRecurringCreateRequest.
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 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 172 def initialize(access_token:, idempotency_key:, account_id:, type:, network:, amount:, description:, schedule:, user:, client_id: SKIP, secret: SKIP, funding_account_id: SKIP, ach_class: SKIP, user_present: SKIP, iso_currency_code: SKIP, test_clock_id: SKIP, device: 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 @access_token = access_token @idempotency_key = idempotency_key @account_id = account_id @funding_account_id = funding_account_id unless funding_account_id == SKIP @type = type @network = network @ach_class = ach_class unless ach_class == SKIP @amount = amount @user_present = user_present unless user_present == SKIP @iso_currency_code = iso_currency_code unless iso_currency_code == SKIP @description = description @test_clock_id = test_clock_id unless test_clock_id == SKIP @schedule = schedule @user = user @device = device unless device == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#access_token ⇒ String
The Plaid ‘access_token` for the account that will be debited or credited.
25 26 27 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 25 def access_token @access_token end |
#account_id ⇒ String
The Plaid ‘account_id` corresponding to the end-user account that will be debited or credited.
40 41 42 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 40 def account_id @account_id end |
#ach_class ⇒ AchClass
Specifies the use case of the transfer. Required for transfers on an ACH network. For more details, see [ACH SEC codes](plaid.com/docs/transfer/creating-transfers/#ach-sec-codes). Codes supported for credits: ‘ccd`, `ppd` Codes supported for debits: `ccd`, `tel`, `web` `“ccd”` - Corporate Credit or Debit - fund transfer between two corporate bank accounts `“ppd”` - Prearranged Payment or Deposit - The transfer is part of a pre-existing relationship with a consumer. Authorization was obtained in writing either in person or via an electronic document signing, e.g. Docusign, by the consumer. Can be used for credits or debits. `“web”` - Internet-Initiated Entry. The transfer debits a consumer’s bank account. Authorization from the consumer is obtained over the Internet (e.g. a web or mobile application). Can be used for single debits or recurring debits. `“tel”` - Telephone-Initiated Entry. The transfer debits a consumer. Debit authorization has been received orally over the telephone via a recorded call.
78 79 80 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 78 def ach_class @ach_class end |
#amount ⇒ String
The amount of the transfer (decimal string with two digits of precision e.g. “10.00”). When calling ‘/transfer/authorization/create`, specify the maximum amount to authorize. When calling `/transfer/create`, specify the exact amount of the transfer, up to a maximum of the amount authorized. If this field is left blank when calling `/transfer/create`, the maximum amount authorized in the `authorization_id` will be sent.
87 88 89 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 87 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.
16 17 18 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 16 def client_id @client_id end |
#description ⇒ String
The description of the recurring transfer.
102 103 104 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 102 def description @description end |
#device ⇒ TransferDevice
Information about the device being used to initiate the authorization.
124 125 126 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 124 def device @device end |
#funding_account_id ⇒ String
Specify the account used to fund the transfer. Customers can find a list of ‘funding_account_id`s in the Accounts page of your Plaid Dashboard, under the “Account ID” column. If this field is left blank, it will default to the default `funding_account_id` specified during onboarding.
47 48 49 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 47 def funding_account_id @funding_account_id end |
#idempotency_key ⇒ String
A random key provided by the client, per unique recurring transfer. Maximum of 50 characters. The API supports idempotency for safely retrying requests without accidentally performing the same operation twice. For example, if a request to create a recurring fails due to a network connection error, you can retry the request with the same idempotency key to guarantee that only a single recurring transfer is created.
35 36 37 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 35 def idempotency_key @idempotency_key end |
#iso_currency_code ⇒ String
The currency of the transfer amount. The default value is “USD”.
98 99 100 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 98 def iso_currency_code @iso_currency_code end |
#network ⇒ TransferRecurrinngNetwork
Networks eligible for recurring transfers.
57 58 59 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 57 def network @network end |
#schedule ⇒ TransferRecurringSchedule
The schedule that the recurring transfer will be executed on.
116 117 118 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 116 def schedule @schedule 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.
21 22 23 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 21 def secret @secret end |
#test_clock_id ⇒ String
Plaid’s unique identifier for a test clock. This field may only be used when using the ‘sandbox` environment. If provided, the created `recurring_transfer` is associated with the `test_clock`. New originations are automatically generated when the associated `test_clock` advances. For more details, see [Simulating recurring transfers](plaid.com/docs/transfer/sandbox/#simulating-recurring-t ransfers).
112 113 114 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 112 def test_clock_id @test_clock_id end |
#type ⇒ TransferType1
The type of transfer. This will be either ‘debit` or `credit`. A `debit` indicates a transfer of money into the origination account; a `credit` indicates a transfer of money out of the origination account.
53 54 55 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 53 def type @type end |
#user ⇒ TransferUserInRequest
The legal name and other information for the account holder.
120 121 122 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 120 def user @user end |
#user_present ⇒ TrueClass | FalseClass
If the end user is initiating the specific transfer themselves via an interactive UI, this should be ‘true`; for automatic recurring payments where the end user is not actually initiating each individual transfer, it should be `false`.
94 95 96 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 94 def user_present @user_present end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 202 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. access_token = hash.key?('access_token') ? hash['access_token'] : nil idempotency_key = hash.key?('idempotency_key') ? hash['idempotency_key'] : nil account_id = hash.key?('account_id') ? hash['account_id'] : nil type = hash.key?('type') ? hash['type'] : nil network = hash.key?('network') ? hash['network'] : nil amount = hash.key?('amount') ? hash['amount'] : nil description = hash.key?('description') ? hash['description'] : nil schedule = TransferRecurringSchedule.from_hash(hash['schedule']) if hash['schedule'] user = TransferUserInRequest.from_hash(hash['user']) if hash['user'] client_id = hash.key?('client_id') ? hash['client_id'] : SKIP secret = hash.key?('secret') ? hash['secret'] : SKIP funding_account_id = hash.key?('funding_account_id') ? hash['funding_account_id'] : SKIP ach_class = hash.key?('ach_class') ? hash['ach_class'] : SKIP user_present = hash.key?('user_present') ? hash['user_present'] : SKIP iso_currency_code = hash.key?('iso_currency_code') ? hash['iso_currency_code'] : SKIP test_clock_id = hash.key?('test_clock_id') ? hash['test_clock_id'] : SKIP device = TransferDevice.from_hash(hash['device']) if hash['device'] # 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. TransferRecurringCreateRequest.new(access_token: access_token, idempotency_key: idempotency_key, account_id: account_id, type: type, network: network, amount: amount, description: description, schedule: schedule, user: user, client_id: client_id, secret: secret, funding_account_id: funding_account_id, ach_class: ach_class, user_present: user_present, iso_currency_code: iso_currency_code, test_clock_id: test_clock_id, device: device, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 127 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['secret'] = 'secret' @_hash['access_token'] = 'access_token' @_hash['idempotency_key'] = 'idempotency_key' @_hash['account_id'] = 'account_id' @_hash['funding_account_id'] = 'funding_account_id' @_hash['type'] = 'type' @_hash['network'] = 'network' @_hash['ach_class'] = 'ach_class' @_hash['amount'] = 'amount' @_hash['user_present'] = 'user_present' @_hash['iso_currency_code'] = 'iso_currency_code' @_hash['description'] = 'description' @_hash['test_clock_id'] = 'test_clock_id' @_hash['schedule'] = 'schedule' @_hash['user'] = 'user' @_hash['device'] = 'device' @_hash end |
.nullables ⇒ Object
An array for nullable fields
164 165 166 167 168 169 170 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 164 def self.nullables %w[ funding_account_id user_present test_clock_id ] end |
.optionals ⇒ Object
An array for optional fields
150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 150 def self.optionals %w[ client_id secret funding_account_id ach_class user_present iso_currency_code test_clock_id device ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 268 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.inspect}, access_token:"\ " #{@access_token.inspect}, idempotency_key: #{@idempotency_key.inspect}, account_id:"\ " #{@account_id.inspect}, funding_account_id: #{@funding_account_id.inspect}, type:"\ " #{@type.inspect}, network: #{@network.inspect}, ach_class: #{@ach_class.inspect}, amount:"\ " #{@amount.inspect}, user_present: #{@user_present.inspect}, iso_currency_code:"\ " #{@iso_currency_code.inspect}, description: #{@description.inspect}, test_clock_id:"\ " #{@test_clock_id.inspect}, schedule: #{@schedule.inspect}, user: #{@user.inspect}, device:"\ " #{@device.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
256 257 258 259 260 261 262 263 264 265 |
# File 'lib/the_plaid_api/models/transfer_recurring_create_request.rb', line 256 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, access_token:"\ " #{@access_token}, idempotency_key: #{@idempotency_key}, account_id: #{@account_id},"\ " funding_account_id: #{@funding_account_id}, type: #{@type}, network: #{@network},"\ " ach_class: #{@ach_class}, amount: #{@amount}, user_present: #{@user_present},"\ " iso_currency_code: #{@iso_currency_code}, description: #{@description}, test_clock_id:"\ " #{@test_clock_id}, schedule: #{@schedule}, user: #{@user}, device: #{@device},"\ " additional_properties: #{@additional_properties}>" end |