call method
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 = '',
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,
);
}