# holzleitner_api.api.CarsApi

## Load the API package
```dart
import 'package:holzleitner_api/api.dart';
```

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createMyCar**](CarsApi.md#createmycar) | **POST** /me/cars | Legt ein neues Fahrzeug für den angemeldeten Fahrer an.
[**listMyCars**](CarsApi.md#listmycars) | **GET** /me/cars | Listet die Fahrzeuge des angemeldeten Fahrers.
[**updateMyCar**](CarsApi.md#updatemycar) | **PATCH** /me/cars/{car_id} | Aktualisiert ein Fahrzeug (Kennzeichen ändern / deaktivieren).


# **createMyCar**
> CarResponse createMyCar(createCarRequest)

Legt ein neues Fahrzeug für den angemeldeten Fahrer an.

### Example
```dart
import 'package:holzleitner_api/api.dart';

final api = HolzleitnerApi().getCarsApi();
final CreateCarRequest createCarRequest = ; // CreateCarRequest | 

try {
    final response = api.createMyCar(createCarRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling CarsApi->createMyCar: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **createCarRequest** | [**CreateCarRequest**](CreateCarRequest.md)|  | 

### Return type

[**CarResponse**](CarResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **listMyCars**
> CarsList listMyCars(includeInactive)

Listet die Fahrzeuge des angemeldeten Fahrers.

### Example
```dart
import 'package:holzleitner_api/api.dart';

final api = HolzleitnerApi().getCarsApi();
final bool includeInactive = true; // bool | Wenn true, werden inaktive Fahrzeuge mitgeliefert (default: false)

try {
    final response = api.listMyCars(includeInactive);
    print(response);
} catch on DioException (e) {
    print('Exception when calling CarsApi->listMyCars: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **includeInactive** | **bool**| Wenn true, werden inaktive Fahrzeuge mitgeliefert (default: false) | [optional] 

### Return type

[**CarsList**](CarsList.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **updateMyCar**
> CarResponse updateMyCar(carId, updateCarRequest)

Aktualisiert ein Fahrzeug (Kennzeichen ändern / deaktivieren).

### Example
```dart
import 'package:holzleitner_api/api.dart';

final api = HolzleitnerApi().getCarsApi();
final String carId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 
final UpdateCarRequest updateCarRequest = ; // UpdateCarRequest | 

try {
    final response = api.updateMyCar(carId, updateCarRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling CarsApi->updateMyCar: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **carId** | **String**|  | 
 **updateCarRequest** | [**UpdateCarRequest**](UpdateCarRequest.md)|  | 

### Return type

[**CarResponse**](CarResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

