Requires the role: | superadmin |
PUT | /superadmin/support/cases/{Id} | Update a support case | Update a support case to the company of the currently logged in user, only administrators are allowed to add support cases. |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;
namespace BokaMera.API.ServiceModel.Dtos
{
[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("IsAuthenticated")]
public partial class SuperAdminUpdateSupportCase
: ISupportCase
{
///<summary>
///Enter the company id, if blank company id and you are an admin, your company id will be used.
///</summary>
[ApiMember(Description="Enter the company id, if blank company id and you are an admin, your company id will be used.", IsRequired=true)]
public virtual Guid? CompanyId { get; set; }
///<summary>
///The support case id
///</summary>
[ApiMember(Description="The support case id", ParameterType="path")]
public virtual int Id { get; set; }
///<summary>
///The case title.
///</summary>
[ApiMember(Description="The case title.")]
public virtual string Title { get; set; }
///<summary>
///The case description.
///</summary>
[ApiMember(Description="The case description.")]
public virtual string Description { get; set; }
///<summary>
///If the case type id.
///</summary>
[ApiMember(Description="If the case type id.")]
public virtual int? CaseTypeId { get; set; }
///<summary>
///If the case area id.
///</summary>
[ApiMember(Description="If the case area id.")]
public virtual int? CaseAreaId { get; set; }
}
public partial class SupportCaseAreaResponse
{
///<summary>
///The area id
///</summary>
[ApiMember(Description="The area id")]
public virtual int Id { get; set; }
///<summary>
///The area name
///</summary>
[ApiMember(Description="The area name")]
public virtual string Name { get; set; }
///<summary>
///The area description
///</summary>
[ApiMember(Description="The area description")]
public virtual string Description { get; set; }
}
public partial class SupportCaseAttachmentResponse
{
///<summary>
///The attachment id
///</summary>
[ApiMember(Description="The attachment id")]
public virtual int Id { get; set; }
///<summary>
///The attachment file url
///</summary>
[ApiMember(Description="The attachment file url")]
public virtual string FileUrl { get; set; }
}
public partial class SupportCaseCommentsResponse
{
///<summary>
///The case id
///</summary>
[ApiMember(Description="The case id")]
public virtual int SupportCaseId { get; set; }
///<summary>
///The comments id
///</summary>
[ApiMember(Description="The comments id")]
public virtual int Id { get; set; }
///<summary>
///The case comment
///</summary>
[ApiMember(Description="The case comment")]
public virtual string Comment { get; set; }
///<summary>
///The case comment created by
///</summary>
[ApiMember(Description="The case comment created by")]
public virtual string CreatedBy { get; set; }
///<summary>
///The case comment created date
///</summary>
[ApiMember(Description="The case comment created date")]
public virtual DateTime Created { get; set; }
}
public partial class SupportCaseQueryResponse
{
public SupportCaseQueryResponse()
{
Comments = new List<SupportCaseCommentsResponse>{};
Attachments = new List<SupportCaseAttachmentResponse>{};
CaseStatusOptions = new List<SupportCaseStatusResponse>{};
CaseTypeOptions = new List<SupportCaseTypeResponse>{};
CaseAreaOptions = new List<SupportCaseAreaResponse>{};
}
///<summary>
///The support case id
///</summary>
[ApiMember(Description="The support case id")]
public virtual int Id { get; set; }
///<summary>
///The company user id
///</summary>
[ApiMember(Description="The company user id")]
public virtual Guid CompanyUserId { get; set; }
///<summary>
///The case title.
///</summary>
[ApiMember(Description="The case title.")]
public virtual string Title { get; set; }
///<summary>
///The case description.
///</summary>
[ApiMember(Description="The case description.")]
public virtual string Description { get; set; }
///<summary>
///The case status id.
///</summary>
[ApiMember(Description="The case status id.")]
public virtual int CaseStatusId { get; set; }
///<summary>
///If the case type id.
///</summary>
[ApiMember(Description="If the case type id.")]
public virtual int CaseTypeId { get; set; }
///<summary>
///If the case area id.
///</summary>
[ApiMember(Description="If the case area id.")]
public virtual int CaseAreaId { get; set; }
///<summary>
///The case created by.
///</summary>
[ApiMember(Description="The case created by.")]
public virtual string CreatedBy { get; set; }
///<summary>
///The case updated by.
///</summary>
[ApiMember(Description="The case updated by.")]
public virtual string UpdatedBy { get; set; }
///<summary>
///The case solved by.
///</summary>
[ApiMember(Description="The case solved by.")]
public virtual string SolvedBy { get; set; }
///<summary>
///If case updated date.
///</summary>
[ApiMember(Description="If case updated date.")]
public virtual DateTime Updated { get; set; }
///<summary>
///If case created date.
///</summary>
[ApiMember(Description="If case created date.")]
public virtual DateTime Created { get; set; }
///<summary>
///Who owns the support case.
///</summary>
[ApiMember(Description="Who owns the support case.")]
public virtual string CaseOwner { get; set; }
///<summary>
///The case status information.
///</summary>
[ApiMember(Description="The case status information.")]
public virtual SupportCaseStatusResponse CaseStatus { get; set; }
///<summary>
///The case type information.
///</summary>
[ApiMember(Description="The case type information.")]
public virtual SupportCaseTypeResponse CaseType { get; set; }
///<summary>
///The case area information.
///</summary>
[ApiMember(Description="The case area information.")]
public virtual SupportCaseAreaResponse CaseArea { get; set; }
///<summary>
///The case comments.
///</summary>
[ApiMember(Description="The case comments.")]
public virtual List<SupportCaseCommentsResponse> Comments { get; set; }
///<summary>
///The case attachments.
///</summary>
[ApiMember(Description="The case attachments.")]
public virtual List<SupportCaseAttachmentResponse> Attachments { get; set; }
///<summary>
///The case status options to select from.
///</summary>
[ApiMember(Description="The case status options to select from.")]
public virtual List<SupportCaseStatusResponse> CaseStatusOptions { get; set; }
///<summary>
///The case type options to select from.
///</summary>
[ApiMember(Description="The case type options to select from.")]
public virtual List<SupportCaseTypeResponse> CaseTypeOptions { get; set; }
///<summary>
///The case area options to select from.
///</summary>
[ApiMember(Description="The case area options to select from.")]
public virtual List<SupportCaseAreaResponse> CaseAreaOptions { get; set; }
}
public partial class SupportCaseStatusResponse
{
///<summary>
///The status id
///</summary>
[ApiMember(Description="The status id")]
public virtual int Id { get; set; }
///<summary>
///The status name
///</summary>
[ApiMember(Description="The status name")]
public virtual string Name { get; set; }
///<summary>
///The status description
///</summary>
[ApiMember(Description="The status description")]
public virtual string Description { get; set; }
///<summary>
///The status icon
///</summary>
[ApiMember(Description="The status icon")]
public virtual string Icon { get; set; }
///<summary>
///The status color
///</summary>
[ApiMember(Description="The status color")]
public virtual string Color { get; set; }
}
public partial class SupportCaseTypeResponse
{
///<summary>
///The type id
///</summary>
[ApiMember(Description="The type id")]
public virtual int Id { get; set; }
///<summary>
///The type name
///</summary>
[ApiMember(Description="The type name")]
public virtual string Name { get; set; }
///<summary>
///The type description
///</summary>
[ApiMember(Description="The type description")]
public virtual string Description { get; set; }
}
}
C# SuperAdminUpdateSupportCase DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
Content-Type: text/jsv
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/jsv 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 } ] }