Class: ThePlaidApi::TransferAuthorizationDecision
- Inherits:
-
Object
- Object
- ThePlaidApi::TransferAuthorizationDecision
- Defined in:
- lib/the_plaid_api/models/transfer_authorization_decision.rb
Overview
A decision regarding the proposed transfer. ‘approved` – The proposed transfer has received the end user’s consent and has been approved for processing by Plaid. The ‘decision_rationale` field is set if Plaid was unable to fetch the account information. You may proceed with the transfer, but further review is recommended. Refer to the `code` field in the `decision_rationale` object for details. `declined` – Plaid reviewed the proposed transfer and declined processing. Refer to the `code` field in the `decision_rationale` object for details. `user_action_required` – An action is required before Plaid can assess the transfer risk and make a decision. The most common scenario is to update authentication for an Item. To complete the required action, initialize Link by setting `transfer.authorization_id` in the request of `/link/token/create`. After Link flow is completed, you may re-attempt the authorization request. For `guarantee` requests, `approved` indicates the transfer is eligible for Plaid’s guarantee, and ‘declined` indicates Plaid will not provide guarantee coverage for the transfer. `user_action_required` indicates you should follow the above guidance before re-attempting.
Constant Summary collapse
- TRANSFER_AUTHORIZATION_DECISION =
[ # TODO: Write general description for APPROVED APPROVED = 'approved'.freeze, # TODO: Write general description for DECLINED DECLINED = 'declined'.freeze, # TODO: Write general description for USER_ACTION_REQUIRED USER_ACTION_REQUIRED = 'user_action_required'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = APPROVED) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/the_plaid_api/models/transfer_authorization_decision.rb', line 42 def self.from_value(value, default_value = APPROVED) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'approved' then APPROVED when 'declined' then DECLINED when 'user_action_required' then USER_ACTION_REQUIRED else default_value end end |
.validate(value) ⇒ Object
36 37 38 39 40 |
# File 'lib/the_plaid_api/models/transfer_authorization_decision.rb', line 36 def self.validate(value) return false if value.nil? TRANSFER_AUTHORIZATION_DECISION.include?(value) end |