BokaMera.API.Host

<back to all web services

DeleteCompanyCommentSuperAdminUser

Requires Authentication
Required role:superadmin
The following routes are available for this service:
DELETE/superadmin/company/{CompanyId}/comments/{Id}Delete a comment.
import 'package:servicestack/servicestack.dart';

enum CommentsType
{
    NormalComment,
    CallBackPhoneComment,
    CallBackEmailComment,
    CallBackMeetingBookedComment,
    CallBackNotInterestedComment,
}

class CommentsTypeResponse implements IConvertible
{
    int? Id;
    String? Name;
    String? Description;

    CommentsTypeResponse({this.Id,this.Name,this.Description});
    CommentsTypeResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class CompanyCommentsResponse implements IConvertible
{
    // @ApiMember()
    String? CompanyId;

    // @ApiMember()
    int? Id;

    // @ApiMember(IsRequired=true)
    String? Comment;

    // @ApiMember(IsRequired=true)
    CommentsType? CommentTypeId;

    // @ApiMember(IsRequired=true)
    CommentsTypeResponse? CommentType;

    /**
    * The updated date
    */
    // @ApiMember(Description="The updated date")
    DateTime? Updated;

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

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

    CompanyCommentsResponse({this.CompanyId,this.Id,this.Comment,this.CommentTypeId,this.CommentType,this.Updated,this.Created,this.CreatedBy});
    CompanyCommentsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'Id': Id,
        'Comment': Comment,
        'CommentTypeId': JsonConverters.toJson(CommentTypeId,'CommentsType',context!),
        'CommentType': JsonConverters.toJson(CommentType,'CommentsTypeResponse',context!),
        'Updated': JsonConverters.toJson(Updated,'DateTime',context!),
        'Created': JsonConverters.toJson(Created,'DateTime',context!),
        'CreatedBy': CreatedBy
    };

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

// @ApiResponse(Description="", StatusCode=400)
// @ApiResponse(Description="Returned if the current user is not allowed to perform the action", StatusCode=401)
class DeleteCompanyCommentSuperAdminUser implements ICompany, IConvertible
{
    /**
    * Enter the companyId for the customer
    */
    // @ApiMember(Description="Enter the companyId for the customer", IsRequired=true, ParameterType="query")
    String? CompanyId;

    // @ApiMember(IsRequired=true, ParameterType="query")
    int? Id;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
    'CommentsType': TypeInfo(TypeOf.Enum, enumValues:CommentsType.values),
    'CommentsTypeResponse': TypeInfo(TypeOf.Class, create:() => CommentsTypeResponse()),
    'CompanyCommentsResponse': TypeInfo(TypeOf.Class, create:() => CompanyCommentsResponse()),
    'DeleteCompanyCommentSuperAdminUser': TypeInfo(TypeOf.Class, create:() => DeleteCompanyCommentSuperAdminUser()),
});

Dart DeleteCompanyCommentSuperAdminUser DTOs

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

HTTP + XML

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

DELETE /superadmin/company/{CompanyId}/comments/{Id} HTTP/1.1 
Host: api.bokamera.se 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CompanyCommentsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Comment>String</Comment>
  <CommentType>
    <Description>String</Description>
    <Id>0</Id>
    <Name>String</Name>
  </CommentType>
  <CommentTypeId>NormalComment</CommentTypeId>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <Created>0001-01-01T00:00:00</Created>
  <CreatedBy>String</CreatedBy>
  <Id>0</Id>
  <Updated>0001-01-01T00:00:00</Updated>
</CompanyCommentsResponse>