Class: ThePlaidApi::TransferAuthorizationDecisionRationaleCode
- Inherits:
-
Object
- Object
- ThePlaidApi::TransferAuthorizationDecisionRationaleCode
- Defined in:
- lib/the_plaid_api/models/transfer_authorization_decision_rationale_code.rb
Overview
A code representing the rationale for approving or declining the proposed transfer. If the ‘rationale_code` is `null`, the transfer passed the authorization check. Any non-`null` value for an `approved` transfer indicates that the the authorization check could not be run and that you should perform your own risk assessment on the transfer. The code will indicate why the check could not be run. Possible values for an `approved` transfer are: `MANUALLY_VERIFIED_ITEM` – Item created via a manual entry flow (i.e. Same Day Micro-deposit, Instant Micro-deposit, or database-based verification), limited information available. `ITEM_LOGIN_REQUIRED` – Unable to collect the account information due to Item staleness. Can be resolved by using Link and setting [`transfer.authorization_id`](plaid.com/docs/api/link/#link-token-cr eate-request-transfer-authorization-id) in the request to `/link/token/create`. `MIGRATED_ACCOUNT_ITEM` - Item created via `/transfer/migrate_account` endpoint, limited information available. `ERROR` – Unable to collect the account information due to an unspecified error. The following codes indicate that the authorization decision was `declined`: `NSF` – Transaction likely to result in a return due to insufficient funds. `RISK` - Transaction is high-risk. `TRANSFER_LIMIT_REACHED` - One or several transfer limits are reached, e.g. monthly transfer limit. Check the accompanying `description` field to understand which limit has been reached.
Constant Summary collapse
- TRANSFER_AUTHORIZATION_DECISION_RATIONALE_CODE =
[ # TODO: Write general description for NSF NSF = 'NSF'.freeze, # TODO: Write general description for RISK RISK = 'RISK'.freeze, # TODO: Write general description for TRANSFER_LIMIT_REACHED TRANSFER_LIMIT_REACHED = 'TRANSFER_LIMIT_REACHED'.freeze, # TODO: Write general description for MANUALLY_VERIFIED_ITEM MANUALLY_VERIFIED_ITEM = 'MANUALLY_VERIFIED_ITEM'.freeze, # TODO: Write general description for ITEM_LOGIN_REQUIRED ITEM_LOGIN_REQUIRED = 'ITEM_LOGIN_REQUIRED'.freeze, # TODO: Write general description for PAYMENT_PROFILE_LOGIN_REQUIRED PAYMENT_PROFILE_LOGIN_REQUIRED = 'PAYMENT_PROFILE_LOGIN_REQUIRED'.freeze, # TODO: Write general description for ERROR ERROR = 'ERROR'.freeze, # TODO: Write general description for MIGRATED_ACCOUNT_ITEM MIGRATED_ACCOUNT_ITEM = 'MIGRATED_ACCOUNT_ITEM'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = NSF) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/the_plaid_api/models/transfer_authorization_decision_rationale_code.rb', line 61 def self.from_value(value, default_value = NSF) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'nsf' then NSF when 'risk' then RISK when 'transfer_limit_reached' then TRANSFER_LIMIT_REACHED when 'manually_verified_item' then MANUALLY_VERIFIED_ITEM when 'item_login_required' then ITEM_LOGIN_REQUIRED when 'payment_profile_login_required' then PAYMENT_PROFILE_LOGIN_REQUIRED when 'error' then ERROR when 'migrated_account_item' then MIGRATED_ACCOUNT_ITEM else default_value end end |
.validate(value) ⇒ Object
55 56 57 58 59 |
# File 'lib/the_plaid_api/models/transfer_authorization_decision_rationale_code.rb', line 55 def self.validate(value) return false if value.nil? TRANSFER_AUTHORIZATION_DECISION_RATIONALE_CODE.include?(value) end |