Class: ThePlaidApi::TransferIntentCreate
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransferIntentCreate
- Defined in:
- lib/the_plaid_api/models/transfer_intent_create.rb
Overview
Represents a transfer intent within Transfer UI.
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”).
-
#created ⇒ DateTime
The datetime the transfer was created.
-
#description ⇒ String
A description for the underlying transfer.
-
#funding_account_id ⇒ String
The id of the funding account to use, available in the Plaid Dashboard.
-
#id ⇒ String
Plaid’s unique identifier for the transfer intent object.
-
#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).
-
#status ⇒ TransferIntentStatus
The status of the transfer intent.
-
#user ⇒ TransferUserInResponse
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(id:, created:, status:, origination_account_id:, funding_account_id:, amount:, mode:, user:, description:, iso_currency_code:, account_id: SKIP, network: TransferIntentCreateNetwork::SAMEDAYACH, ach_class: SKIP, metadata: SKIP, require_guarantee: SKIP, additional_properties: nil) ⇒ TransferIntentCreate
constructor
A new instance of TransferIntentCreate.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_created ⇒ 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(id:, created:, status:, origination_account_id:, funding_account_id:, amount:, mode:, user:, description:, iso_currency_code:, account_id: SKIP, network: TransferIntentCreateNetwork::SAMEDAYACH, ach_class: SKIP, metadata: SKIP, require_guarantee: SKIP, additional_properties: nil) ⇒ TransferIntentCreate
Returns a new instance of TransferIntentCreate.
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 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 169 def initialize(id:, created:, status:, origination_account_id:, funding_account_id:, amount:, mode:, user:, description:, iso_currency_code:, account_id: SKIP, network: TransferIntentCreateNetwork::SAMEDAYACH, ach_class: SKIP, metadata: SKIP, require_guarantee: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id = id @created = created @status = status @account_id = account_id unless account_id == SKIP @origination_account_id = origination_account_id @funding_account_id = funding_account_id @amount = amount @mode = mode @network = network unless network == SKIP @ach_class = ach_class unless ach_class == SKIP @user = user @description = description @metadata = unless == SKIP @iso_currency_code = iso_currency_code @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. Returned only if `account_id` was set on intent creation.
33 34 35 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 33 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.
99 100 101 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 99 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.
53 54 55 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 53 def amount @amount end |
#created ⇒ DateTime
The datetime the transfer was created. This will be of the form ‘2006-01-02T15:04:05Z`.
20 21 22 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 20 def created @created end |
#description ⇒ String
A description for the underlying transfer. Maximum of 8 characters.
107 108 109 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 107 def description @description end |
#funding_account_id ⇒ String
The id of the funding account to use, available in the Plaid Dashboard. This determines which of your business checking accounts will be credited or debited.
44 45 46 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 44 def funding_account_id @funding_account_id end |
#id ⇒ String
Plaid’s unique identifier for the transfer intent object.
15 16 17 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 15 def id @id end |
#iso_currency_code ⇒ String
The currency of the transfer amount, e.g. “USD”
121 122 123 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 121 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
117 118 119 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 117 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.
61 62 63 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 61 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.
78 79 80 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 78 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.
38 39 40 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 38 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).
126 127 128 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 126 def require_guarantee @require_guarantee end |
#status ⇒ TransferIntentStatus
The status of the transfer intent. ‘PENDING`: The transfer intent is pending. `SUCCEEDED`: The transfer intent was successfully created. `FAILED`: The transfer intent was unable to be created.
27 28 29 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 27 def status @status end |
#user ⇒ TransferUserInResponse
The legal name and other information for the account holder.
103 104 105 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 103 def user @user end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
197 198 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 245 246 247 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 197 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : nil created = if hash.key?('created') (DateTimeHelper.from_rfc3339(hash['created']) if hash['created']) end status = hash.key?('status') ? hash['status'] : nil origination_account_id = hash.key?('origination_account_id') ? hash['origination_account_id'] : nil funding_account_id = hash.key?('funding_account_id') ? hash['funding_account_id'] : nil amount = hash.key?('amount') ? hash['amount'] : nil mode = hash.key?('mode') ? hash['mode'] : nil user = TransferUserInResponse.from_hash(hash['user']) if hash['user'] description = hash.key?('description') ? hash['description'] : nil iso_currency_code = hash.key?('iso_currency_code') ? hash['iso_currency_code'] : nil account_id = hash.key?('account_id') ? hash['account_id'] : SKIP network = hash['network'] ||= TransferIntentCreateNetwork::SAMEDAYACH ach_class = hash.key?('ach_class') ? hash['ach_class'] : SKIP = hash.key?('metadata') ? hash['metadata'] : SKIP require_guarantee = hash.key?('require_guarantee') ? hash['require_guarantee'] : 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. TransferIntentCreate.new(id: id, created: created, status: status, origination_account_id: origination_account_id, funding_account_id: funding_account_id, amount: amount, mode: mode, user: user, description: description, iso_currency_code: iso_currency_code, account_id: account_id, network: network, ach_class: ach_class, metadata: , require_guarantee: require_guarantee, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
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_intent_create.rb', line 129 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['created'] = 'created' @_hash['status'] = 'status' @_hash['account_id'] = 'account_id' @_hash['origination_account_id'] = 'origination_account_id' @_hash['funding_account_id'] = 'funding_account_id' @_hash['amount'] = 'amount' @_hash['mode'] = 'mode' @_hash['network'] = 'network' @_hash['ach_class'] = 'ach_class' @_hash['user'] = 'user' @_hash['description'] = 'description' @_hash['metadata'] = 'metadata' @_hash['iso_currency_code'] = 'iso_currency_code' @_hash['require_guarantee'] = 'require_guarantee' @_hash end |
.nullables ⇒ Object
An array for nullable fields
161 162 163 164 165 166 167 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 161 def self.nullables %w[ account_id metadata require_guarantee ] end |
.optionals ⇒ Object
An array for optional fields
150 151 152 153 154 155 156 157 158 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 150 def self.optionals %w[ account_id network ach_class metadata require_guarantee ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 265 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, created: #{@created.inspect}, status:"\ " #{@status.inspect}, account_id: #{@account_id.inspect}, origination_account_id:"\ " #{@origination_account_id.inspect}, funding_account_id: #{@funding_account_id.inspect},"\ " amount: #{@amount.inspect}, mode: #{@mode.inspect}, network: #{@network.inspect},"\ " ach_class: #{@ach_class.inspect}, user: #{@user.inspect}, description:"\ " #{@description.inspect}, metadata: #{@metadata.inspect}, iso_currency_code:"\ " #{@iso_currency_code.inspect}, require_guarantee: #{@require_guarantee.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_custom_created ⇒ Object
249 250 251 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 249 def to_custom_created DateTimeHelper.to_rfc3339(created) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
254 255 256 257 258 259 260 261 262 |
# File 'lib/the_plaid_api/models/transfer_intent_create.rb', line 254 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, created: #{@created}, status: #{@status}, account_id:"\ " #{@account_id}, origination_account_id: #{@origination_account_id}, funding_account_id:"\ " #{@funding_account_id}, amount: #{@amount}, mode: #{@mode}, network: #{@network},"\ " ach_class: #{@ach_class}, user: #{@user}, description: #{@description}, metadata:"\ " #{@metadata}, iso_currency_code: #{@iso_currency_code}, require_guarantee:"\ " #{@require_guarantee}, additional_properties: #{@additional_properties}>" end |