getCustomer method

Future<CustomerModel> getCustomer(
  1. int customerId, {
  2. Object? authorization,
})

Parameters:

  • int customerId (required):

  • Object authorization:

Implementation

Future<CustomerModel> getCustomer(
  int customerId, {
  Object? authorization,
}) async {
  final response = await getCustomerWithHttpInfo(
    customerId,
    authorization: authorization,
  );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }

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