Transaction.fromObject constructor
Transaction.fromObject(
- APIResponse apiResponse
Implementation
factory Transaction.fromObject(APIResponse apiResponse) {
final transaction = Transaction();
transaction.message =
apiResponse.gatewayResponse ?? apiResponse.dataMessage ?? "";
transaction.referenceNumber = apiResponse.reference;
transaction.state = apiResponse.nextAction;
return transaction;
}