Class: ThePlaidApi::TransferAuthorizationProposedTransfer
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransferAuthorizationProposedTransfer
- Defined in:
- lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb
Overview
Details regarding the proposed transfer.
Instance Attribute Summary collapse
-
#account_id ⇒ String
The Plaid ‘account_id` for the 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”).
-
#credit_funds_source ⇒ TransferCreditFundsSource
The Plaid client ID that is the originator of this transfer.
-
#funding_account_id ⇒ String
The id of the associated funding account, available in the Plaid Dashboard.
-
#iso_currency_code ⇒ String
The currency of the transfer amount.
-
#ledger_id ⇒ String
Plaid’s unique identifier for a Plaid Ledger Balance.
-
#network ⇒ String
The network or rails used for the transfer.
-
#origination_account_id ⇒ String
Plaid’s unique identifier for the origination account that was used for this transfer.
-
#originator_client_id ⇒ String
The Plaid client ID that is the originator of this transfer.
-
#type ⇒ TransferType1
The type of transfer.
-
#user ⇒ TransferUserInResponse
The legal name and other information for the account holder.
-
#wire_details ⇒ TransferWireDetails
Information specific to wire transfers.
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(funding_account_id:, type:, user:, amount:, network:, origination_account_id:, iso_currency_code:, originator_client_id:, credit_funds_source:, ach_class: SKIP, account_id: SKIP, ledger_id: SKIP, wire_details: SKIP, additional_properties: nil) ⇒ TransferAuthorizationProposedTransfer
constructor
A new instance of TransferAuthorizationProposedTransfer.
-
#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(funding_account_id:, type:, user:, amount:, network:, origination_account_id:, iso_currency_code:, originator_client_id:, credit_funds_source:, ach_class: SKIP, account_id: SKIP, ledger_id: SKIP, wire_details: SKIP, additional_properties: nil) ⇒ TransferAuthorizationProposedTransfer
Returns a new instance of TransferAuthorizationProposedTransfer.
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 137 def initialize(funding_account_id:, type:, user:, amount:, network:, origination_account_id:, iso_currency_code:, originator_client_id:, credit_funds_source:, ach_class: SKIP, account_id: SKIP, ledger_id: SKIP, wire_details: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @ach_class = ach_class unless ach_class == SKIP @account_id = account_id unless account_id == SKIP @funding_account_id = funding_account_id @ledger_id = ledger_id unless ledger_id == SKIP @type = type @user = user @amount = amount @network = network @wire_details = wire_details unless wire_details == SKIP @origination_account_id = origination_account_id @iso_currency_code = iso_currency_code @originator_client_id = originator_client_id @credit_funds_source = credit_funds_source @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
The Plaid ‘account_id` for the account that will be debited or credited.
35 36 37 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 35 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.
31 32 33 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 31 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.
64 65 66 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 64 def amount @amount end |
#credit_funds_source ⇒ TransferCreditFundsSource
The Plaid client ID that is the originator of this transfer. Only present if created on behalf of another client as a [Platform customer](plaid.com/docs/transfer/application/#originators-vs-plat forms).
95 96 97 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 95 def credit_funds_source @credit_funds_source end |
#funding_account_id ⇒ String
The id of the associated funding account, available in the Plaid Dashboard. If present, this indicates which of your business checking accounts will be credited or debited.
41 42 43 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 41 def funding_account_id @funding_account_id end |
#iso_currency_code ⇒ String
The currency of the transfer amount. The default value is “USD”.
81 82 83 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 81 def iso_currency_code @iso_currency_code end |
#ledger_id ⇒ String
Plaid’s unique identifier for a Plaid Ledger Balance.
45 46 47 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 45 def ledger_id @ledger_id end |
#network ⇒ String
The network or rails used for the transfer.
68 69 70 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 68 def network @network end |
#origination_account_id ⇒ String
Plaid’s unique identifier for the origination account that was used for this transfer.
77 78 79 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 77 def origination_account_id @origination_account_id end |
#originator_client_id ⇒ String
The Plaid client ID that is the originator of this transfer. Only present if created on behalf of another client as a [Platform customer](plaid.com/docs/transfer/application/#originators-vs-plat forms).
88 89 90 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 88 def originator_client_id @originator_client_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.
51 52 53 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 51 def type @type end |
#user ⇒ TransferUserInResponse
The legal name and other information for the account holder.
55 56 57 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 55 def user @user end |
#wire_details ⇒ TransferWireDetails
Information specific to wire transfers.
72 73 74 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 72 def wire_details @wire_details end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 162 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. funding_account_id = hash.key?('funding_account_id') ? hash['funding_account_id'] : nil type = hash.key?('type') ? hash['type'] : nil user = TransferUserInResponse.from_hash(hash['user']) if hash['user'] amount = hash.key?('amount') ? hash['amount'] : nil network = hash.key?('network') ? hash['network'] : nil origination_account_id = hash.key?('origination_account_id') ? hash['origination_account_id'] : nil iso_currency_code = hash.key?('iso_currency_code') ? hash['iso_currency_code'] : nil originator_client_id = hash.key?('originator_client_id') ? hash['originator_client_id'] : nil credit_funds_source = hash.key?('credit_funds_source') ? hash['credit_funds_source'] : nil ach_class = hash.key?('ach_class') ? hash['ach_class'] : SKIP account_id = hash.key?('account_id') ? hash['account_id'] : SKIP ledger_id = hash.key?('ledger_id') ? hash['ledger_id'] : SKIP wire_details = TransferWireDetails.from_hash(hash['wire_details']) if hash['wire_details'] # 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. TransferAuthorizationProposedTransfer.new(funding_account_id: funding_account_id, type: type, user: user, amount: amount, network: network, origination_account_id: origination_account_id, iso_currency_code: iso_currency_code, originator_client_id: originator_client_id, credit_funds_source: credit_funds_source, ach_class: ach_class, account_id: account_id, ledger_id: ledger_id, wire_details: wire_details, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 98 def self.names @_hash = {} if @_hash.nil? @_hash['ach_class'] = 'ach_class' @_hash['account_id'] = 'account_id' @_hash['funding_account_id'] = 'funding_account_id' @_hash['ledger_id'] = 'ledger_id' @_hash['type'] = 'type' @_hash['user'] = 'user' @_hash['amount'] = 'amount' @_hash['network'] = 'network' @_hash['wire_details'] = 'wire_details' @_hash['origination_account_id'] = 'origination_account_id' @_hash['iso_currency_code'] = 'iso_currency_code' @_hash['originator_client_id'] = 'originator_client_id' @_hash['credit_funds_source'] = 'credit_funds_source' @_hash end |
.nullables ⇒ Object
An array for nullable fields
127 128 129 130 131 132 133 134 135 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 127 def self.nullables %w[ funding_account_id ledger_id wire_details originator_client_id credit_funds_source ] end |
.optionals ⇒ Object
An array for optional fields
117 118 119 120 121 122 123 124 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 117 def self.optionals %w[ ach_class account_id ledger_id wire_details ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
221 222 223 224 225 226 227 228 229 230 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 221 def inspect class_name = self.class.name.split('::').last "<#{class_name} ach_class: #{@ach_class.inspect}, account_id: #{@account_id.inspect},"\ " funding_account_id: #{@funding_account_id.inspect}, ledger_id: #{@ledger_id.inspect},"\ " type: #{@type.inspect}, user: #{@user.inspect}, amount: #{@amount.inspect}, network:"\ " #{@network.inspect}, wire_details: #{@wire_details.inspect}, origination_account_id:"\ " #{@origination_account_id.inspect}, iso_currency_code: #{@iso_currency_code.inspect},"\ " originator_client_id: #{@originator_client_id.inspect}, credit_funds_source:"\ " #{@credit_funds_source.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
210 211 212 213 214 215 216 217 218 |
# File 'lib/the_plaid_api/models/transfer_authorization_proposed_transfer.rb', line 210 def to_s class_name = self.class.name.split('::').last "<#{class_name} ach_class: #{@ach_class}, account_id: #{@account_id}, funding_account_id:"\ " #{@funding_account_id}, ledger_id: #{@ledger_id}, type: #{@type}, user: #{@user}, amount:"\ " #{@amount}, network: #{@network}, wire_details: #{@wire_details}, origination_account_id:"\ " #{@origination_account_id}, iso_currency_code: #{@iso_currency_code},"\ " originator_client_id: #{@originator_client_id}, credit_funds_source:"\ " #{@credit_funds_source}, additional_properties: #{@additional_properties}>" end |