# openapi.api.GlobalNotificationApi

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

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**create**](GlobalNotificationApi.md#create) | **POST** /api/admin/super-admin/global-notification/create | Create global notification
[**delete**](GlobalNotificationApi.md#delete) | **DELETE** /api/admin/super-admin/global-notification/{id} | Delete global notification
[**find**](GlobalNotificationApi.md#find) | **GET** /api/admin/super-admin/global-notification/{id} | Get global notification by id
[**findActive**](GlobalNotificationApi.md#findactive) | **GET** /api/admin/super-admin/global-notification/active | Get active global notifications
[**findAll**](GlobalNotificationApi.md#findall) | **GET** /api/admin/super-admin/global-notification | Get all global notifications
[**update**](GlobalNotificationApi.md#update) | **POST** /api/admin/super-admin/global-notification/update/{id} | Update global notification


# **create**
> GlobalNotification create(globalNotification)

Create global notification

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

final api = Openapi().getGlobalNotificationApi();
final GlobalNotification globalNotification = ; // GlobalNotification | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **globalNotification** | [**GlobalNotification**](GlobalNotification.md)|  | 

### Return type

[**GlobalNotification**](GlobalNotification.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 global notification

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

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

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

### Parameters

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

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

# **find**
> GlobalNotification find(id)

Get global notification by id

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

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

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

### Parameters

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

### Return type

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

# **findActive**
> GlobalNotification findActive(type)

Get active global notifications

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

final api = Openapi().getGlobalNotificationApi();
final GlobalNotificationTypes type = 
        CMS = 1,
        SHOW = 2,
        EDITOR = 3,
        ACCOUNT = 4,
        SUPPORT = 5,
        LANDING_PAGE = 6,; // GlobalNotificationTypes | type of GlobalNotification

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **type** | [**GlobalNotificationTypes**](.md)| type of GlobalNotification | [optional] 

### Return type

[**GlobalNotification**](GlobalNotification.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**
> FindAllGlobalNotification findAll(status, type, search)

Get all global notifications

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

final api = Openapi().getGlobalNotificationApi();
final GetAllGlobalNotificationStatusEnum status = 
        SUCCESS = 1,
        INFO = 2,
        WARNING = 3,
        ERROR = 4,
        ; // GetAllGlobalNotificationStatusEnum | status of GlobalNotification
final GlobalNotificationTypes type = 
        CMS = 1,
        SHOW = 2,
        EDITOR = 3,
        ACCOUNT = 4,
        SUPPORT = 5,
        LANDING_PAGE = 6,; // GlobalNotificationTypes | type of GlobalNotification
final String search = search_example; // String | search string

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **status** | [**GetAllGlobalNotificationStatusEnum**](.md)| status of GlobalNotification | [optional] 
 **type** | [**GlobalNotificationTypes**](.md)| type of GlobalNotification | [optional] 
 **search** | **String**| search string | [optional] 

### Return type

[**FindAllGlobalNotification**](FindAllGlobalNotification.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**
> GlobalNotification update(id, globalNotification)

Update global notification

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

final api = Openapi().getGlobalNotificationApi();
final num id = 8.14; // num | 
final GlobalNotification globalNotification = ; // GlobalNotification | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **num**|  | 
 **globalNotification** | [**GlobalNotification**](GlobalNotification.md)|  | 

### Return type

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

