create method

Future<Response> create(
  1. String transaction, {
  2. int? amount,
  3. Currency? currency,
  4. String? customerNote,
  5. String? merchantNote,
})

Initiate a refund on your integration

Implementation

Future<Response> create(
  String transaction, {
  int? amount,
  Currency? currency,
  String? customerNote,
  String? merchantNote,
}) async {
  var data = {
    'transaction': transaction,
    'amount': amount,
    'currency': currency?.paystackValue,
    'customer_note': customerNote,
    'merchant_note': merchantNote,
  };
  return await call(Uri.https(baseUrl, '/refund'), HttpMethod.post,
      data: data);
}