BokaMera.API.Host

<back to all web services

SuperAdminUpdateSupportCase

Requires Authentication
Requires the role:superadmin
The following routes are available for this service:
PUT/superadmin/support/cases/{Id}Update a support caseUpdate a support case to the company of the currently logged in user, only administrators are allowed to add support cases.
import 'package:servicestack/servicestack.dart';

class SupportCaseStatusResponse implements IConvertible
{
    /**
    * The status id
    */
    // @ApiMember(Description="The status id")
    int? Id;

    /**
    * The status name
    */
    // @ApiMember(Description="The status name")
    String? Name;

    /**
    * The status description
    */
    // @ApiMember(Description="The status description")
    String? Description;

    /**
    * The status icon
    */
    // @ApiMember(Description="The status icon")
    String? Icon;

    /**
    * The status color
    */
    // @ApiMember(Description="The status color")
    String? Color;

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

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

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

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

class SupportCaseTypeResponse implements IConvertible
{
    /**
    * The type id
    */
    // @ApiMember(Description="The type id")
    int? Id;

    /**
    * The type name
    */
    // @ApiMember(Description="The type name")
    String? Name;

    /**
    * The type description
    */
    // @ApiMember(Description="The type description")
    String? Description;

    SupportCaseTypeResponse({this.Id,this.Name,this.Description});
    SupportCaseTypeResponse.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() => "SupportCaseTypeResponse";
    TypeContext? context = _ctx;
}

class SupportCaseAreaResponse implements IConvertible
{
    /**
    * The area id
    */
    // @ApiMember(Description="The area id")
    int? Id;

    /**
    * The area name
    */
    // @ApiMember(Description="The area name")
    String? Name;

    /**
    * The area description
    */
    // @ApiMember(Description="The area description")
    String? Description;

    SupportCaseAreaResponse({this.Id,this.Name,this.Description});
    SupportCaseAreaResponse.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() => "SupportCaseAreaResponse";
    TypeContext? context = _ctx;
}

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;
}

class SupportCaseAttachmentResponse implements IConvertible
{
    /**
    * The attachment id
    */
    // @ApiMember(Description="The attachment id")
    int? Id;

    /**
    * The attachment file url
    */
    // @ApiMember(Description="The attachment file url")
    String? FileUrl;

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

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

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

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

class SupportCaseQueryResponse implements IConvertible
{
    /**
    * The support case id
    */
    // @ApiMember(Description="The support case id")
    int? Id;

    /**
    * The company user id
    */
    // @ApiMember(Description="The company user id")
    String? CompanyUserId;

    /**
    * The case title.
    */
    // @ApiMember(Description="The case title.")
    String? Title;

    /**
    * The case description.
    */
    // @ApiMember(Description="The case description.")
    String? Description;

    /**
    * The case status id.
    */
    // @ApiMember(Description="The case status id.")
    int? CaseStatusId;

    /**
    * If the case type id.
    */
    // @ApiMember(Description="If the case type id.")
    int? CaseTypeId;

    /**
    * If the case area id.
    */
    // @ApiMember(Description="If the case area id.")
    int? CaseAreaId;

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

    /**
    * The case updated by.
    */
    // @ApiMember(Description="The case updated by.")
    String? UpdatedBy;

    /**
    * The case solved by.
    */
    // @ApiMember(Description="The case solved by.")
    String? SolvedBy;

    /**
    * If case updated date.
    */
    // @ApiMember(Description="If case updated date.")
    DateTime? Updated;

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

    /**
    * Who owns the support case.
    */
    // @ApiMember(Description="Who owns the support case.")
    String? CaseOwner;

    /**
    * The case status information.
    */
    // @ApiMember(Description="The case status information.")
    SupportCaseStatusResponse? CaseStatus;

    /**
    * The case type information.
    */
    // @ApiMember(Description="The case type information.")
    SupportCaseTypeResponse? CaseType;

    /**
    * The case area information.
    */
    // @ApiMember(Description="The case area information.")
    SupportCaseAreaResponse? CaseArea;

    /**
    * The case comments.
    */
    // @ApiMember(Description="The case comments.")
    List<SupportCaseCommentsResponse>? Comments;

    /**
    * The case attachments.
    */
    // @ApiMember(Description="The case attachments.")
    List<SupportCaseAttachmentResponse>? Attachments;

    /**
    * The case status options to select from.
    */
    // @ApiMember(Description="The case status options to select from.")
    List<SupportCaseStatusResponse>? CaseStatusOptions;

    /**
    * The case type  options to select from.
    */
    // @ApiMember(Description="The case type  options to select from.")
    List<SupportCaseTypeResponse>? CaseTypeOptions;

    /**
    * The case area  options to select from.
    */
    // @ApiMember(Description="The case area  options to select from.")
    List<SupportCaseAreaResponse>? CaseAreaOptions;

    SupportCaseQueryResponse({this.Id,this.CompanyUserId,this.Title,this.Description,this.CaseStatusId,this.CaseTypeId,this.CaseAreaId,this.CreatedBy,this.UpdatedBy,this.SolvedBy,this.Updated,this.Created,this.CaseOwner,this.CaseStatus,this.CaseType,this.CaseArea,this.Comments,this.Attachments,this.CaseStatusOptions,this.CaseTypeOptions,this.CaseAreaOptions});
    SupportCaseQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        CompanyUserId = json['CompanyUserId'];
        Title = json['Title'];
        Description = json['Description'];
        CaseStatusId = json['CaseStatusId'];
        CaseTypeId = json['CaseTypeId'];
        CaseAreaId = json['CaseAreaId'];
        CreatedBy = json['CreatedBy'];
        UpdatedBy = json['UpdatedBy'];
        SolvedBy = json['SolvedBy'];
        Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!);
        Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
        CaseOwner = json['CaseOwner'];
        CaseStatus = JsonConverters.fromJson(json['CaseStatus'],'SupportCaseStatusResponse',context!);
        CaseType = JsonConverters.fromJson(json['CaseType'],'SupportCaseTypeResponse',context!);
        CaseArea = JsonConverters.fromJson(json['CaseArea'],'SupportCaseAreaResponse',context!);
        Comments = JsonConverters.fromJson(json['Comments'],'List<SupportCaseCommentsResponse>',context!);
        Attachments = JsonConverters.fromJson(json['Attachments'],'List<SupportCaseAttachmentResponse>',context!);
        CaseStatusOptions = JsonConverters.fromJson(json['CaseStatusOptions'],'List<SupportCaseStatusResponse>',context!);
        CaseTypeOptions = JsonConverters.fromJson(json['CaseTypeOptions'],'List<SupportCaseTypeResponse>',context!);
        CaseAreaOptions = JsonConverters.fromJson(json['CaseAreaOptions'],'List<SupportCaseAreaResponse>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'CompanyUserId': CompanyUserId,
        'Title': Title,
        'Description': Description,
        'CaseStatusId': CaseStatusId,
        'CaseTypeId': CaseTypeId,
        'CaseAreaId': CaseAreaId,
        'CreatedBy': CreatedBy,
        'UpdatedBy': UpdatedBy,
        'SolvedBy': SolvedBy,
        'Updated': JsonConverters.toJson(Updated,'DateTime',context!),
        'Created': JsonConverters.toJson(Created,'DateTime',context!),
        'CaseOwner': CaseOwner,
        'CaseStatus': JsonConverters.toJson(CaseStatus,'SupportCaseStatusResponse',context!),
        'CaseType': JsonConverters.toJson(CaseType,'SupportCaseTypeResponse',context!),
        'CaseArea': JsonConverters.toJson(CaseArea,'SupportCaseAreaResponse',context!),
        'Comments': JsonConverters.toJson(Comments,'List<SupportCaseCommentsResponse>',context!),
        'Attachments': JsonConverters.toJson(Attachments,'List<SupportCaseAttachmentResponse>',context!),
        'CaseStatusOptions': JsonConverters.toJson(CaseStatusOptions,'List<SupportCaseStatusResponse>',context!),
        'CaseTypeOptions': JsonConverters.toJson(CaseTypeOptions,'List<SupportCaseTypeResponse>',context!),
        'CaseAreaOptions': JsonConverters.toJson(CaseAreaOptions,'List<SupportCaseAreaResponse>',context!)
    };

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

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403)
// @ValidateRequest(Validator="IsAuthenticated")
class SuperAdminUpdateSupportCase 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? Id;

    /**
    * The case title.
    */
    // @ApiMember(Description="The case title.")
    String? Title;

    /**
    * The case description.
    */
    // @ApiMember(Description="The case description.")
    String? Description;

    /**
    * If the case type id.
    */
    // @ApiMember(Description="If the case type id.")
    int? CaseTypeId;

    /**
    * If the case area id.
    */
    // @ApiMember(Description="If the case area id.")
    int? CaseAreaId;

    SuperAdminUpdateSupportCase({this.CompanyId,this.Id,this.Title,this.Description,this.CaseTypeId,this.CaseAreaId});
    SuperAdminUpdateSupportCase.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
    'SupportCaseStatusResponse': TypeInfo(TypeOf.Class, create:() => SupportCaseStatusResponse()),
    'SupportCaseTypeResponse': TypeInfo(TypeOf.Class, create:() => SupportCaseTypeResponse()),
    'SupportCaseAreaResponse': TypeInfo(TypeOf.Class, create:() => SupportCaseAreaResponse()),
    'SupportCaseCommentsResponse': TypeInfo(TypeOf.Class, create:() => SupportCaseCommentsResponse()),
    'SupportCaseAttachmentResponse': TypeInfo(TypeOf.Class, create:() => SupportCaseAttachmentResponse()),
    'SupportCaseQueryResponse': TypeInfo(TypeOf.Class, create:() => SupportCaseQueryResponse()),
    'List<SupportCaseCommentsResponse>': TypeInfo(TypeOf.Class, create:() => <SupportCaseCommentsResponse>[]),
    'List<SupportCaseAttachmentResponse>': TypeInfo(TypeOf.Class, create:() => <SupportCaseAttachmentResponse>[]),
    'List<SupportCaseStatusResponse>': TypeInfo(TypeOf.Class, create:() => <SupportCaseStatusResponse>[]),
    'List<SupportCaseTypeResponse>': TypeInfo(TypeOf.Class, create:() => <SupportCaseTypeResponse>[]),
    'List<SupportCaseAreaResponse>': TypeInfo(TypeOf.Class, create:() => <SupportCaseAreaResponse>[]),
    'SuperAdminUpdateSupportCase': TypeInfo(TypeOf.Class, create:() => SuperAdminUpdateSupportCase()),
});

Dart SuperAdminUpdateSupportCase DTOs

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

HTTP + CSV

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

PUT /superadmin/support/cases/{Id} HTTP/1.1 
Host: api.bokamera.se 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","Id":0,"Title":"String","Description":"String","CaseTypeId":0,"CaseAreaId":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Id":0,"Title":"String","Description":"String","CaseStatusId":0,"CaseTypeId":0,"CaseAreaId":0,"CreatedBy":"String","UpdatedBy":"String","SolvedBy":"String","CaseOwner":"String","CaseStatus":{"Id":0,"Name":"String","Description":"String","Icon":"String","Color":"String"},"CaseType":{"Id":0,"Name":"String","Description":"String"},"CaseArea":{"Id":0,"Name":"String","Description":"String"},"Comments":[{"SupportCaseId":0,"Id":0,"Comment":"String","CreatedBy":"String"}],"Attachments":[{"Id":0,"FileUrl":"String"}],"CaseStatusOptions":[{"Id":0,"Name":"String","Description":"String","Icon":"String","Color":"String"}],"CaseTypeOptions":[{"Id":0,"Name":"String","Description":"String"}],"CaseAreaOptions":[{"Id":0,"Name":"String","Description":"String"}]}