Class: ThePlaidApi::ProcessorSignalDecisionReportRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::ProcessorSignalDecisionReportRequest
- Defined in:
- lib/the_plaid_api/models/processor_signal_decision_report_request.rb
Overview
ProcessorSignalDecisionReportRequest defines the request schema for ‘/processor/signal/decision/report`
Instance Attribute Summary collapse
-
#amount_instantly_available ⇒ Float
The amount (in USD) made available to your customers instantly following the debit transaction.
-
#client_id ⇒ String
Your Plaid API ‘client_id`.
-
#client_transaction_id ⇒ String
Must be the same as the ‘client_transaction_id` supplied when calling `/processor/signal/evaluate`.
-
#days_funds_on_hold ⇒ Integer
The actual number of days (hold time) since the ACH debit transaction that you wait before making funds available to your customers.
-
#decision_outcome ⇒ SignalDecisionOutcome
The payment decision from the risk assessment.
-
#initiated ⇒ TrueClass | FalseClass
‘true` if the ACH transaction was initiated, `false` otherwise.
-
#payment_method ⇒ SignalPaymentMethod
The payment method to complete the transaction after the risk assessment.
-
#processor_token ⇒ String
The processor token obtained from the Plaid integration partner.
-
#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(processor_token:, client_transaction_id:, initiated:, client_id: SKIP, secret: SKIP, days_funds_on_hold: SKIP, decision_outcome: SKIP, payment_method: SKIP, amount_instantly_available: SKIP, additional_properties: nil) ⇒ ProcessorSignalDecisionReportRequest
constructor
A new instance of ProcessorSignalDecisionReportRequest.
-
#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(processor_token:, client_transaction_id:, initiated:, client_id: SKIP, secret: SKIP, days_funds_on_hold: SKIP, decision_outcome: SKIP, payment_method: SKIP, amount_instantly_available: SKIP, additional_properties: nil) ⇒ ProcessorSignalDecisionReportRequest
Returns a new instance of ProcessorSignalDecisionReportRequest.
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 119 def initialize(processor_token:, client_transaction_id:, initiated:, client_id: SKIP, secret: SKIP, days_funds_on_hold: SKIP, decision_outcome: SKIP, payment_method: SKIP, amount_instantly_available: 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 @processor_token = processor_token @client_transaction_id = client_transaction_id @initiated = initiated @days_funds_on_hold = days_funds_on_hold unless days_funds_on_hold == SKIP @decision_outcome = decision_outcome unless decision_outcome == SKIP @payment_method = payment_method unless payment_method == SKIP unless amount_instantly_available == SKIP @amount_instantly_available = amount_instantly_available end @additional_properties = additional_properties end |
Instance Attribute Details
#amount_instantly_available ⇒ Float
The amount (in USD) made available to your customers instantly following the debit transaction. It could be a partial amount of the requested transaction (example: 102.05).
80 81 82 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 80 def amount_instantly_available @amount_instantly_available 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.
17 18 19 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 17 def client_id @client_id end |
#client_transaction_id ⇒ String
Must be the same as the ‘client_transaction_id` supplied when calling `/processor/signal/evaluate`
32 33 34 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 32 def client_transaction_id @client_transaction_id end |
#days_funds_on_hold ⇒ Integer
The actual number of days (hold time) since the ACH debit transaction that you wait before making funds available to your customers. The holding time could affect the ACH return rate. For example, use 0 if you make funds available to your customers instantly or the same day following the debit transaction, or 1 if you make funds available the next day following the debit initialization.
49 50 51 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 49 def days_funds_on_hold @days_funds_on_hold end |
#decision_outcome ⇒ SignalDecisionOutcome
The payment decision from the risk assessment. ‘APPROVE`: approve the transaction without requiring further actions from your customers. For example, use this field if you are placing a standard hold for all the approved transactions before making funds available to your customers. You should also use this field if you decide to accelerate the fund availability for your customers. `REVIEW`: the transaction requires manual review `REJECT`: reject the transaction `TAKE_OTHER_RISK_MEASURES`: for example, placing a longer hold on funds than those approved transactions or introducing customer frictions such as step-up verification/authentication `NOT_EVALUATED`: if only logging the results without using them
64 65 66 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 64 def decision_outcome @decision_outcome end |
#initiated ⇒ TrueClass | FalseClass
‘true` if the ACH transaction was initiated, `false` otherwise. This field must be returned as a boolean. If formatted incorrectly, this will result in an [`INVALID_FIELD`](plaid.com/docs/errors/invalid-request/#invalid_f ield) error.
40 41 42 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 40 def initiated @initiated end |
#payment_method ⇒ SignalPaymentMethod
The payment method to complete the transaction after the risk assessment. It may be different from the default payment method. ‘SAME_DAY_ACH`: Same Day ACH by Nacha. The debit transaction is processed and settled on the same day. `STANDARD_ACH`: Standard ACH by Nacha. `MULTIPLE_PAYMENT_METHODS`: if there is no default debit rail or there are multiple payment methods.
74 75 76 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 74 def payment_method @payment_method end |
#processor_token ⇒ String
The processor token obtained from the Plaid integration partner. Processor tokens are in the format: ‘processor-<environment>-<identifier>`
27 28 29 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 27 def processor_token @processor_token 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.
22 23 24 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 22 def secret @secret end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 172 173 174 175 176 177 178 179 180 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 142 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. processor_token = hash.key?('processor_token') ? hash['processor_token'] : nil client_transaction_id = hash.key?('client_transaction_id') ? hash['client_transaction_id'] : nil initiated = hash.key?('initiated') ? hash['initiated'] : nil client_id = hash.key?('client_id') ? hash['client_id'] : SKIP secret = hash.key?('secret') ? hash['secret'] : SKIP days_funds_on_hold = hash.key?('days_funds_on_hold') ? hash['days_funds_on_hold'] : SKIP decision_outcome = hash.key?('decision_outcome') ? hash['decision_outcome'] : SKIP payment_method = hash.key?('payment_method') ? hash['payment_method'] : SKIP amount_instantly_available = hash.key?('amount_instantly_available') ? hash['amount_instantly_available'] : 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. ProcessorSignalDecisionReportRequest.new(processor_token: processor_token, client_transaction_id: client_transaction_id, initiated: initiated, client_id: client_id, secret: secret, days_funds_on_hold: days_funds_on_hold, decision_outcome: decision_outcome, payment_method: payment_method, amount_instantly_available: amount_instantly_available, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 83 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['secret'] = 'secret' @_hash['processor_token'] = 'processor_token' @_hash['client_transaction_id'] = 'client_transaction_id' @_hash['initiated'] = 'initiated' @_hash['days_funds_on_hold'] = 'days_funds_on_hold' @_hash['decision_outcome'] = 'decision_outcome' @_hash['payment_method'] = 'payment_method' @_hash['amount_instantly_available'] = 'amount_instantly_available' @_hash end |
.nullables ⇒ Object
An array for nullable fields
110 111 112 113 114 115 116 117 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 110 def self.nullables %w[ days_funds_on_hold decision_outcome payment_method amount_instantly_available ] end |
.optionals ⇒ Object
An array for optional fields
98 99 100 101 102 103 104 105 106 107 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 98 def self.optionals %w[ client_id secret days_funds_on_hold decision_outcome payment_method amount_instantly_available ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
193 194 195 196 197 198 199 200 201 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 193 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.inspect},"\ " processor_token: #{@processor_token.inspect}, client_transaction_id:"\ " #{@client_transaction_id.inspect}, initiated: #{@initiated.inspect}, days_funds_on_hold:"\ " #{@days_funds_on_hold.inspect}, decision_outcome: #{@decision_outcome.inspect},"\ " payment_method: #{@payment_method.inspect}, amount_instantly_available:"\ " #{@amount_instantly_available.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
183 184 185 186 187 188 189 190 |
# File 'lib/the_plaid_api/models/processor_signal_decision_report_request.rb', line 183 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, processor_token:"\ " #{@processor_token}, client_transaction_id: #{@client_transaction_id}, initiated:"\ " #{@initiated}, days_funds_on_hold: #{@days_funds_on_hold}, decision_outcome:"\ " #{@decision_outcome}, payment_method: #{@payment_method}, amount_instantly_available:"\ " #{@amount_instantly_available}, additional_properties: #{@additional_properties}>" end |