createBill method

Future<Bill> createBill({
  1. double? amount,
  2. String? accountId,
  3. String? description,
  4. bool isOnetime = false,
  5. List<Product>? products,
})

Implementation

Future<Bill> createBill({
  double? amount,
  String? accountId,
  String? description,
  bool isOnetime = false,
  List<Product>? products,
}) async {
  return await invokeMethod<Bill>(
    (j) => Bill.fromJson(j),
    'createBill',
    {
      'env': this.env.index,
      'accessToken': this.accessToken,
      'amount': amount,
      'accountId': accountId,
      'description': description,
      'isOnetime': isOnetime,
      'products': jsonEncode(products),
    },
  );
}