Class: ThePlaidApi::TransferAuthorizationDecisionRationale
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransferAuthorizationDecisionRationale
- Defined in:
- lib/the_plaid_api/models/transfer_authorization_decision_rationale.rb
Overview
The rationale for Plaid’s decision regarding a proposed transfer. It is always set for ‘declined` decisions, and may or may not be null for `approved` decisions.
Instance Attribute Summary collapse
-
#code ⇒ TransferAuthorizationDecisionRationaleCode
A code representing the rationale for approving or declining the proposed transfer.
-
#description ⇒ String
A human-readable description of the code associated with a transfer approval or transfer decline.
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(code:, description:, additional_properties: nil) ⇒ TransferAuthorizationDecisionRationale
constructor
A new instance of TransferAuthorizationDecisionRationale.
-
#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(code:, description:, additional_properties: nil) ⇒ TransferAuthorizationDecisionRationale
Returns a new instance of TransferAuthorizationDecisionRationale.
68 69 70 71 72 73 74 75 |
# File 'lib/the_plaid_api/models/transfer_authorization_decision_rationale.rb', line 68 def initialize(code:, description:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @code = code @description = description @additional_properties = additional_properties end |
Instance Attribute Details
#code ⇒ TransferAuthorizationDecisionRationaleCode
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- create-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.
43 44 45 |
# File 'lib/the_plaid_api/models/transfer_authorization_decision_rationale.rb', line 43 def code @code end |
#description ⇒ String
A human-readable description of the code associated with a transfer approval or transfer decline.
48 49 50 |
# File 'lib/the_plaid_api/models/transfer_authorization_decision_rationale.rb', line 48 def description @description end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/the_plaid_api/models/transfer_authorization_decision_rationale.rb', line 78 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. code = hash.key?('code') ? hash['code'] : nil description = hash.key?('description') ? hash['description'] : nil # 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. TransferAuthorizationDecisionRationale.new(code: code, description: description, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
51 52 53 54 55 56 |
# File 'lib/the_plaid_api/models/transfer_authorization_decision_rationale.rb', line 51 def self.names @_hash = {} if @_hash.nil? @_hash['code'] = 'code' @_hash['description'] = 'description' @_hash end |
.nullables ⇒ Object
An array for nullable fields
64 65 66 |
# File 'lib/the_plaid_api/models/transfer_authorization_decision_rationale.rb', line 64 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
59 60 61 |
# File 'lib/the_plaid_api/models/transfer_authorization_decision_rationale.rb', line 59 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
106 107 108 109 110 |
# File 'lib/the_plaid_api/models/transfer_authorization_decision_rationale.rb', line 106 def inspect class_name = self.class.name.split('::').last "<#{class_name} code: #{@code.inspect}, description: #{@description.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
99 100 101 102 103 |
# File 'lib/the_plaid_api/models/transfer_authorization_decision_rationale.rb', line 99 def to_s class_name = self.class.name.split('::').last "<#{class_name} code: #{@code}, description: #{@description}, additional_properties:"\ " #{@additional_properties}>" end |