| POST | /stayhistory/{SubscriptionId}/{CendynPropertyId} |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class StayHistoryPost
{
public StayHistoryContainer stayHistoryContainer = null;
public String subscriptionId = null;
public String cendynPropertyId = null;
public StayHistoryContainer getStayHistoryContainer() { return stayHistoryContainer; }
public StayHistoryPost setStayHistoryContainer(StayHistoryContainer value) { this.stayHistoryContainer = value; return this; }
public String getSubscriptionId() { return subscriptionId; }
public StayHistoryPost setSubscriptionId(String value) { this.subscriptionId = value; return this; }
public String getCendynPropertyId() { return cendynPropertyId; }
public StayHistoryPost setCendynPropertyId(String value) { this.cendynPropertyId = value; return this; }
}
public static class StayHistoryContainer
{
public String echoToken = null;
public ArrayList<StayHistory> stayHistoryList = null;
public String getEchoToken() { return echoToken; }
public StayHistoryContainer setEchoToken(String value) { this.echoToken = value; return this; }
public ArrayList<StayHistory> getStayHistoryList() { return stayHistoryList; }
public StayHistoryContainer setStayHistoryList(ArrayList<StayHistory> value) { this.stayHistoryList = value; return this; }
}
public static class StayHistory
{
public String cendynPropertyID = null;
public String resortID = null;
public String externalProfileID1 = null;
public String externalResId1 = null;
public String crsBookNo = null;
public String resortBookNo = null;
public Integer resortLegNo = null;
public String confirmationID = null;
public String reservationStatus = null;
public Boolean hasDailyRooms = null;
public String rateRoomType = null;
public Date actualArrivalDate = null;
public Date actualDepartureDate = null;
public Date bookDate = null;
public Date bookedArrivalDate = null;
public Date bookedDepartureDate = null;
public String compYN = null;
public Integer adults = null;
public Integer children = null;
public String roomCategory = null;
public String roomNumber = null;
public BigDecimal rateAmount = null;
public String rateCode = null;
public String rateAmountCurrencyCode = null;
public String currencyCode = null;
public String sourceCode = null;
public String marketCode = null;
public String travelAgentID = null;
public String companyID = null;
public String channel = null;
public String paymentMethod = null;
public String rateCurrencyCode = null;
public BigDecimal totalRevenue = null;
public BigDecimal roomRevenue = null;
public BigDecimal fbRevenue = null;
public String membershipType = null;
public String membershipID = null;
public String transactionID = null;
public String transactionStatus = null;
public ArrayList<UniqueIDType> uniqueIDs = null;
public ArrayList<StayHistoryRevenue> stayHistoryRevenueCollection = null;
public ArrayList<StayHistoryDailyRate> stayHistoryDailyRateCollection = null;
public String getCendynPropertyID() { return cendynPropertyID; }
public StayHistory setCendynPropertyID(String value) { this.cendynPropertyID = value; return this; }
public String getResortID() { return resortID; }
public StayHistory setResortID(String value) { this.resortID = value; return this; }
public String getExternalProfileID1() { return externalProfileID1; }
public StayHistory setExternalProfileID1(String value) { this.externalProfileID1 = value; return this; }
public String getExternalResId1() { return externalResId1; }
public StayHistory setExternalResId1(String value) { this.externalResId1 = value; return this; }
public String getCrsBookNo() { return crsBookNo; }
public StayHistory setCrsBookNo(String value) { this.crsBookNo = value; return this; }
public String getResortBookNo() { return resortBookNo; }
public StayHistory setResortBookNo(String value) { this.resortBookNo = value; return this; }
public Integer getResortLegNo() { return resortLegNo; }
public StayHistory setResortLegNo(Integer value) { this.resortLegNo = value; return this; }
public String getConfirmationID() { return confirmationID; }
public StayHistory setConfirmationID(String value) { this.confirmationID = value; return this; }
public String getReservationStatus() { return reservationStatus; }
public StayHistory setReservationStatus(String value) { this.reservationStatus = value; return this; }
public Boolean isHasDailyRooms() { return hasDailyRooms; }
public StayHistory setHasDailyRooms(Boolean value) { this.hasDailyRooms = value; return this; }
public String getRateRoomType() { return rateRoomType; }
public StayHistory setRateRoomType(String value) { this.rateRoomType = value; return this; }
public Date getActualArrivalDate() { return actualArrivalDate; }
public StayHistory setActualArrivalDate(Date value) { this.actualArrivalDate = value; return this; }
public Date getActualDepartureDate() { return actualDepartureDate; }
public StayHistory setActualDepartureDate(Date value) { this.actualDepartureDate = value; return this; }
public Date getBookDate() { return bookDate; }
public StayHistory setBookDate(Date value) { this.bookDate = value; return this; }
public Date getBookedArrivalDate() { return bookedArrivalDate; }
public StayHistory setBookedArrivalDate(Date value) { this.bookedArrivalDate = value; return this; }
public Date getBookedDepartureDate() { return bookedDepartureDate; }
public StayHistory setBookedDepartureDate(Date value) { this.bookedDepartureDate = value; return this; }
public String getCompYN() { return compYN; }
public StayHistory setCompYN(String value) { this.compYN = value; return this; }
public Integer getAdults() { return adults; }
public StayHistory setAdults(Integer value) { this.adults = value; return this; }
public Integer getChildren() { return children; }
public StayHistory setChildren(Integer value) { this.children = value; return this; }
public String getRoomCategory() { return roomCategory; }
public StayHistory setRoomCategory(String value) { this.roomCategory = value; return this; }
public String getRoomNumber() { return roomNumber; }
public StayHistory setRoomNumber(String value) { this.roomNumber = value; return this; }
public BigDecimal getRateAmount() { return rateAmount; }
public StayHistory setRateAmount(BigDecimal value) { this.rateAmount = value; return this; }
public String getRateCode() { return rateCode; }
public StayHistory setRateCode(String value) { this.rateCode = value; return this; }
public String getRateAmountCurrencyCode() { return rateAmountCurrencyCode; }
public StayHistory setRateAmountCurrencyCode(String value) { this.rateAmountCurrencyCode = value; return this; }
public String getCurrencyCode() { return currencyCode; }
public StayHistory setCurrencyCode(String value) { this.currencyCode = value; return this; }
public String getSourceCode() { return sourceCode; }
public StayHistory setSourceCode(String value) { this.sourceCode = value; return this; }
public String getMarketCode() { return marketCode; }
public StayHistory setMarketCode(String value) { this.marketCode = value; return this; }
public String getTravelAgentID() { return travelAgentID; }
public StayHistory setTravelAgentID(String value) { this.travelAgentID = value; return this; }
public String getCompanyID() { return companyID; }
public StayHistory setCompanyID(String value) { this.companyID = value; return this; }
public String getChannel() { return channel; }
public StayHistory setChannel(String value) { this.channel = value; return this; }
public String getPaymentMethod() { return paymentMethod; }
public StayHistory setPaymentMethod(String value) { this.paymentMethod = value; return this; }
public String getRateCurrencyCode() { return rateCurrencyCode; }
public StayHistory setRateCurrencyCode(String value) { this.rateCurrencyCode = value; return this; }
public BigDecimal getTotalRevenue() { return totalRevenue; }
public StayHistory setTotalRevenue(BigDecimal value) { this.totalRevenue = value; return this; }
public BigDecimal getRoomRevenue() { return roomRevenue; }
public StayHistory setRoomRevenue(BigDecimal value) { this.roomRevenue = value; return this; }
public BigDecimal getFbRevenue() { return fbRevenue; }
public StayHistory setFbRevenue(BigDecimal value) { this.fbRevenue = value; return this; }
public String getMembershipType() { return membershipType; }
public StayHistory setMembershipType(String value) { this.membershipType = value; return this; }
public String getMembershipID() { return membershipID; }
public StayHistory setMembershipID(String value) { this.membershipID = value; return this; }
public String getTransactionID() { return transactionID; }
public StayHistory setTransactionID(String value) { this.transactionID = value; return this; }
public String getTransactionStatus() { return transactionStatus; }
public StayHistory setTransactionStatus(String value) { this.transactionStatus = value; return this; }
public ArrayList<UniqueIDType> getUniqueIDs() { return uniqueIDs; }
public StayHistory setUniqueIDs(ArrayList<UniqueIDType> value) { this.uniqueIDs = value; return this; }
public ArrayList<StayHistoryRevenue> getStayHistoryRevenueCollection() { return stayHistoryRevenueCollection; }
public StayHistory setStayHistoryRevenueCollection(ArrayList<StayHistoryRevenue> value) { this.stayHistoryRevenueCollection = value; return this; }
public ArrayList<StayHistoryDailyRate> getStayHistoryDailyRateCollection() { return stayHistoryDailyRateCollection; }
public StayHistory setStayHistoryDailyRateCollection(ArrayList<StayHistoryDailyRate> value) { this.stayHistoryDailyRateCollection = 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 StayHistoryRevenue
{
public String recordStatus = null;
@DataMember(IsRequired=true)
public String revenueGroup = null;
@DataMember(IsRequired=true)
public String revenueType = null;
@DataMember(IsRequired=true)
public BigDecimal amount = null;
public String currencyCode = null;
public String folioWindow = null;
public Date transactionDate = null;
public Date inactiveDate = null;
public String getRecordStatus() { return recordStatus; }
public StayHistoryRevenue setRecordStatus(String value) { this.recordStatus = value; return this; }
public String getRevenueGroup() { return revenueGroup; }
public StayHistoryRevenue setRevenueGroup(String value) { this.revenueGroup = value; return this; }
public String getRevenueType() { return revenueType; }
public StayHistoryRevenue setRevenueType(String value) { this.revenueType = value; return this; }
public BigDecimal getAmount() { return amount; }
public StayHistoryRevenue setAmount(BigDecimal value) { this.amount = value; return this; }
public String getCurrencyCode() { return currencyCode; }
public StayHistoryRevenue setCurrencyCode(String value) { this.currencyCode = value; return this; }
public String getFolioWindow() { return folioWindow; }
public StayHistoryRevenue setFolioWindow(String value) { this.folioWindow = value; return this; }
public Date getTransactionDate() { return transactionDate; }
public StayHistoryRevenue setTransactionDate(Date value) { this.transactionDate = value; return this; }
public Date getInactiveDate() { return inactiveDate; }
public StayHistoryRevenue setInactiveDate(Date value) { this.inactiveDate = value; return this; }
}
public static class StayHistoryDailyRate
{
public String recordStatus = null;
public Date transactionDate = null;
public String rateCode = null;
public String marketCode = null;
public BigDecimal amount = null;
public String currencyCode = null;
public String roomNumber = null;
public String resourceID = null;
public String pseudoRoom = null;
public String roomCategory = null;
public String rateRoomType = null;
public Date inactiveDate = null;
public String getRecordStatus() { return recordStatus; }
public StayHistoryDailyRate setRecordStatus(String value) { this.recordStatus = value; return this; }
public Date getTransactionDate() { return transactionDate; }
public StayHistoryDailyRate setTransactionDate(Date value) { this.transactionDate = value; return this; }
public String getRateCode() { return rateCode; }
public StayHistoryDailyRate setRateCode(String value) { this.rateCode = value; return this; }
public String getMarketCode() { return marketCode; }
public StayHistoryDailyRate setMarketCode(String value) { this.marketCode = value; return this; }
public BigDecimal getAmount() { return amount; }
public StayHistoryDailyRate setAmount(BigDecimal value) { this.amount = value; return this; }
public String getCurrencyCode() { return currencyCode; }
public StayHistoryDailyRate setCurrencyCode(String value) { this.currencyCode = value; return this; }
public String getRoomNumber() { return roomNumber; }
public StayHistoryDailyRate setRoomNumber(String value) { this.roomNumber = value; return this; }
public String getResourceID() { return resourceID; }
public StayHistoryDailyRate setResourceID(String value) { this.resourceID = value; return this; }
public String getPseudoRoom() { return pseudoRoom; }
public StayHistoryDailyRate setPseudoRoom(String value) { this.pseudoRoom = value; return this; }
public String getRoomCategory() { return roomCategory; }
public StayHistoryDailyRate setRoomCategory(String value) { this.roomCategory = value; return this; }
public String getRateRoomType() { return rateRoomType; }
public StayHistoryDailyRate setRateRoomType(String value) { this.rateRoomType = value; return this; }
public Date getInactiveDate() { return inactiveDate; }
public StayHistoryDailyRate setInactiveDate(Date value) { this.inactiveDate = 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 /stayhistory/{SubscriptionId}/{CendynPropertyId} HTTP/1.1
Host: cert.cendyn.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<StayHistoryPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenResSS.ServiceModel">
<CendynPropertyId>String</CendynPropertyId>
<StayHistoryContainer>
<EchoToken>String</EchoToken>
<StayHistoryList>
<StayHistory>
<ActualArrivalDate>0001-01-01T00:00:00</ActualArrivalDate>
<ActualDepartureDate>0001-01-01T00:00:00</ActualDepartureDate>
<Adults>0</Adults>
<BookDate>0001-01-01T00:00:00</BookDate>
<BookedArrivalDate>0001-01-01T00:00:00</BookedArrivalDate>
<BookedDepartureDate>0001-01-01T00:00:00</BookedDepartureDate>
<CRSBookNo>String</CRSBookNo>
<CendynPropertyID>String</CendynPropertyID>
<Channel>String</Channel>
<Children>0</Children>
<CompYN>String</CompYN>
<CompanyID>String</CompanyID>
<ConfirmationID>String</ConfirmationID>
<CurrencyCode>String</CurrencyCode>
<ExternalProfileID1>String</ExternalProfileID1>
<ExternalResId1>String</ExternalResId1>
<FbRevenue>0</FbRevenue>
<HasDailyRooms>false</HasDailyRooms>
<MarketCode>String</MarketCode>
<MembershipID>String</MembershipID>
<MembershipType>String</MembershipType>
<PaymentMethod>String</PaymentMethod>
<RateAmount>0</RateAmount>
<RateAmountCurrencyCode>String</RateAmountCurrencyCode>
<RateCode>String</RateCode>
<RateCurrencyCode>String</RateCurrencyCode>
<RateRoomType>String</RateRoomType>
<ReservationStatus>String</ReservationStatus>
<ResortBookNo>String</ResortBookNo>
<ResortID>String</ResortID>
<ResortLegNo>0</ResortLegNo>
<RoomCategory>String</RoomCategory>
<RoomNumber>String</RoomNumber>
<RoomRevenue>0</RoomRevenue>
<SourceCode>String</SourceCode>
<StayHistoryDailyRateCollection>
<StayHistoryDailyRate>
<Amount>0</Amount>
<CurrencyCode>String</CurrencyCode>
<InactiveDate>0001-01-01T00:00:00</InactiveDate>
<MarketCode>String</MarketCode>
<PseudoRoom>String</PseudoRoom>
<RateCode>String</RateCode>
<RateRoomType>String</RateRoomType>
<RecordStatus>String</RecordStatus>
<ResourceID>String</ResourceID>
<RoomCategory>String</RoomCategory>
<RoomNumber>String</RoomNumber>
<TransactionDate>0001-01-01T00:00:00</TransactionDate>
</StayHistoryDailyRate>
</StayHistoryDailyRateCollection>
<StayHistoryRevenueCollection>
<StayHistoryRevenue>
<Amount>0</Amount>
<CurrencyCode>String</CurrencyCode>
<FolioWindow>String</FolioWindow>
<InactiveDate>0001-01-01T00:00:00</InactiveDate>
<RecordStatus>String</RecordStatus>
<RevenueGroup>String</RevenueGroup>
<RevenueType>String</RevenueType>
<TransactionDate>0001-01-01T00:00:00</TransactionDate>
</StayHistoryRevenue>
</StayHistoryRevenueCollection>
<TotalRevenue>0</TotalRevenue>
<TransactionID>String</TransactionID>
<TransactionStatus>String</TransactionStatus>
<TravelAgentID>String</TravelAgentID>
<UniqueIDs>
<UniqueIDType>
<Context>String</Context>
<ID>String</ID>
<Type>String</Type>
</UniqueIDType>
</UniqueIDs>
</StayHistory>
</StayHistoryList>
</StayHistoryContainer>
<SubscriptionId>String</SubscriptionId>
</StayHistoryPost>
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>