call static method

Future<ApiCallResponse> call({
  1. String? platform = '',
  2. String? tenant = '',
  3. String? authorization = '',
  4. String? baseUrl = '',
  5. String? transactionId = '',
  6. String? redirectUrl = '',
  7. double? amount,
})

Implementation

static Future<ApiCallResponse> call({
  String? platform = '',
  String? tenant = '',
  String? authorization = '',
  String? baseUrl = '',
  String? transactionId = '',
  String? redirectUrl = '',
  double? amount,
}) {
  final body = '''
{
"transactionId": "${transactionId}",
 "redirectUrl": "${redirectUrl}",
"amount": ${amount}
}''';
  return ApiManager.instance.makeApiCall(
    callName: 'initiateDeposit',
    apiUrl: '${baseUrl}api/blayzPay/deposit/initiate',
    callType: ApiCallType.POST,
    headers: {
      'accept': 'application/json',
      'platform': '${platform}',
      'tenant': '${tenant}',
      'Authorization': '${authorization}',
    },
    params: {},
    body: body,
    bodyType: BodyType.JSON,
    returnBody: true,
    encodeBodyUtf8: false,
    decodeUtf8: false,
    cache: false,
  );
}