Class: ThePlaidApi::SignalDecisionReportRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::SignalDecisionReportRequest
- Defined in:
- lib/the_plaid_api/models/signal_decision_report_request.rb
Overview
SignalDecisionReportRequest defines the request schema for ‘/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 `/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.
-
#secret ⇒ String
Your Plaid API ‘secret`.
-
#submitted_at ⇒ DateTime
The date the ACH debit was submitted to the bank for processing (in ISO 8601 format: ‘YYYY-MM-DDTHH:mm:ssZ`).
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(client_transaction_id:, initiated:, client_id: SKIP, secret: SKIP, days_funds_on_hold: SKIP, decision_outcome: SKIP, payment_method: SKIP, amount_instantly_available: SKIP, submitted_at: SKIP, additional_properties: nil) ⇒ SignalDecisionReportRequest
constructor
A new instance of SignalDecisionReportRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_submitted_at ⇒ 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(client_transaction_id:, initiated:, client_id: SKIP, secret: SKIP, days_funds_on_hold: SKIP, decision_outcome: SKIP, payment_method: SKIP, amount_instantly_available: SKIP, submitted_at: SKIP, additional_properties: nil) ⇒ SignalDecisionReportRequest
Returns a new instance of SignalDecisionReportRequest.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 122 def initialize(client_transaction_id:, initiated:, client_id: SKIP, secret: SKIP, days_funds_on_hold: SKIP, decision_outcome: SKIP, payment_method: SKIP, amount_instantly_available: SKIP, submitted_at: 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 @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 @submitted_at = submitted_at unless submitted_at == SKIP @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).
76 77 78 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 76 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.
18 19 20 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 18 def client_id @client_id end |
#client_transaction_id ⇒ String
Must be the same as the ‘client_transaction_id` supplied when calling `/signal/evaluate`
28 29 30 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 28 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.
45 46 47 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 45 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
60 61 62 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 60 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.
36 37 38 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 36 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.
70 71 72 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 70 def payment_method @payment_method 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.
23 24 25 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 23 def secret @secret end |
#submitted_at ⇒ DateTime
The date the ACH debit was submitted to the bank for processing (in ISO 8601 format: ‘YYYY-MM-DDTHH:mm:ssZ`). This field should correspond to the attempt initiated after the `/signal/schedule` call.
82 83 84 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 82 def submitted_at @submitted_at end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 181 182 183 184 185 186 187 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 146 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. 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 submitted_at = if hash.key?('submitted_at') (DateTimeHelper.from_rfc3339(hash['submitted_at']) if hash['submitted_at']) else SKIP end # 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. SignalDecisionReportRequest.new(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, submitted_at: submitted_at, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 85 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['secret'] = 'secret' @_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['submitted_at'] = 'submitted_at' @_hash end |
.nullables ⇒ Object
An array for nullable fields
113 114 115 116 117 118 119 120 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 113 def self.nullables %w[ days_funds_on_hold decision_outcome payment_method amount_instantly_available ] end |
.optionals ⇒ Object
An array for optional fields
100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 100 def self.optionals %w[ client_id secret days_funds_on_hold decision_outcome payment_method amount_instantly_available submitted_at ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
204 205 206 207 208 209 210 211 212 213 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 204 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.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}, submitted_at: #{@submitted_at.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_custom_submitted_at ⇒ Object
189 190 191 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 189 def to_custom_submitted_at DateTimeHelper.to_rfc3339(submitted_at) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
194 195 196 197 198 199 200 201 |
# File 'lib/the_plaid_api/models/signal_decision_report_request.rb', line 194 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, 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},"\ " submitted_at: #{@submitted_at}, additional_properties: #{@additional_properties}>" end |