getService method

Future<ServiceModel> getService(
  1. int serviceId, {
  2. Object? authorization,
})

Parameters:

  • int serviceId (required):

  • Object authorization:

Implementation

Future<ServiceModel> getService(
  int serviceId, {
  Object? authorization,
}) async {
  final response = await _getServiceWithHttpInfo(
    serviceId,
    authorization: authorization,
  );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }

  return await apiClient.deserializeAsync(
    await _decodeBodyBytes(response),
    'ServiceModel',
  ) as ServiceModel;
}