Class: ThePlaidApi::TransferLedgerDepositRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransferLedgerDepositRequest
- Defined in:
- lib/the_plaid_api/models/transfer_ledger_deposit_request.rb
Overview
Defines the request schema for ‘/transfer/ledger/deposit`
Instance Attribute Summary collapse
-
#amount ⇒ String
A positive amount of how much will be deposited into ledger (decimal string with two digits of precision e.g. “5.50”).
-
#client_id ⇒ String
Your Plaid API ‘client_id`.
-
#description ⇒ String
The description of the deposit that will be passed to the receiving bank (up to 10 characters).
-
#funding_account_id ⇒ String
Specify which funding account to use.
-
#idempotency_key ⇒ String
A unique key provided by the client, per unique ledger deposit.
-
#ledger_id ⇒ String
Specify which ledger balance to deposit to.
-
#network ⇒ TransferAchNetwork
The ACH networks used for the funds flow.
-
#originator_client_id ⇒ String
Client ID of the customer that owns the Ledger balance.
-
#secret ⇒ String
Your Plaid API ‘secret`.
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(amount:, idempotency_key:, network:, client_id: SKIP, secret: SKIP, originator_client_id: SKIP, funding_account_id: SKIP, ledger_id: SKIP, description: SKIP, additional_properties: nil) ⇒ TransferLedgerDepositRequest
constructor
A new instance of TransferLedgerDepositRequest.
-
#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(amount:, idempotency_key:, network:, client_id: SKIP, secret: SKIP, originator_client_id: SKIP, funding_account_id: SKIP, ledger_id: SKIP, description: SKIP, additional_properties: nil) ⇒ TransferLedgerDepositRequest
Returns a new instance of TransferLedgerDepositRequest.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 116 def initialize(amount:, idempotency_key:, network:, client_id: SKIP, secret: SKIP, originator_client_id: SKIP, funding_account_id: SKIP, ledger_id: SKIP, description: 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 @originator_client_id = originator_client_id unless originator_client_id == SKIP @funding_account_id = funding_account_id unless funding_account_id == SKIP @ledger_id = ledger_id unless ledger_id == SKIP @amount = amount @description = description unless description == SKIP @idempotency_key = idempotency_key @network = network @additional_properties = additional_properties end |
Instance Attribute Details
#amount ⇒ String
A positive amount of how much will be deposited into ledger (decimal string with two digits of precision e.g. “5.50”).
49 50 51 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 49 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_ledger_deposit_request.rb', line 16 def client_id @client_id end |
#description ⇒ String
The description of the deposit that will be passed to the receiving bank (up to 10 characters). Note that banks utilize this field differently, and may or may not show it on the bank statement.
55 56 57 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 55 def description @description end |
#funding_account_id ⇒ String
Specify which funding account to use. Customers can find a list of ‘funding_account_id`s in the Accounts page of the Plaid Dashboard, under the “Account ID” column. If this field is left blank, the funding account associated with the specified Ledger will be used. If an `originator_client_id` is specified, the `funding_account_id` must belong to the specified originator.
38 39 40 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 38 def funding_account_id @funding_account_id end |
#idempotency_key ⇒ String
A unique key provided by the client, per unique ledger deposit. Maximum of 50 characters. The API supports idempotency for safely retrying the request without accidentally performing the same operation twice. For example, if a request to create a ledger deposit fails due to a network connection error, you can retry the request with the same idempotency key to guarantee that only a single deposit is created.
65 66 67 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 65 def idempotency_key @idempotency_key end |
#ledger_id ⇒ String
Specify which ledger balance to deposit to. Customers can find a list of ‘ledger_id`s in the Accounts page of your Plaid Dashboard. If this field is left blank, this will default to id of the default ledger balance.
44 45 46 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 44 def ledger_id @ledger_id end |
#network ⇒ TransferAchNetwork
The ACH networks used for the funds flow. For requests submitted as either ‘ach` or `same-day-ach` the cutoff for Same Day ACH is 3:00 PM Eastern Time and the cutoff for Standard ACH transfers is 8:30 PM Eastern Time. It is recommended to submit a request at least 15 minutes before the cutoff time in order to ensure that it will be processed before the cutoff. Any request that is indicated as `same-day-ach` and that misses the Same Day ACH cutoff, but is submitted in time for the Standard ACH cutoff, will be sent over Standard ACH rails and will not incur same-day charges.
77 78 79 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 77 def network @network end |
#originator_client_id ⇒ String
Client ID of the customer that owns the Ledger balance. This is so Plaid knows which of your customers to payout or collect funds. Only applicable for [Platform customers](plaid.com/docs/transfer/application/#originators-vs-pla tforms). Do not include if you’re paying out to yourself.
29 30 31 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 29 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.
21 22 23 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 21 def secret @secret end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
136 137 138 139 140 141 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 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 136 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. amount = hash.key?('amount') ? hash['amount'] : nil idempotency_key = hash.key?('idempotency_key') ? hash['idempotency_key'] : nil network = hash.key?('network') ? hash['network'] : nil client_id = hash.key?('client_id') ? hash['client_id'] : SKIP secret = hash.key?('secret') ? hash['secret'] : SKIP originator_client_id = hash.key?('originator_client_id') ? hash['originator_client_id'] : SKIP funding_account_id = hash.key?('funding_account_id') ? hash['funding_account_id'] : SKIP ledger_id = hash.key?('ledger_id') ? hash['ledger_id'] : SKIP description = hash.key?('description') ? hash['description'] : 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. TransferLedgerDepositRequest.new(amount: amount, idempotency_key: idempotency_key, network: network, client_id: client_id, secret: secret, originator_client_id: originator_client_id, funding_account_id: funding_account_id, ledger_id: ledger_id, description: description, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 80 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['secret'] = 'secret' @_hash['originator_client_id'] = 'originator_client_id' @_hash['funding_account_id'] = 'funding_account_id' @_hash['ledger_id'] = 'ledger_id' @_hash['amount'] = 'amount' @_hash['description'] = 'description' @_hash['idempotency_key'] = 'idempotency_key' @_hash['network'] = 'network' @_hash end |
.nullables ⇒ Object
An array for nullable fields
107 108 109 110 111 112 113 114 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 107 def self.nullables %w[ originator_client_id funding_account_id ledger_id description ] end |
.optionals ⇒ Object
An array for optional fields
95 96 97 98 99 100 101 102 103 104 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 95 def self.optionals %w[ client_id secret originator_client_id funding_account_id ledger_id description ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
184 185 186 187 188 189 190 191 192 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 184 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.inspect},"\ " originator_client_id: #{@originator_client_id.inspect}, funding_account_id:"\ " #{@funding_account_id.inspect}, ledger_id: #{@ledger_id.inspect}, amount:"\ " #{@amount.inspect}, description: #{@description.inspect}, idempotency_key:"\ " #{@idempotency_key.inspect}, network: #{@network.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
174 175 176 177 178 179 180 181 |
# File 'lib/the_plaid_api/models/transfer_ledger_deposit_request.rb', line 174 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, originator_client_id:"\ " #{@originator_client_id}, funding_account_id: #{@funding_account_id}, ledger_id:"\ " #{@ledger_id}, amount: #{@amount}, description: #{@description}, idempotency_key:"\ " #{@idempotency_key}, network: #{@network}, additional_properties:"\ " #{@additional_properties}>" end |