# holzleitner_api.api.PaymentMethodsApi

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

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**createPaymentMethod**](PaymentMethodsApi.md#createpaymentmethod) | **POST** /payment-methods | Legt eine neue Zahlungsmethode an.
[**deletePaymentMethod**](PaymentMethodsApi.md#deletepaymentmethod) | **DELETE** /payment-methods/{id} | Hartes Löschen. &#x60;409 Conflict&#x60;, wenn die Methode von einer Lieferung referenziert wird — der Admin soll dann den &#x60;active &#x3D; false&#x60;-Pfad nutzen.
[**listPaymentMethods**](PaymentMethodsApi.md#listpaymentmethods) | **GET** /payment-methods | Listet die Zahlungsmethoden.
[**updatePaymentMethod**](PaymentMethodsApi.md#updatepaymentmethod) | **PATCH** /payment-methods/{id} | Patcht Anzeige-Name und/oder Aktiv-Flag.


# **createPaymentMethod**
> PaymentMethodResponse createPaymentMethod(createPaymentMethodRequest)

Legt eine neue Zahlungsmethode an.

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

final api = HolzleitnerApi().getPaymentMethodsApi();
final CreatePaymentMethodRequest createPaymentMethodRequest = ; // CreatePaymentMethodRequest | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **createPaymentMethodRequest** | [**CreatePaymentMethodRequest**](CreatePaymentMethodRequest.md)|  | 

### Return type

[**PaymentMethodResponse**](PaymentMethodResponse.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)

# **deletePaymentMethod**
> deletePaymentMethod(id)

Hartes Löschen. `409 Conflict`, wenn die Methode von einer Lieferung referenziert wird — der Admin soll dann den `active = false`-Pfad nutzen.

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

final api = HolzleitnerApi().getPaymentMethodsApi();
final String id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | Zahlungsmethoden-Id

try {
    api.deletePaymentMethod(id);
} catch on DioException (e) {
    print('Exception when calling PaymentMethodsApi->deletePaymentMethod: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| Zahlungsmethoden-Id | 

### Return type

void (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

[[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)

# **listPaymentMethods**
> PaymentMethodsList listPaymentMethods(includeInactive)

Listet die Zahlungsmethoden.

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

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

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

### Parameters

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

### Return type

[**PaymentMethodsList**](PaymentMethodsList.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)

# **updatePaymentMethod**
> PaymentMethodResponse updatePaymentMethod(id, updatePaymentMethodRequest)

Patcht Anzeige-Name und/oder Aktiv-Flag.

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

final api = HolzleitnerApi().getPaymentMethodsApi();
final String id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | Zahlungsmethoden-Id
final UpdatePaymentMethodRequest updatePaymentMethodRequest = ; // UpdatePaymentMethodRequest | 

try {
    final response = api.updatePaymentMethod(id, updatePaymentMethodRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling PaymentMethodsApi->updatePaymentMethod: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| Zahlungsmethoden-Id | 
 **updatePaymentMethodRequest** | [**UpdatePaymentMethodRequest**](UpdatePaymentMethodRequest.md)|  | 

### Return type

[**PaymentMethodResponse**](PaymentMethodResponse.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)

