Class: ThePlaidApi::TransferIntentCreateRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransferIntentCreateRequest
- Defined in:
- lib/the_plaid_api/models/transfer_intent_create_request.rb
Overview
Defines the request schema for ‘/transfer/intent/create`
Instance Attribute Summary collapse
-
#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
A description for the underlying transfer.
-
#funding_account_id ⇒ String
Specify the account used to fund the transfer.
-
#iso_currency_code ⇒ String
The currency of the transfer amount, e.g.
-
#metadata ⇒ Hash[String, String]
The Metadata object is a mapping of client-provided string fields to any string value.
-
#mode ⇒ TransferIntentCreateMode
The direction of the flow of transfer funds.
-
#network ⇒ TransferIntentCreateNetwork
The network or rails used for the transfer.
-
#origination_account_id ⇒ String
Plaid’s unique identifier for the origination account for the intent.
-
#require_guarantee ⇒ TrueClass | FalseClass
When ‘true`, the transfer requires a `GUARANTEED` decision by Plaid to proceed (Guarantee customers only).
-
#secret ⇒ String
Your Plaid API ‘secret`.
-
#user ⇒ TransferUserInRequest
The legal name and other information for the account holder.
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(mode:, amount:, description:, user:, client_id: SKIP, secret: SKIP, account_id: SKIP, funding_account_id: SKIP, network: TransferIntentCreateNetwork::SAMEDAYACH, ach_class: SKIP, origination_account_id: SKIP, metadata: SKIP, iso_currency_code: SKIP, require_guarantee: false, additional_properties: nil) ⇒ TransferIntentCreateRequest
constructor
A new instance of TransferIntentCreateRequest.
-
#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(mode:, amount:, description:, user:, client_id: SKIP, secret: SKIP, account_id: SKIP, funding_account_id: SKIP, network: TransferIntentCreateNetwork::SAMEDAYACH, ach_class: SKIP, origination_account_id: SKIP, metadata: SKIP, iso_currency_code: SKIP, require_guarantee: false, additional_properties: nil) ⇒ TransferIntentCreateRequest
Returns a new instance of TransferIntentCreateRequest.
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 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 172 def initialize(mode:, amount:, description:, user:, client_id: SKIP, secret: SKIP, account_id: SKIP, funding_account_id: SKIP, network: TransferIntentCreateNetwork::SAMEDAYACH, ach_class: SKIP, origination_account_id: SKIP, metadata: SKIP, iso_currency_code: SKIP, require_guarantee: false, 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 @account_id = account_id unless account_id == SKIP @funding_account_id = funding_account_id unless funding_account_id == SKIP @mode = mode @network = network unless network == SKIP @amount = amount @description = description @ach_class = ach_class unless ach_class == SKIP @origination_account_id = origination_account_id unless origination_account_id == SKIP @user = user @metadata = unless == SKIP @iso_currency_code = iso_currency_code unless iso_currency_code == SKIP @require_guarantee = require_guarantee unless require_guarantee == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
The Plaid ‘account_id` corresponding to the end-user account that will be debited or credited.
26 27 28 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 26 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.
95 96 97 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 95 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.
70 71 72 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 70 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_intent_create_request.rb', line 16 def client_id @client_id end |
#description ⇒ String
A description for the underlying transfer. Maximum of 15 characters.
74 75 76 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 74 def description @description end |
#funding_account_id ⇒ String
Specify the account used to fund the transfer. Should be specified if using legacy funding methods only. If using Plaid Ledger, leave this field blank. 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 and you are using legacy funding methods, this will default to the default `funding_account_id` specified during onboarding. Otherwise, Plaid Ledger will be used.
36 37 38 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 36 def funding_account_id @funding_account_id end |
#iso_currency_code ⇒ String
The currency of the transfer amount, e.g. “USD”
118 119 120 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 118 def iso_currency_code @iso_currency_code end |
#metadata ⇒ Hash[String, String]
The Metadata object is a mapping of client-provided string fields to any string value. The following limitations apply: The JSON values must be Strings (no nested JSON objects allowed) Only ASCII characters may be used Maximum of 50 key/value pairs Maximum key length of 40 characters Maximum value length of 500 characters
114 115 116 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 114 def @metadata end |
#mode ⇒ TransferIntentCreateMode
The direction of the flow of transfer funds. ‘PAYMENT`: Transfers funds from an end user’s account to your business account. ‘DISBURSEMENT`: Transfers funds from your business account to an end user’s account.
44 45 46 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 44 def mode @mode end |
#network ⇒ TransferIntentCreateNetwork
The network or rails used for the transfer. Defaults to ‘same-day-ach`. For transfers submitted using `ach`, the Standard ACH cutoff is 8:30 PM Eastern Time. For transfers submitted using `same-day-ach`, the Same Day ACH cutoff is 3:00 PM Eastern Time. It is recommended to send the request 15 minutes prior to the cutoff to ensure that it will be processed in time for submission before the cutoff. If the transfer is processed after this cutoff but before the Standard ACH cutoff, it will be sent over Standard ACH rails and will not incur same-day charges. For transfers submitted using `rtp`, in the case that the account being credited does not support RTP, the transfer will be sent over ACH as long as an `ach_class` is provided in the request. If RTP isn’t supported by the account and no ‘ach_class` is provided, the transfer will fail to be submitted.
61 62 63 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 61 def network @network end |
#origination_account_id ⇒ String
Plaid’s unique identifier for the origination account for the intent. If not provided, the default account will be used.
100 101 102 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 100 def origination_account_id @origination_account_id end |
#require_guarantee ⇒ TrueClass | FalseClass
When ‘true`, the transfer requires a `GUARANTEED` decision by Plaid to proceed (Guarantee customers only).
123 124 125 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 123 def require_guarantee @require_guarantee 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_intent_create_request.rb', line 21 def secret @secret end |
#user ⇒ TransferUserInRequest
The legal name and other information for the account holder.
104 105 106 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 104 def user @user end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
199 200 201 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 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 199 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. mode = hash.key?('mode') ? hash['mode'] : nil amount = hash.key?('amount') ? hash['amount'] : nil description = hash.key?('description') ? hash['description'] : nil 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 account_id = hash.key?('account_id') ? hash['account_id'] : SKIP funding_account_id = hash.key?('funding_account_id') ? hash['funding_account_id'] : SKIP network = hash['network'] ||= TransferIntentCreateNetwork::SAMEDAYACH ach_class = hash.key?('ach_class') ? hash['ach_class'] : SKIP origination_account_id = hash.key?('origination_account_id') ? hash['origination_account_id'] : SKIP = hash.key?('metadata') ? hash['metadata'] : SKIP iso_currency_code = hash.key?('iso_currency_code') ? hash['iso_currency_code'] : SKIP require_guarantee = hash['require_guarantee'] ||= false # 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. TransferIntentCreateRequest.new(mode: mode, amount: amount, description: description, user: user, client_id: client_id, secret: secret, account_id: account_id, funding_account_id: funding_account_id, network: network, ach_class: ach_class, origination_account_id: origination_account_id, metadata: , iso_currency_code: iso_currency_code, require_guarantee: require_guarantee, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 126 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['secret'] = 'secret' @_hash['account_id'] = 'account_id' @_hash['funding_account_id'] = 'funding_account_id' @_hash['mode'] = 'mode' @_hash['network'] = 'network' @_hash['amount'] = 'amount' @_hash['description'] = 'description' @_hash['ach_class'] = 'ach_class' @_hash['origination_account_id'] = 'origination_account_id' @_hash['user'] = 'user' @_hash['metadata'] = 'metadata' @_hash['iso_currency_code'] = 'iso_currency_code' @_hash['require_guarantee'] = 'require_guarantee' @_hash end |
.nullables ⇒ Object
An array for nullable fields
162 163 164 165 166 167 168 169 170 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 162 def self.nullables %w[ account_id funding_account_id origination_account_id metadata require_guarantee ] end |
.optionals ⇒ Object
An array for optional fields
146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 146 def self.optionals %w[ client_id secret account_id funding_account_id network ach_class origination_account_id metadata iso_currency_code require_guarantee ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
258 259 260 261 262 263 264 265 266 267 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 258 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.inspect}, account_id:"\ " #{@account_id.inspect}, funding_account_id: #{@funding_account_id.inspect}, mode:"\ " #{@mode.inspect}, network: #{@network.inspect}, amount: #{@amount.inspect}, description:"\ " #{@description.inspect}, ach_class: #{@ach_class.inspect}, origination_account_id:"\ " #{@origination_account_id.inspect}, user: #{@user.inspect}, metadata:"\ " #{@metadata.inspect}, iso_currency_code: #{@iso_currency_code.inspect}, require_guarantee:"\ " #{@require_guarantee.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
247 248 249 250 251 252 253 254 255 |
# File 'lib/the_plaid_api/models/transfer_intent_create_request.rb', line 247 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, account_id: #{@account_id},"\ " funding_account_id: #{@funding_account_id}, mode: #{@mode}, network: #{@network}, amount:"\ " #{@amount}, description: #{@description}, ach_class: #{@ach_class},"\ " origination_account_id: #{@origination_account_id}, user: #{@user}, metadata:"\ " #{@metadata}, iso_currency_code: #{@iso_currency_code}, require_guarantee:"\ " #{@require_guarantee}, additional_properties: #{@additional_properties}>" end |