Class: Plaid::TransferAuthorizationDecisionRationale
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Plaid::TransferAuthorizationDecisionRationale
- Defined in:
- lib/plaid/models/transfer_authorization_decision_rationale.rb
Overview
The rationale for Plaid’s decision regarding a proposed transfer. Will be null for ‘approved` decisions.
Instance Attribute Summary collapse
-
#code ⇒ Code
A code representing the rationale for permitting or declining the proposed transfer.
-
#description ⇒ String
A human-readable description of the code associated with a permitted transfer 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.
52 53 54 55 56 57 58 59 |
# File 'lib/plaid/models/transfer_authorization_decision_rationale.rb', line 52 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 ⇒ Code
A code representing the rationale for permitting or declining the proposed transfer. Possible values are: ‘NSF` – Transaction likely to result in a return due to insufficient funds. `RISK` - Transaction is high-risk. `MANUALLY_VERIFIED_ITEM` – Item created via same-day micro deposits, limited information available. Plaid can only offer `permitted` as a transaction decision. `LOGIN_REQUIRED` – Unable to collect the account information required for an authorization decision due to Item staleness. Can be rectified using Link update mode. `ERROR` – Unable to collect the account information required for an authorization decision due to an error.
27 28 29 |
# File 'lib/plaid/models/transfer_authorization_decision_rationale.rb', line 27 def code @code end |
#description ⇒ String
A human-readable description of the code associated with a permitted transfer or transfer decline.
32 33 34 |
# File 'lib/plaid/models/transfer_authorization_decision_rationale.rb', line 32 def description @description end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/plaid/models/transfer_authorization_decision_rationale.rb', line 62 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.
35 36 37 38 39 40 |
# File 'lib/plaid/models/transfer_authorization_decision_rationale.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['code'] = 'code' @_hash['description'] = 'description' @_hash end |
.nullables ⇒ Object
An array for nullable fields
48 49 50 |
# File 'lib/plaid/models/transfer_authorization_decision_rationale.rb', line 48 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
43 44 45 |
# File 'lib/plaid/models/transfer_authorization_decision_rationale.rb', line 43 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
90 91 92 93 94 |
# File 'lib/plaid/models/transfer_authorization_decision_rationale.rb', line 90 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.
83 84 85 86 87 |
# File 'lib/plaid/models/transfer_authorization_decision_rationale.rb', line 83 def to_s class_name = self.class.name.split('::').last "<#{class_name} code: #{@code}, description: #{@description}, additional_properties:"\ " #{@additional_properties}>" end |