deleteOrganization method
Delete Organization Delete an organization.
Parameters:
orgCode
- The identifier for the organization.cancelToken
- ACancelToken
that can be used to cancel the operationheaders
- Can be used to add additional headers to the requestextras
- Can be used to add flags to the requestvalidateStatus
- AValidateStatus
callback that can be used to determine request success based on the HTTP status of the responseonSendProgress
- AProgressCallback
that can be used to get the send progressonReceiveProgress
- AProgressCallback
that can be used to get the receive progress
Returns a Future
Throws DioException
if API call or serialization fails
Implementation
Future<Response<void>> deleteOrganization({
required String orgCode,
CancelToken? cancelToken,
Map<String, dynamic>? headers,
Map<String, dynamic>? extra,
ValidateStatus? validateStatus,
ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress,
}) async {
final path = r'/api/v1/organization/{org_code}'.replaceAll('{' r'org_code' '}', encodeQueryParameter(_serializers, orgCode, const FullType(String)).toString());
final options = Options(
method: r'DELETE',
headers: <String, dynamic>{
...?headers,
},
extra: <String, dynamic>{
'secure': <Map<String, String>>[
{
'type': 'http',
'scheme': 'bearer',
'name': 'kindeBearerAuth',
},
],
...?extra,
},
validateStatus: validateStatus,
);
final response = await _dio.request<Object>(
path,
options: options,
cancelToken: cancelToken,
onSendProgress: onSendProgress,
onReceiveProgress: onReceiveProgress,
);
return response;
}