patch method
Implementation
Future<Response?> patch(
String clientId,
RequestOptions requestOptions,
) async {
Response? response;
try {
var requestOptionsJson = jsonEncode(
RequestOptionsDTO.fromDataModel(requestOptions).toJson(),
);
final result = await _hostApi.patch(clientId, requestOptionsJson);
if (result != null) {
final decodedJson = json.decode(result);
if (decodedJson['queueOrder'] != null) {
response =
ResponseQueuedDTO.fromJson(json.decode(result)).toDataModel();
} else {
response =
ResponseReceivedDTO.fromJson(json.decode(result)).toDataModel();
}
}
} on PlatformException catch (e) {
throw ExceptionManager.parse(e);
}
return response;
}