cancel method

Future<TransactionResponseDoc> cancel({
  1. required String operator,
  2. required String fromAccountId,
  3. required String targetAccountId,
  4. required String contextId,
})

Implementation

Future<TransactionResponseDoc> cancel({
  required String operator,
  required String fromAccountId,
  required String targetAccountId,
  required String contextId,
}) async =>
    invokeAction(
      operator: operator,
      name: requestActionName,
      fromAccountId: fromAccountId,
      targetAccountId: targetAccountId,
      payload: (PaymentRequest()
            ..status = PaymentRequest_PaymentRequestStatus.CANCELED)
          .writeToBuffer(),
      contextId: contextId,
    );