getHistory method

Future<ApiResponse<PaymentHistoryResponse>> getHistory(
  1. String partnerId, {
  2. String? limit,
  3. String? flag,
})

Implementation

Future<ApiResponse<PaymentHistoryResponse>> getHistory(
  String partnerId, {
  String? limit,
  String? flag,
}) async {
  var url =
      'v1/payment/history?access_key=c30caeb0cf25&filter[partner_id]=$partnerId';
  if (limit != null) {
    url += '&limit=$limit';
  }
  if (flag != null) {
    url += '&filter[flag]=$flag';
  }
  return await getRequestWithoutData(
    url,
    (data) => PaymentHistoryResponse.fromJson(data),
  );
}