Class: Plaid::SignalApi
Overview
SignalApi
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#signal_decision_report(body) ⇒ ApiResponse
After calling ‘/signal/evaluate`, call `/signal/decision/report` to report whether the transaction was initiated.
-
#signal_evaluate(body) ⇒ ApiResponse
Use ‘/signal/evaluate` to evaluate a planned ACH transaction to get a return risk assessment (such as a risk score and risk tier) and additional risk signals.
-
#signal_return_report(body) ⇒ ApiResponse
Call the ‘/signal/return/report` endpoint to report a returned transaction that was previously sent to the `/signal/evaluate` endpoint.
Methods inherited from BaseApi
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from Plaid::BaseApi
Instance Method Details
#signal_decision_report(body) ⇒ ApiResponse
After calling ‘/signal/evaluate`, call `/signal/decision/report` to report whether the transaction was initiated. This endpoint will return an `INVALID_REQUEST` error if called a second time with a different value for `initiated`. description here
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/plaid/apis/signal_api.rb', line 48 def signal_decision_report(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/signal/decision/report', Server::DEFAULT) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(And.new('PLAID-CLIENT-ID', 'PLAID-SECRET', 'Plaid-Version'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(SignalDecisionReportResponse.method(:from_hash)) .is_api_response(true) .local_error('default', 'Error response.', ErrorErrorException)) .execute end |
#signal_evaluate(body) ⇒ ApiResponse
Use ‘/signal/evaluate` to evaluate a planned ACH transaction to get a return risk assessment (such as a risk score and risk tier) and additional risk signals. In order to obtain a valid score for an ACH transaction, Plaid must have an access token for the account, and the Item must be healthy (receiving product updates) or have recently been in a healthy state. If the transaction does not meet eligibility requirements, an error will be returned corresponding to the underlying cause. description here
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/plaid/apis/signal_api.rb', line 20 def signal_evaluate(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/signal/evaluate', Server::DEFAULT) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(And.new('PLAID-CLIENT-ID', 'PLAID-SECRET', 'Plaid-Version'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(SignalEvaluateResponse.method(:from_hash)) .is_api_response(true) .local_error('default', 'Error response.', ErrorErrorException)) .execute end |
#signal_return_report(body) ⇒ ApiResponse
Call the ‘/signal/return/report` endpoint to report a returned transaction that was previously sent to the `/signal/evaluate` endpoint. Your feedback will be used by the model to incorporate the latest risk trend in your portfolio. description here
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/plaid/apis/signal_api.rb', line 76 def signal_return_report(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/signal/return/report', Server::DEFAULT) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(And.new('PLAID-CLIENT-ID', 'PLAID-SECRET', 'Plaid-Version'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(SignalReturnReportResponse.method(:from_hash)) .is_api_response(true) .local_error('default', 'Error response.', ErrorErrorException)) .execute end |