Class: ThePlaidApi::ProcessorSignalEvaluateResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::ProcessorSignalEvaluateResponse
- Defined in:
- lib/the_plaid_api/models/processor_signal_evaluate_response.rb
Overview
ProcessorSignalEvaluateResponse defines the response schema for ‘/processor/signal/evaluate`
Instance Attribute Summary collapse
-
#core_attributes ⇒ SignalEvaluateCoreAttributes
The core attributes object contains additional data that can be used to assess the ACH return risk.
-
#request_id ⇒ String
A unique identifier for the request, which can be used for troubleshooting.
-
#ruleset ⇒ SignalEvaluateRuleset
Details about the transaction result after evaluation by the requested Ruleset.
-
#scores ⇒ SignalEvaluateScores
Risk scoring details broken down by risk category.
-
#warnings ⇒ Array[SignalWarning]
If bank information was not available to be used in the Signal Transaction Scores model, this array contains warnings describing why bank data is missing.
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(request_id:, scores:, core_attributes: SKIP, ruleset: SKIP, warnings: SKIP, additional_properties: nil) ⇒ ProcessorSignalEvaluateResponse
constructor
A new instance of ProcessorSignalEvaluateResponse.
-
#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(request_id:, scores:, core_attributes: SKIP, ruleset: SKIP, warnings: SKIP, additional_properties: nil) ⇒ ProcessorSignalEvaluateResponse
Returns a new instance of ProcessorSignalEvaluateResponse.
92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/the_plaid_api/models/processor_signal_evaluate_response.rb', line 92 def initialize(request_id:, scores:, core_attributes: SKIP, ruleset: SKIP, warnings: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @request_id = request_id @scores = scores @core_attributes = core_attributes unless core_attributes == SKIP @ruleset = ruleset unless ruleset == SKIP @warnings = warnings unless warnings == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#core_attributes ⇒ SignalEvaluateCoreAttributes
The core attributes object contains additional data that can be used to assess the ACH return risk. If using a Balance-only ruleset, only ‘available_balance` and `current_balance` will be returned as core attributes. If using a Signal Transaction Scores ruleset, over 80 core attributes will be returned. Examples of attributes include: `available_balance` and `current_balance`: The balance in the ACH transaction funding account `days_since_first_plaid_connection`: The number of days since the first time the Item was connected to an application via Plaid `plaid_connections_count_7d`: The number of times the Item has been connected to applications via Plaid over the past 7 days `plaid_connections_count_30d`: The number of times the Item has been connected to applications via Plaid over the past 30 days `total_plaid_connections_count`: The number of times the Item has been connected to applications via Plaid `is_savings_or_money_market_account`: Indicates whether the ACH transaction funding account is a savings/money market account For the full list and detailed documentation of core attributes available, or to request that core attributes not be returned, contact Sales or your Plaid account manager.
46 47 48 |
# File 'lib/the_plaid_api/models/processor_signal_evaluate_response.rb', line 46 def core_attributes @core_attributes end |
#request_id ⇒ String
A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.
17 18 19 |
# File 'lib/the_plaid_api/models/processor_signal_evaluate_response.rb', line 17 def request_id @request_id end |
#ruleset ⇒ SignalEvaluateRuleset
Details about the transaction result after evaluation by the requested Ruleset. If a ‘ruleset_key` is not provided, for customers who began using Signal Transaction Scores before October 15, 2025, by default, this field will be omitted. To learn more, see [Signal Rules](plaid.com/docs/signal/signal-rules/).
54 55 56 |
# File 'lib/the_plaid_api/models/processor_signal_evaluate_response.rb', line 54 def ruleset @ruleset end |
#scores ⇒ SignalEvaluateScores
Risk scoring details broken down by risk category. When using a Balance-only ruleset, this object will not be returned.
22 23 24 |
# File 'lib/the_plaid_api/models/processor_signal_evaluate_response.rb', line 22 def scores @scores end |
#warnings ⇒ Array[SignalWarning]
If bank information was not available to be used in the Signal Transaction Scores model, this array contains warnings describing why bank data is missing. If you want to receive an API error instead of scores in the case of missing bank data, file a support ticket or contact your Plaid account manager.
62 63 64 |
# File 'lib/the_plaid_api/models/processor_signal_evaluate_response.rb', line 62 def warnings @warnings end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/the_plaid_api/models/processor_signal_evaluate_response.rb', line 106 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. request_id = hash.key?('request_id') ? hash['request_id'] : nil scores = SignalEvaluateScores.from_hash(hash['scores']) if hash['scores'] core_attributes = SignalEvaluateCoreAttributes.from_hash(hash['core_attributes']) if hash['core_attributes'] ruleset = SignalEvaluateRuleset.from_hash(hash['ruleset']) if hash['ruleset'] # Parameter is an array, so we need to iterate through it warnings = nil unless hash['warnings'].nil? warnings = [] hash['warnings'].each do |structure| warnings << (SignalWarning.from_hash(structure) if structure) end end warnings = SKIP unless hash.key?('warnings') # 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. ProcessorSignalEvaluateResponse.new(request_id: request_id, scores: scores, core_attributes: core_attributes, ruleset: ruleset, warnings: warnings, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
65 66 67 68 69 70 71 72 73 |
# File 'lib/the_plaid_api/models/processor_signal_evaluate_response.rb', line 65 def self.names @_hash = {} if @_hash.nil? @_hash['request_id'] = 'request_id' @_hash['scores'] = 'scores' @_hash['core_attributes'] = 'core_attributes' @_hash['ruleset'] = 'ruleset' @_hash['warnings'] = 'warnings' @_hash end |
.nullables ⇒ Object
An array for nullable fields
85 86 87 88 89 90 |
# File 'lib/the_plaid_api/models/processor_signal_evaluate_response.rb', line 85 def self.nullables %w[ scores ruleset ] end |
.optionals ⇒ Object
An array for optional fields
76 77 78 79 80 81 82 |
# File 'lib/the_plaid_api/models/processor_signal_evaluate_response.rb', line 76 def self.optionals %w[ core_attributes ruleset warnings ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
151 152 153 154 155 156 |
# File 'lib/the_plaid_api/models/processor_signal_evaluate_response.rb', line 151 def inspect class_name = self.class.name.split('::').last "<#{class_name} request_id: #{@request_id.inspect}, scores: #{@scores.inspect},"\ " core_attributes: #{@core_attributes.inspect}, ruleset: #{@ruleset.inspect}, warnings:"\ " #{@warnings.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
143 144 145 146 147 148 |
# File 'lib/the_plaid_api/models/processor_signal_evaluate_response.rb', line 143 def to_s class_name = self.class.name.split('::').last "<#{class_name} request_id: #{@request_id}, scores: #{@scores}, core_attributes:"\ " #{@core_attributes}, ruleset: #{@ruleset}, warnings: #{@warnings}, additional_properties:"\ " #{@additional_properties}>" end |