call method

Future<ApiCallResponse> call({
  1. String? tenant = '',
  2. String? token = '',
  3. String? transactionId = '',
  4. String? maritalStatus = '',
  5. String? gender = '',
  6. String? dateofBirth = '',
  7. String? dependant = '',
  8. String? accomodationType = '',
  9. String? jobChanges = '',
  10. String? stateOfResidence = '',
  11. String? latitude = '',
  12. String? longitude = '',
  13. String? platform = '',
  14. String? baseUrl = '',
})

Implementation

Future<ApiCallResponse> call({
  String? tenant = '',
  String? token = '',
  String? transactionId = '',
  String? maritalStatus = '',
  String? gender = '',
  String? dateofBirth = '',
  String? dependant = '',
  String? accomodationType = '',
  String? jobChanges = '',
  String? stateOfResidence = '',
  String? latitude = '',
  String? longitude = '',
  String? platform = '',
  String? baseUrl = '',
}) {
  final body = '''
{
"transactionId": "${transactionId}",
"maritalStatus": "${maritalStatus}",
 "gender": "${gender}",
"dateofBirth": "${dateofBirth}",
"dependant": "${dependant}",
"accomodationType": "${accomodationType}",
"jobChanges": "${jobChanges}",
"stateOfResidence": "${stateOfResidence}",
"latitude": "${latitude}",
"longitude": "${longitude}"
}''';
  return ApiManager.instance.makeApiCall(
    callName: 'inititateLoanApplication',
    apiUrl: '${baseUrl}api/blayzPay/loanApplication/initiate',
    callType: ApiCallType.POST,
    headers: {
      ...BlayzPayAPIGroup.headers,
      'tenant': '${tenant}',
      'Authorization': '${token}',
      'platform': '${platform}',
    },
    params: {},
    body: body,
    bodyType: BodyType.JSON,
    returnBody: true,
    encodeBodyUtf8: false,
    decodeUtf8: false,
    cache: false,
  );
}