Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
DELETE | /messages/templates/{Id} | Delete an existing company message templates | Delete an existing company message templates. |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
@ValidateRequest(Validator="IsAuthenticated")
public static class DeleteMessageTemplate implements ICompany
{
/**
* The company id, if empty will use the company id for the user you are logged in with.
*/
@ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
public UUID CompanyId = null;
/**
* The message template id.
*/
@ApiMember(Description="The message template id.", IsRequired=true, ParameterType="path")
public Integer Id = null;
public UUID getCompanyId() { return CompanyId; }
public DeleteMessageTemplate setCompanyId(UUID value) { this.CompanyId = value; return this; }
public Integer getId() { return Id; }
public DeleteMessageTemplate setId(Integer value) { this.Id = value; return this; }
}
public static class MessageTemplatesQueryResponse
{
/**
* The message template id
*/
@ApiMember(Description="The message template id")
public Integer Id = null;
/**
* The message template name.
*/
@ApiMember(Description="The message template name.")
public String Name = null;
/**
* The message template title.
*/
@ApiMember(Description="The message template title.")
public String Title = null;
/**
* The message template title.
*/
@ApiMember(Description="The message template title.")
public String Body = null;
/**
* The message template sender (an email for message types with sendmethod 1, for SMS this cannot be set).
*/
@ApiMember(Description="The message template sender (an email for message types with sendmethod 1, for SMS this cannot be set).")
public String Sender = null;
/**
* If the message template is the default message currently in use.
*/
@ApiMember(Description="If the message template is the default message currently in use.")
public Boolean Default = null;
/**
* If the message type information.
*/
@ApiMember(Description="If the message type information.")
public MessageTypeQueryResponse MessageType = null;
/**
* Template language.
*/
@ApiMember(Description="Template language.")
public String Language = null;
/**
* The connected services which the template is valid for. If empty then it's valid for all services.
*/
@ApiMember(Description="The connected services which the template is valid for. If empty then it's valid for all services.")
public ArrayList<MessageServices> Services = null;
public Integer getId() { return Id; }
public MessageTemplatesQueryResponse setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public MessageTemplatesQueryResponse setName(String value) { this.Name = value; return this; }
public String getTitle() { return Title; }
public MessageTemplatesQueryResponse setTitle(String value) { this.Title = value; return this; }
public String getBody() { return Body; }
public MessageTemplatesQueryResponse setBody(String value) { this.Body = value; return this; }
public String getSender() { return Sender; }
public MessageTemplatesQueryResponse setSender(String value) { this.Sender = value; return this; }
public Boolean isDefault() { return Default; }
public MessageTemplatesQueryResponse setDefault(Boolean value) { this.Default = value; return this; }
public MessageTypeQueryResponse getMessageType() { return MessageType; }
public MessageTemplatesQueryResponse setMessageType(MessageTypeQueryResponse value) { this.MessageType = value; return this; }
public String getLanguage() { return Language; }
public MessageTemplatesQueryResponse setLanguage(String value) { this.Language = value; return this; }
public ArrayList<MessageServices> getServices() { return Services; }
public MessageTemplatesQueryResponse setServices(ArrayList<MessageServices> value) { this.Services = value; return this; }
}
public static class MessageTypeQueryResponse
{
/**
* The message type id
*/
@ApiMember(Description="The message type id")
public Integer Id = null;
/**
* The message type name.
*/
@ApiMember(Description="The message type name.")
public String Name = null;
/**
* The message type description.
*/
@ApiMember(Description="The message type description.")
public String Description = null;
/**
* The maximum number of charachters that can be entered into message body using this type.
*/
@ApiMember(Description="The maximum number of charachters that can be entered into message body using this type.")
public Integer MaxCharacters = null;
/**
* The default text that is always included when sending messages of this type.
*/
@ApiMember(Description="The default text that is always included when sending messages of this type.")
public String DefaultText = null;
/**
* The send method for this type. 1 = Email, 2 = SMS.
*/
@ApiMember(Description="The send method for this type. 1 = Email, 2 = SMS.")
public Integer SendMethodId = null;
public Integer getId() { return Id; }
public MessageTypeQueryResponse setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public MessageTypeQueryResponse setName(String value) { this.Name = value; return this; }
public String getDescription() { return Description; }
public MessageTypeQueryResponse setDescription(String value) { this.Description = value; return this; }
public Integer getMaxCharacters() { return MaxCharacters; }
public MessageTypeQueryResponse setMaxCharacters(Integer value) { this.MaxCharacters = value; return this; }
public String getDefaultText() { return DefaultText; }
public MessageTypeQueryResponse setDefaultText(String value) { this.DefaultText = value; return this; }
public Integer getSendMethodId() { return SendMethodId; }
public MessageTypeQueryResponse setSendMethodId(Integer value) { this.SendMethodId = value; return this; }
}
public static class MessageServices
{
public Integer Id = null;
/**
* Name of the service
*/
@ApiMember(Description="Name of the service")
public String Name = null;
/**
* The image url of the service
*/
@ApiMember(Description="The image url of the service")
public Uri ImageUrl = null;
public Integer getId() { return Id; }
public MessageServices setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public MessageServices setName(String value) { this.Name = value; return this; }
public Uri getImageUrl() { return ImageUrl; }
public MessageServices setImageUrl(Uri value) { this.ImageUrl = value; return this; }
}
}
Java DeleteMessageTemplate DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
DELETE /messages/templates/{Id} HTTP/1.1 Host: api.bokamera.se Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Id":0,"Name":"String","Title":"String","Body":"String","Sender":"String","Default":false,"MessageType":{"Id":0,"Name":"String","Description":"String","MaxCharacters":0,"DefaultText":"String","SendMethodId":0},"Language":"String","Services":[{"Id":0,"Name":"String"}]}