| POST | /setupcode/{SubscriptionId}/{CendynPropertyId} |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class SetupCodePost
{
public ArrayList<SetupCode> setupCodes = null;
public String subscriptionId = null;
public String cendynPropertyId = null;
public ArrayList<SetupCode> getSetupCodes() { return setupCodes; }
public SetupCodePost setSetupCodes(ArrayList<SetupCode> value) { this.setupCodes = value; return this; }
public String getSubscriptionId() { return subscriptionId; }
public SetupCodePost setSubscriptionId(String value) { this.subscriptionId = value; return this; }
public String getCendynPropertyId() { return cendynPropertyId; }
public SetupCodePost setCendynPropertyId(String value) { this.cendynPropertyId = value; return this; }
}
public static class SetupCode
{
public String cendynPropertyID = null;
public String hotelCode = null;
public String codeId = null;
public String codeGroup = null;
public String languageCode = null;
public String nameValue = null;
public String codeValue = null;
public String description = null;
public String alternativeName = null;
public String alternativeCode = null;
public String alternativeDescription = null;
public Integer displaySequence = null;
public String comments = null;
public String codeSource = null;
public Boolean isActive = null;
public Date sourceDateCreated = null;
public String sourceCreateUser = null;
public Date sourceDateUpdated = null;
public String sourceUpdateUser = null;
public String getCendynPropertyID() { return cendynPropertyID; }
public SetupCode setCendynPropertyID(String value) { this.cendynPropertyID = value; return this; }
public String getHotelCode() { return hotelCode; }
public SetupCode setHotelCode(String value) { this.hotelCode = value; return this; }
public String getCodeId() { return codeId; }
public SetupCode setCodeId(String value) { this.codeId = value; return this; }
public String getCodeGroup() { return codeGroup; }
public SetupCode setCodeGroup(String value) { this.codeGroup = value; return this; }
public String getLanguageCode() { return languageCode; }
public SetupCode setLanguageCode(String value) { this.languageCode = value; return this; }
public String getNameValue() { return nameValue; }
public SetupCode setNameValue(String value) { this.nameValue = value; return this; }
public String getCodeValue() { return codeValue; }
public SetupCode setCodeValue(String value) { this.codeValue = value; return this; }
public String getDescription() { return description; }
public SetupCode setDescription(String value) { this.description = value; return this; }
public String getAlternativeName() { return alternativeName; }
public SetupCode setAlternativeName(String value) { this.alternativeName = value; return this; }
public String getAlternativeCode() { return alternativeCode; }
public SetupCode setAlternativeCode(String value) { this.alternativeCode = value; return this; }
public String getAlternativeDescription() { return alternativeDescription; }
public SetupCode setAlternativeDescription(String value) { this.alternativeDescription = value; return this; }
public Integer getDisplaySequence() { return displaySequence; }
public SetupCode setDisplaySequence(Integer value) { this.displaySequence = value; return this; }
public String getComments() { return comments; }
public SetupCode setComments(String value) { this.comments = value; return this; }
public String getCodeSource() { return codeSource; }
public SetupCode setCodeSource(String value) { this.codeSource = value; return this; }
public Boolean getIsActive() { return isActive; }
public SetupCode setIsActive(Boolean value) { this.isActive = value; return this; }
public Date getSourceDateCreated() { return sourceDateCreated; }
public SetupCode setSourceDateCreated(Date value) { this.sourceDateCreated = value; return this; }
public String getSourceCreateUser() { return sourceCreateUser; }
public SetupCode setSourceCreateUser(String value) { this.sourceCreateUser = value; return this; }
public Date getSourceDateUpdated() { return sourceDateUpdated; }
public SetupCode setSourceDateUpdated(Date value) { this.sourceDateUpdated = value; return this; }
public String getSourceUpdateUser() { return sourceUpdateUser; }
public SetupCode setSourceUpdateUser(String value) { this.sourceUpdateUser = value; return this; }
}
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; }
}
}
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 /setupcode/{SubscriptionId}/{CendynPropertyId} HTTP/1.1
Host: cert.cendyn.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SetupCodePost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenResSS.ServiceModel">
<CendynPropertyId>String</CendynPropertyId>
<SetupCodes>
<SetupCode>
<AlternativeCode>String</AlternativeCode>
<AlternativeDescription>String</AlternativeDescription>
<AlternativeName>String</AlternativeName>
<CendynPropertyID>String</CendynPropertyID>
<CodeGroup>String</CodeGroup>
<CodeId>String</CodeId>
<CodeSource>String</CodeSource>
<CodeValue>String</CodeValue>
<Comments>String</Comments>
<Description>String</Description>
<DisplaySequence>0</DisplaySequence>
<HotelCode>String</HotelCode>
<IsActive>false</IsActive>
<LanguageCode>String</LanguageCode>
<NameValue>String</NameValue>
<SourceCreateUser>String</SourceCreateUser>
<SourceDateCreated>0001-01-01T00:00:00</SourceDateCreated>
<SourceDateUpdated>0001-01-01T00:00:00</SourceDateUpdated>
<SourceUpdateUser>String</SourceUpdateUser>
</SetupCode>
</SetupCodes>
<SubscriptionId>String</SubscriptionId>
</SetupCodePost>
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>