pay method

Future<UserTransaction> pay({
  1. required Bill bill,
  2. double? amount,
})

Implementation

Future<UserTransaction> pay({
  required Bill bill,
  double? amount,
}) async {
  if (bill.amount != null && bill.amount != 0) {
    if (amount != 0) {
      logger.w(
        "You set amount on having price bill. The amount will be ignored.",
      );
    }
    amount = null;
  }
  return await this.api.createUserTransactionWithBill(
        billId: bill.token,
        amount: amount,
      );
}