Class: ThePlaidApi::TransferAuthorizationGuaranteeDecisionRationaleCode
- Inherits:
-
Object
- Object
- ThePlaidApi::TransferAuthorizationGuaranteeDecisionRationaleCode
- Defined in:
- lib/the_plaid_api/models/transfer_authorization_guarantee_decision_rationale_code.rb
Overview
A code representing the reason Plaid declined to guarantee this transfer: ‘RETURN_BANK`: The risk of a bank-initiated return (for example, an R01/NSF) is too high to guarantee this transfer. `RETURN_CUSTOMER`: The risk of a customer-initiated return (for example, a R10/Unauthorized) is too high to guarantee this transfer. `GUARANTEE_LIMIT_REACHED`: This transfer is low-risk, but Guarantee has exhausted an internal limit on the number or rate of guarantees that applies to this transfer. `RISK_ESTIMATE_UNAVAILABLE`: A risk estimate is unavailable for this Item. `REQUIRED_PARAM_MISSING`: Required fields are missing.
Constant Summary collapse
- TRANSFER_AUTHORIZATION_GUARANTEE_DECISION_RATIONALE_CODE =
[ # TODO: Write general description for RETURN_BANK RETURN_BANK = 'RETURN_BANK'.freeze, # TODO: Write general description for RETURN_CUSTOMER RETURN_CUSTOMER = 'RETURN_CUSTOMER'.freeze, # TODO: Write general description for GUARANTEE_LIMIT_REACHED GUARANTEE_LIMIT_REACHED = 'GUARANTEE_LIMIT_REACHED'.freeze, # TODO: Write general description for RISK_ESTIMATE_UNAVAILABLE RISK_ESTIMATE_UNAVAILABLE = 'RISK_ESTIMATE_UNAVAILABLE'.freeze, # TODO: Write general description for REQUIRED_PARAM_MISSING REQUIRED_PARAM_MISSING = 'REQUIRED_PARAM_MISSING'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = RETURN_BANK) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/the_plaid_api/models/transfer_authorization_guarantee_decision_rationale_code.rb', line 40 def self.from_value(value, default_value = RETURN_BANK) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'return_bank' then RETURN_BANK when 'return_customer' then RETURN_CUSTOMER when 'guarantee_limit_reached' then GUARANTEE_LIMIT_REACHED when 'risk_estimate_unavailable' then RISK_ESTIMATE_UNAVAILABLE when 'required_param_missing' then REQUIRED_PARAM_MISSING else default_value end end |
.validate(value) ⇒ Object
34 35 36 37 38 |
# File 'lib/the_plaid_api/models/transfer_authorization_guarantee_decision_rationale_code.rb', line 34 def self.validate(value) return false if value.nil? TRANSFER_AUTHORIZATION_GUARANTEE_DECISION_RATIONALE_CODE.include?(value) end |