# openapi.api.ProductMenuItemApi

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

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**create**](ProductMenuItemApi.md#create) | **POST** /api/product/menu-item | Create a new menuItem
[**delete**](ProductMenuItemApi.md#delete) | **DELETE** /api/product/menu-item/{id} | Delete a menuItem by id
[**findAll**](ProductMenuItemApi.md#findall) | **GET** /api/product/menu-item | Get all menuItems
[**findOne**](ProductMenuItemApi.md#findone) | **GET** /api/product/menu-item/{id} | Get menuItem
[**update**](ProductMenuItemApi.md#update) | **PATCH** /api/product/menu-item/{id} | Update menu-item


# **create**
> MenuItemEntity create(menuItemEntity)

Create a new menuItem

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

final api = Openapi().getProductMenuItemApi();
final MenuItemEntity menuItemEntity = ; // MenuItemEntity | 

try {
    final response = api.create(menuItemEntity);
    print(response);
} catch on DioError (e) {
    print('Exception when calling ProductMenuItemApi->create: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **menuItemEntity** | [**MenuItemEntity**](MenuItemEntity.md)|  | 

### Return type

[**MenuItemEntity**](MenuItemEntity.md)

### Authorization

No authorization required

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

# **delete**
> OkRes delete(id)

Delete a menuItem by id

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

final api = Openapi().getProductMenuItemApi();
final num id = id; // num | A unique name for each menuItem

try {
    final response = api.delete(id);
    print(response);
} catch on DioError (e) {
    print('Exception when calling ProductMenuItemApi->delete: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **num**| A unique name for each menuItem | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

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

# **findAll**
> FindAllMenuItemRes findAll(categoryId)

Get all menuItems

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

final api = Openapi().getProductMenuItemApi();
final num categoryId = 8.14; // num | 

try {
    final response = api.findAll(categoryId);
    print(response);
} catch on DioError (e) {
    print('Exception when calling ProductMenuItemApi->findAll: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **categoryId** | **num**|  | [optional] 

### Return type

[**FindAllMenuItemRes**](FindAllMenuItemRes.md)

### Authorization

No authorization required

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

# **findOne**
> MenuItemEntity findOne(id)

Get menuItem

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

final api = Openapi().getProductMenuItemApi();
final num id = 8.14; // num | 

try {
    final response = api.findOne(id);
    print(response);
} catch on DioError (e) {
    print('Exception when calling ProductMenuItemApi->findOne: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **num**|  | 

### Return type

[**MenuItemEntity**](MenuItemEntity.md)

### Authorization

No authorization required

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

# **update**
> OkRes update(id, menuItemEntity)

Update menu-item

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

final api = Openapi().getProductMenuItemApi();
final num id = 8.14; // num | 
final MenuItemEntity menuItemEntity = ; // MenuItemEntity | 

try {
    final response = api.update(id, menuItemEntity);
    print(response);
} catch on DioError (e) {
    print('Exception when calling ProductMenuItemApi->update: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **num**|  | 
 **menuItemEntity** | [**MenuItemEntity**](MenuItemEntity.md)|  | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

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

