220 lines
6.6 KiB
Dart
220 lines
6.6 KiB
Dart
//
|
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
//
|
|
// @dart=2.18
|
|
|
|
// ignore_for_file: unused_element, unused_import
|
|
// ignore_for_file: always_put_required_named_parameters_first
|
|
// ignore_for_file: constant_identifier_names
|
|
// ignore_for_file: lines_longer_than_80_chars
|
|
|
|
part of openapi.api;
|
|
|
|
class SubscriptionPlanApi {
|
|
SubscriptionPlanApi([ApiClient? apiClient])
|
|
: apiClient = apiClient ?? defaultApiClient;
|
|
|
|
final ApiClient apiClient;
|
|
|
|
/// Performs an HTTP 'GET /api/SubscriptionPlan' operation and returns the [Response].
|
|
Future<Response> subscriptionPlanGetWithHttpInfo() async {
|
|
// ignore: prefer_const_declarations
|
|
final path = r'/api/SubscriptionPlan';
|
|
|
|
// ignore: prefer_final_locals
|
|
Object? postBody;
|
|
|
|
final queryParams = <QueryParam>[];
|
|
final headerParams = <String, String>{};
|
|
final formParams = <String, String>{};
|
|
|
|
const contentTypes = <String>[];
|
|
|
|
return apiClient.invokeAPI(
|
|
path,
|
|
'GET',
|
|
queryParams,
|
|
postBody,
|
|
headerParams,
|
|
formParams,
|
|
contentTypes.isEmpty ? null : contentTypes.first,
|
|
);
|
|
}
|
|
|
|
Future<List<SubscriptionPlanDTO>?> subscriptionPlanGet() async {
|
|
final response = await subscriptionPlanGetWithHttpInfo();
|
|
if (response.statusCode >= HttpStatus.badRequest) {
|
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
|
}
|
|
if (response.body.isNotEmpty &&
|
|
response.statusCode != HttpStatus.noContent) {
|
|
final responseBody = await _decodeBodyBytes(response);
|
|
return (await apiClient.deserializeAsync(responseBody, 'List<SubscriptionPlanDTO>') as List)
|
|
.cast<SubscriptionPlanDTO>()
|
|
.toList(growable: false);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/// Performs an HTTP 'GET /api/SubscriptionPlan/{id}' operation and returns the [Response].
|
|
Future<Response> subscriptionPlanGetByIdWithHttpInfo(String id) async {
|
|
// ignore: prefer_const_declarations
|
|
final path = r'/api/SubscriptionPlan/{id}'.replaceAll('{id}', id);
|
|
|
|
Object? postBody;
|
|
|
|
final queryParams = <QueryParam>[];
|
|
final headerParams = <String, String>{};
|
|
final formParams = <String, String>{};
|
|
|
|
const contentTypes = <String>[];
|
|
|
|
return apiClient.invokeAPI(
|
|
path,
|
|
'GET',
|
|
queryParams,
|
|
postBody,
|
|
headerParams,
|
|
formParams,
|
|
contentTypes.isEmpty ? null : contentTypes.first,
|
|
);
|
|
}
|
|
|
|
Future<SubscriptionPlanDTO?> subscriptionPlanGetById(String id) async {
|
|
final response = await subscriptionPlanGetByIdWithHttpInfo(id);
|
|
if (response.statusCode >= HttpStatus.badRequest) {
|
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
|
}
|
|
if (response.body.isNotEmpty &&
|
|
response.statusCode != HttpStatus.noContent) {
|
|
return await apiClient.deserializeAsync(
|
|
await _decodeBodyBytes(response),
|
|
'SubscriptionPlanDTO',
|
|
) as SubscriptionPlanDTO;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/// Performs an HTTP 'POST /api/SubscriptionPlan' operation and returns the [Response].
|
|
Future<Response> subscriptionPlanCreateWithHttpInfo(
|
|
SubscriptionPlanDTO subscriptionPlanDTO,
|
|
) async {
|
|
// ignore: prefer_const_declarations
|
|
final path = r'/api/SubscriptionPlan';
|
|
|
|
Object? postBody = subscriptionPlanDTO;
|
|
|
|
final queryParams = <QueryParam>[];
|
|
final headerParams = <String, String>{};
|
|
final formParams = <String, String>{};
|
|
|
|
const contentTypes = <String>['application/json'];
|
|
|
|
return apiClient.invokeAPI(
|
|
path,
|
|
'POST',
|
|
queryParams,
|
|
postBody,
|
|
headerParams,
|
|
formParams,
|
|
contentTypes.isEmpty ? null : contentTypes.first,
|
|
);
|
|
}
|
|
|
|
Future<SubscriptionPlanDTO?> subscriptionPlanCreate(
|
|
SubscriptionPlanDTO subscriptionPlanDTO,
|
|
) async {
|
|
final response = await subscriptionPlanCreateWithHttpInfo(subscriptionPlanDTO);
|
|
if (response.statusCode >= HttpStatus.badRequest) {
|
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
|
}
|
|
if (response.body.isNotEmpty &&
|
|
response.statusCode != HttpStatus.noContent) {
|
|
return await apiClient.deserializeAsync(
|
|
await _decodeBodyBytes(response),
|
|
'SubscriptionPlanDTO',
|
|
) as SubscriptionPlanDTO;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/// Performs an HTTP 'PUT /api/SubscriptionPlan' operation and returns the [Response].
|
|
Future<Response> subscriptionPlanUpdateWithHttpInfo(
|
|
SubscriptionPlanDTO subscriptionPlanDTO,
|
|
) async {
|
|
// ignore: prefer_const_declarations
|
|
final path = r'/api/SubscriptionPlan';
|
|
|
|
Object? postBody = subscriptionPlanDTO;
|
|
|
|
final queryParams = <QueryParam>[];
|
|
final headerParams = <String, String>{};
|
|
final formParams = <String, String>{};
|
|
|
|
const contentTypes = <String>['application/json'];
|
|
|
|
return apiClient.invokeAPI(
|
|
path,
|
|
'PUT',
|
|
queryParams,
|
|
postBody,
|
|
headerParams,
|
|
formParams,
|
|
contentTypes.isEmpty ? null : contentTypes.first,
|
|
);
|
|
}
|
|
|
|
Future<SubscriptionPlanDTO?> subscriptionPlanUpdate(
|
|
SubscriptionPlanDTO subscriptionPlanDTO,
|
|
) async {
|
|
final response = await subscriptionPlanUpdateWithHttpInfo(subscriptionPlanDTO);
|
|
if (response.statusCode >= HttpStatus.badRequest) {
|
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
|
}
|
|
if (response.body.isNotEmpty &&
|
|
response.statusCode != HttpStatus.noContent) {
|
|
return await apiClient.deserializeAsync(
|
|
await _decodeBodyBytes(response),
|
|
'SubscriptionPlanDTO',
|
|
) as SubscriptionPlanDTO;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/// Performs an HTTP 'DELETE /api/SubscriptionPlan/{id}' operation and returns the [Response].
|
|
Future<Response> subscriptionPlanDeleteWithHttpInfo(String id) async {
|
|
// ignore: prefer_const_declarations
|
|
final path = r'/api/SubscriptionPlan/{id}'.replaceAll('{id}', id);
|
|
|
|
Object? postBody;
|
|
|
|
final queryParams = <QueryParam>[];
|
|
final headerParams = <String, String>{};
|
|
final formParams = <String, String>{};
|
|
|
|
const contentTypes = <String>[];
|
|
|
|
return apiClient.invokeAPI(
|
|
path,
|
|
'DELETE',
|
|
queryParams,
|
|
postBody,
|
|
headerParams,
|
|
formParams,
|
|
contentTypes.isEmpty ? null : contentTypes.first,
|
|
);
|
|
}
|
|
|
|
Future<String?> subscriptionPlanDelete(String id) async {
|
|
final response = await subscriptionPlanDeleteWithHttpInfo(id);
|
|
if (response.statusCode >= HttpStatus.badRequest) {
|
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
|
}
|
|
if (response.body.isNotEmpty &&
|
|
response.statusCode != HttpStatus.noContent) {
|
|
return await _decodeBodyBytes(response);
|
|
}
|
|
return null;
|
|
}
|
|
}
|