postBanUserFromCommentWithHttpInfo method
Future<Response>
postBanUserFromCommentWithHttpInfo(
- String tenantId,
- String commentId, [
- PostBanUserFromCommentOptions? options
Performs an HTTP 'POST /auth/my-account/moderate-comments/mod_api/ban-user/from-comment/{commentId}' operation and returns the Response.
Parameters:
Implementation
Future<Response> postBanUserFromCommentWithHttpInfo(String tenantId, String commentId, [ PostBanUserFromCommentOptions? options ]) async {
final banEmail = options?.banEmail;
final banEmailDomain = options?.banEmailDomain;
final banIP = options?.banIP;
final deleteAllUsersComments = options?.deleteAllUsersComments;
final bannedUntil = options?.bannedUntil;
final isShadowBan = options?.isShadowBan;
final updateId = options?.updateId;
final banReason = options?.banReason;
final sso = options?.sso;
// ignore: prefer_const_declarations
final path = r'/auth/my-account/moderate-comments/mod_api/ban-user/from-comment/{commentId}'
.replaceAll('{commentId}', commentId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
queryParams.addAll(_queryParams('', 'tenantId', tenantId));
if (banEmail != null) {
queryParams.addAll(_queryParams('', 'banEmail', banEmail));
}
if (banEmailDomain != null) {
queryParams.addAll(_queryParams('', 'banEmailDomain', banEmailDomain));
}
if (banIP != null) {
queryParams.addAll(_queryParams('', 'banIP', banIP));
}
if (deleteAllUsersComments != null) {
queryParams.addAll(_queryParams('', 'deleteAllUsersComments', deleteAllUsersComments));
}
if (bannedUntil != null) {
queryParams.addAll(_queryParams('', 'bannedUntil', bannedUntil));
}
if (isShadowBan != null) {
queryParams.addAll(_queryParams('', 'isShadowBan', isShadowBan));
}
if (updateId != null) {
queryParams.addAll(_queryParams('', 'updateId', updateId));
}
if (banReason != null) {
queryParams.addAll(_queryParams('', 'banReason', banReason));
}
if (sso != null) {
queryParams.addAll(_queryParams('', 'sso', sso));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}