TransactionOperationResponse class

Response model for transaction operations.

This class represents the response received from transaction-related API operations, providing information about the success status, transaction details, and any error messages.

Properties

  • isSuccess - Indicates whether the transaction operation was successful
  • message - Optional descriptive message about the operation
  • errorList - Optional list of error messages if the operation failed
  • transactionId - Optional unique identifier for the transaction

Usage

// Successful transaction
final successResponse = TransactionOperationResponse(
  isSuccess: true,
  transactionId: 'txn_12345',
  message: 'Transaction completed successfully',
);

// Failed transaction
final failureResponse = TransactionOperationResponse(
  isSuccess: false,
  errorList: ['Invalid card number', 'Insufficient funds'],
  message: 'Transaction failed',
);

Constructors

TransactionOperationResponse.new({required bool isSuccess, String? transactionId, String? message, List<String>? errorList})
Creates a new instance of TransactionOperationResponse.

Properties

errorList List<String>?
Optional list of error messages if the operation failed.
final
hashCode int
The hash code for this object.
no setterinherited
isSuccess bool
Indicates whether the transaction operation was successful.
final
message String?
Optional descriptive message about the operation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transactionId String?
Optional unique identifier for the transaction.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited