BokaMera.API.Host

<back to all web services

SuperAdminDeleteSupportCaseComment

Requires Authentication
Requires the role:superadmin
The following routes are available for this service:
DELETE/superadmin/support/cases/{SupportCaseId}/comments/{Id}Delete a case commentDelete a support case comment logged in user, only administrators are allowed to delete support case comments.
import 'package:servicestack/servicestack.dart';

class SupportCaseCommentsResponse implements IConvertible
{
    /**
    * The case id
    */
    // @ApiMember(Description="The case id")
    int? SupportCaseId;

    /**
    * The comments id
    */
    // @ApiMember(Description="The comments id")
    int? Id;

    /**
    * The case comment
    */
    // @ApiMember(Description="The case comment")
    String? Comment;

    /**
    * The case comment created by
    */
    // @ApiMember(Description="The case comment created by")
    String? CreatedBy;

    /**
    * The case comment created date
    */
    // @ApiMember(Description="The case comment created date")
    DateTime? Created;

    SupportCaseCommentsResponse({this.SupportCaseId,this.Id,this.Comment,this.CreatedBy,this.Created});
    SupportCaseCommentsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        SupportCaseId = json['SupportCaseId'];
        Id = json['Id'];
        Comment = json['Comment'];
        CreatedBy = json['CreatedBy'];
        Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'SupportCaseId': SupportCaseId,
        'Id': Id,
        'Comment': Comment,
        'CreatedBy': CreatedBy,
        'Created': JsonConverters.toJson(Created,'DateTime',context!)
    };

    getTypeName() => "SupportCaseCommentsResponse";
    TypeContext? context = _ctx;
}

// @ValidateRequest(Validator="IsAuthenticated")
class SuperAdminDeleteSupportCaseComment implements ISupportCase, IConvertible
{
    /**
    * Enter the company id, if blank company id and you are an admin, your company id will be used.
    */
    // @ApiMember(Description="Enter the company id, if blank company id and you are an admin, your company id will be used.", IsRequired=true)
    String? CompanyId;

    /**
    * The support case id
    */
    // @ApiMember(Description="The support case id", ParameterType="path")
    int? SupportCaseId;

    /**
    * The support case comment id
    */
    // @ApiMember(Description="The support case comment id", ParameterType="path")
    int? Id;

    SuperAdminDeleteSupportCaseComment({this.CompanyId,this.SupportCaseId,this.Id});
    SuperAdminDeleteSupportCaseComment.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        SupportCaseId = json['SupportCaseId'];
        Id = json['Id'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'SupportCaseId': SupportCaseId,
        'Id': Id
    };

    getTypeName() => "SuperAdminDeleteSupportCaseComment";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
    'SupportCaseCommentsResponse': TypeInfo(TypeOf.Class, create:() => SupportCaseCommentsResponse()),
    'SuperAdminDeleteSupportCaseComment': TypeInfo(TypeOf.Class, create:() => SuperAdminDeleteSupportCaseComment()),
});

Dart SuperAdminDeleteSupportCaseComment DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

DELETE /superadmin/support/cases/{SupportCaseId}/comments/{Id} HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"SupportCaseId":0,"Id":0,"Comment":"String","CreatedBy":"String"}