| POST | /acknowlegement/{SubscriptionId}/{CendynPropertyId} |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class MessageAcknowledgement
{
public Acknowledgement acknowledgement = null;
public String subscriptionId = null;
public String cendynPropertyId = null;
public Acknowledgement getAcknowledgement() { return acknowledgement; }
public MessageAcknowledgement setAcknowledgement(Acknowledgement value) { this.acknowledgement = value; return this; }
public String getSubscriptionId() { return subscriptionId; }
public MessageAcknowledgement setSubscriptionId(String value) { this.subscriptionId = value; return this; }
public String getCendynPropertyId() { return cendynPropertyId; }
public MessageAcknowledgement setCendynPropertyId(String value) { this.cendynPropertyId = value; return this; }
}
public static class Acknowledgement
{
public String cendynPropertyID = null;
public String hotelCode = null;
public Boolean success = null;
public String echoToken = null;
public ArrayList<UniqueIDType> uniqueIDs = null;
public ArrayList<StatusMessage> messages = null;
public String getCendynPropertyID() { return cendynPropertyID; }
public Acknowledgement setCendynPropertyID(String value) { this.cendynPropertyID = value; return this; }
public String getHotelCode() { return hotelCode; }
public Acknowledgement setHotelCode(String value) { this.hotelCode = value; return this; }
public Boolean isSuccess() { return success; }
public Acknowledgement setSuccess(Boolean value) { this.success = value; return this; }
public String getEchoToken() { return echoToken; }
public Acknowledgement setEchoToken(String value) { this.echoToken = value; return this; }
public ArrayList<UniqueIDType> getUniqueIDs() { return uniqueIDs; }
public Acknowledgement setUniqueIDs(ArrayList<UniqueIDType> value) { this.uniqueIDs = value; return this; }
public ArrayList<StatusMessage> getMessages() { return messages; }
public Acknowledgement setMessages(ArrayList<StatusMessage> value) { this.messages = value; return this; }
}
public static class UniqueIDType
{
public String id = null;
public String type = null;
public String context = null;
public String getId() { return id; }
public UniqueIDType setId(String value) { this.id = value; return this; }
public String getType() { return type; }
public UniqueIDType setType(String value) { this.type = value; return this; }
public String getContext() { return context; }
public UniqueIDType setContext(String value) { this.context = value; return this; }
}
public static class StatusMessage
{
public StatusMessageType messageType = null;
public String code = null;
public String message = null;
public String target = null;
public StatusMessageType getMessageType() { return messageType; }
public StatusMessage setMessageType(StatusMessageType value) { this.messageType = value; return this; }
public String getCode() { return code; }
public StatusMessage setCode(String value) { this.code = value; return this; }
public String getMessage() { return message; }
public StatusMessage setMessage(String value) { this.message = value; return this; }
public String getTarget() { return target; }
public StatusMessage setTarget(String value) { this.target = value; return this; }
}
public static enum StatusMessageType
{
Info,
Warning,
Error;
}
public static class Response
{
public String statusCode = null;
public Integer recordCount = null;
public Integer errorCount = null;
public String getStatusCode() { return statusCode; }
public Response setStatusCode(String value) { this.statusCode = value; return this; }
public Integer getRecordCount() { return recordCount; }
public Response setRecordCount(Integer value) { this.recordCount = value; return this; }
public Integer getErrorCount() { return errorCount; }
public Response setErrorCount(Integer value) { this.errorCount = value; return this; }
}
}
Java MessageAcknowledgement DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /acknowlegement/{SubscriptionId}/{CendynPropertyId} HTTP/1.1
Host: cert.cendyn.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<MessageAcknowledgement xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenResSS.ServiceModel">
<Acknowledgement>
<CendynPropertyID>String</CendynPropertyID>
<EchoToken>String</EchoToken>
<HotelCode>String</HotelCode>
<Messages>
<StatusMessage>
<Code>String</Code>
<Message>String</Message>
<MessageType>Info</MessageType>
<Target>String</Target>
</StatusMessage>
</Messages>
<Success>false</Success>
<UniqueIDs>
<UniqueIDType>
<Context>String</Context>
<ID>String</ID>
<Type>String</Type>
</UniqueIDType>
</UniqueIDs>
</Acknowledgement>
<CendynPropertyId>String</CendynPropertyId>
<SubscriptionId>String</SubscriptionId>
</MessageAcknowledgement>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenResSS.ServiceModel"> <ErrorCount>0</ErrorCount> <RecordCount>0</RecordCount> <StatusCode>String</StatusCode> </Response>