Class: ThePlaidApi::SandboxTransferRfpSimulateRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::SandboxTransferRfpSimulateRequest
- Defined in:
- lib/the_plaid_api/models/sandbox_transfer_rfp_simulate_request.rb
Overview
Defines the request schema for ‘/sandbox/transfer/rfp/simulate`
Instance Attribute Summary collapse
-
#action ⇒ SandboxTransferRfpSimulateAction
The action to simulate.
-
#amount ⇒ String
The transfer amount provided by the caller for validation purposes, must match the amount on the transfer associated with the provided ‘transfer_id`.
-
#client_name ⇒ String
The client name provided by the caller for validation purposes, must match the sender client name on the transfer associated with the provided ‘transfer_id`.
-
#transfer_id ⇒ String
Plaid’s unique identifier for a transfer.
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(transfer_id:, action:, amount:, client_name:, additional_properties: nil) ⇒ SandboxTransferRfpSimulateRequest
constructor
A new instance of SandboxTransferRfpSimulateRequest.
-
#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(transfer_id:, action:, amount:, client_name:, additional_properties: nil) ⇒ SandboxTransferRfpSimulateRequest
Returns a new instance of SandboxTransferRfpSimulateRequest.
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/the_plaid_api/models/sandbox_transfer_rfp_simulate_request.rb', line 56 def initialize(transfer_id:, action:, amount:, client_name:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @transfer_id = transfer_id @action = action @amount = amount @client_name = client_name @additional_properties = additional_properties end |
Instance Attribute Details
#action ⇒ SandboxTransferRfpSimulateAction
The action to simulate. Must be either ‘approve` or `reject`.
-
‘approve`: Simulates bank approval, transitioning the transfer to
‘settled` status
-
‘reject`: Simulates bank rejection, transitioning the transfer to
‘failed` status
22 23 24 |
# File 'lib/the_plaid_api/models/sandbox_transfer_rfp_simulate_request.rb', line 22 def action @action end |
#amount ⇒ String
The transfer amount provided by the caller for validation purposes, must match the amount on the transfer associated with the provided ‘transfer_id`.
28 29 30 |
# File 'lib/the_plaid_api/models/sandbox_transfer_rfp_simulate_request.rb', line 28 def amount @amount end |
#client_name ⇒ String
The client name provided by the caller for validation purposes, must match the sender client name on the transfer associated with the provided ‘transfer_id`.
34 35 36 |
# File 'lib/the_plaid_api/models/sandbox_transfer_rfp_simulate_request.rb', line 34 def client_name @client_name end |
#transfer_id ⇒ String
Plaid’s unique identifier for a transfer.
14 15 16 |
# File 'lib/the_plaid_api/models/sandbox_transfer_rfp_simulate_request.rb', line 14 def transfer_id @transfer_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/the_plaid_api/models/sandbox_transfer_rfp_simulate_request.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. transfer_id = hash.key?('transfer_id') ? hash['transfer_id'] : nil action = hash.key?('action') ? hash['action'] : nil amount = hash.key?('amount') ? hash['amount'] : nil client_name = hash.key?('client_name') ? hash['client_name'] : nil # 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. SandboxTransferRfpSimulateRequest.new(transfer_id: transfer_id, action: action, amount: amount, client_name: client_name, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 |
# File 'lib/the_plaid_api/models/sandbox_transfer_rfp_simulate_request.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['transfer_id'] = 'transfer_id' @_hash['action'] = 'action' @_hash['amount'] = 'amount' @_hash['client_name'] = 'client_name' @_hash end |
.nullables ⇒ Object
An array for nullable fields
52 53 54 |
# File 'lib/the_plaid_api/models/sandbox_transfer_rfp_simulate_request.rb', line 52 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
47 48 49 |
# File 'lib/the_plaid_api/models/sandbox_transfer_rfp_simulate_request.rb', line 47 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
101 102 103 104 105 106 |
# File 'lib/the_plaid_api/models/sandbox_transfer_rfp_simulate_request.rb', line 101 def inspect class_name = self.class.name.split('::').last "<#{class_name} transfer_id: #{@transfer_id.inspect}, action: #{@action.inspect}, amount:"\ " #{@amount.inspect}, client_name: #{@client_name.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
94 95 96 97 98 |
# File 'lib/the_plaid_api/models/sandbox_transfer_rfp_simulate_request.rb', line 94 def to_s class_name = self.class.name.split('::').last "<#{class_name} transfer_id: #{@transfer_id}, action: #{@action}, amount: #{@amount},"\ " client_name: #{@client_name}, additional_properties: #{@additional_properties}>" end |