Class: ThePlaidApi::PaymentInitiationPaymentReverseResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::PaymentInitiationPaymentReverseResponse
- Defined in:
- lib/the_plaid_api/models/payment_initiation_payment_reverse_response.rb
Overview
PaymentInitiationPaymentReverseResponse defines the response schema for ‘/payment_initation/payment/reverse`
Instance Attribute Summary collapse
-
#refund_id ⇒ String
A unique ID identifying the refund.
-
#request_id ⇒ String
A unique identifier for the request, which can be used for troubleshooting.
-
#status ⇒ WalletTransactionStatus
The status of the transaction.
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(refund_id:, status:, request_id:, additional_properties: nil) ⇒ PaymentInitiationPaymentReverseResponse
constructor
A new instance of PaymentInitiationPaymentReverseResponse.
-
#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(refund_id:, status:, request_id:, additional_properties: nil) ⇒ PaymentInitiationPaymentReverseResponse
Returns a new instance of PaymentInitiationPaymentReverseResponse.
60 61 62 63 64 65 66 67 68 |
# File 'lib/the_plaid_api/models/payment_initiation_payment_reverse_response.rb', line 60 def initialize(refund_id:, status:, request_id:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @refund_id = refund_id @status = status @request_id = request_id @additional_properties = additional_properties end |
Instance Attribute Details
#refund_id ⇒ String
A unique ID identifying the refund
15 16 17 |
# File 'lib/the_plaid_api/models/payment_initiation_payment_reverse_response.rb', line 15 def refund_id @refund_id end |
#request_id ⇒ String
A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.
39 40 41 |
# File 'lib/the_plaid_api/models/payment_initiation_payment_reverse_response.rb', line 39 def request_id @request_id end |
#status ⇒ WalletTransactionStatus
The status of the transaction. ‘AUTHORISING`: The transaction is being processed for validation and compliance. `INITIATED`: The transaction has been initiated and is currently being processed. `EXECUTED`: The transaction has been successfully executed and is considered complete. This is only applicable for debit transactions. `SETTLED`: The transaction has settled and funds are available for use. This is only applicable for credit transactions. A transaction will typically settle within seconds to several days, depending on which payment rail is used. `FAILED`: The transaction failed to process successfully. This is a terminal status. `BLOCKED`: The transaction has been blocked for violating compliance rules. This is a terminal status.
33 34 35 |
# File 'lib/the_plaid_api/models/payment_initiation_payment_reverse_response.rb', line 33 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/the_plaid_api/models/payment_initiation_payment_reverse_response.rb', line 71 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. refund_id = hash.key?('refund_id') ? hash['refund_id'] : nil status = hash.key?('status') ? hash['status'] : nil request_id = hash.key?('request_id') ? hash['request_id'] : 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. PaymentInitiationPaymentReverseResponse.new(refund_id: refund_id, status: status, request_id: request_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
42 43 44 45 46 47 48 |
# File 'lib/the_plaid_api/models/payment_initiation_payment_reverse_response.rb', line 42 def self.names @_hash = {} if @_hash.nil? @_hash['refund_id'] = 'refund_id' @_hash['status'] = 'status' @_hash['request_id'] = 'request_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
56 57 58 |
# File 'lib/the_plaid_api/models/payment_initiation_payment_reverse_response.rb', line 56 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
51 52 53 |
# File 'lib/the_plaid_api/models/payment_initiation_payment_reverse_response.rb', line 51 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
101 102 103 104 105 |
# File 'lib/the_plaid_api/models/payment_initiation_payment_reverse_response.rb', line 101 def inspect class_name = self.class.name.split('::').last "<#{class_name} refund_id: #{@refund_id.inspect}, status: #{@status.inspect}, request_id:"\ " #{@request_id.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
94 95 96 97 98 |
# File 'lib/the_plaid_api/models/payment_initiation_payment_reverse_response.rb', line 94 def to_s class_name = self.class.name.split('::').last "<#{class_name} refund_id: #{@refund_id}, status: #{@status}, request_id: #{@request_id},"\ " additional_properties: #{@additional_properties}>" end |