| POST | /hotelrate/{SubscriptionId}/{CendynPropertyId} |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CenResSS.ServiceModel
Imports Cendyn.CenRes.DataLib.Models
Namespace Global
Namespace Cendyn.CenRes.DataLib.Models
Public Partial Class Rate
Public Sub New()
RateChargeDetails = New List(Of RateChargeDetail)
RateGuestCountDetails = New List(Of RateGuestCountDetail)
End Sub
Public Overridable Property HotelCode As String
Public Overridable Property RateCode As String
Public Overridable Property RoomCode As String
Public Overridable Property StartDate As Date
Public Overridable Property EndDate As Date
Public Overridable Property Rate1 As Nullable(Of Decimal)
Public Overridable Property Rate2 As Nullable(Of Decimal)
Public Overridable Property Rate3 As Nullable(Of Decimal)
Public Overridable Property Rate4 As Nullable(Of Decimal)
Public Overridable Property ExtraAdult As Nullable(Of Decimal)
Public Overridable Property ExtraChild As Nullable(Of Decimal)
Public Overridable Property ExtraBed As Nullable(Of Decimal)
Public Overridable Property CurrencyCode As String
Public Overridable Property FreeChildLimit As Nullable(Of Integer)
Public Overridable Property IncludeMonday As Nullable(Of Boolean)
Public Overridable Property IncludeTuesday As Nullable(Of Boolean)
Public Overridable Property IncludeWednesday As Nullable(Of Boolean)
Public Overridable Property IncludeThursday As Nullable(Of Boolean)
Public Overridable Property IncludeFriday As Nullable(Of Boolean)
Public Overridable Property IncludeSaturday As Nullable(Of Boolean)
Public Overridable Property IncludeSunday As Nullable(Of Boolean)
Public Overridable Property CustomerSegment As String
Public Overridable Property SourceName As String
Public Overridable Property SourceID As String
Public Overridable Property IsActive As Boolean
Public Overridable Property InactiveDate As Nullable(Of Date)
Public Overridable Property RateSetID As String
Public Overridable Property RateChargeDetails As List(Of RateChargeDetail)
Public Overridable Property RateGuestCountDetails As List(Of RateGuestCountDetail)
End Class
Public Partial Class RateChargeDetail
Public Overridable Property ChargeCode As String
Public Overridable Property IsBaseRate As Boolean
Public Overridable Property RateBeforeTax As Nullable(Of Decimal)
Public Overridable Property RateAfterTax As Nullable(Of Decimal)
Public Overridable Property UnitCount As Integer
Public Overridable Property TaxAmount As Nullable(Of Decimal)
End Class
Public Partial Class RateContainer
Public Sub New()
Rates = New List(Of Rate)
End Sub
Public Overridable Property EchoToken As String
Public Overridable Property RateType As RateType
Public Overridable Property ChangeAction As String
Public Overridable Property Rates As List(Of Rate)
End Class
Public Partial Class RateGuestCountDetail
Public Overridable Property GuestCount As Integer
Public Overridable Property MinRate As Nullable(Of Decimal)
Public Overridable Property MaxRate As Nullable(Of Decimal)
End Class
Public Partial Class RateType
Public Overridable Property HotelCode As String
Public Overridable Property RateCode As String
Public Overridable Property RateCategory As String
Public Overridable Property RateName As String
Public Overridable Property StartDate As Nullable(Of Date)
Public Overridable Property EndDate As Nullable(Of Date)
Public Overridable Property RateStatus As String
Public Overridable Property BaseRateCode As String
Public Overridable Property MarketCode As String
Public Overridable Property Confidential As Nullable(Of Boolean)
Public Overridable Property MealsIncluded As Nullable(Of Boolean)
Public Overridable Property TaxIncludedIndicator As String
Public Overridable Property RateCategoryDescription As String
Public Overridable Property DisplayText As String
Public Overridable Property ShortDescription As String
Public Overridable Property LongDescription As String
Public Overridable Property MinLOS As Nullable(Of Integer)
Public Overridable Property SourceName As String
Public Overridable Property SourceID As String
Public Overridable Property RateAdjustDirection As String
Public Overridable Property RateAdjustAmount As Nullable(Of Decimal)
Public Overridable Property RateAdjustPercent As Nullable(Of Decimal)
Public Overridable Property CurrencyCode As String
Public Overridable Property IsDaily As Boolean
Public Overridable Property IsActive As Boolean
Public Overridable Property InactiveDate As Nullable(Of Date)
End Class
Public Partial Class Response
Public Overridable Property StatusCode As String
Public Overridable Property RecordCount As Integer
Public Overridable Property ErrorCount As Integer
End Class
End Namespace
Namespace CenResSS.ServiceModel
Public Partial Class HotelRate
Public Overridable Property RateContainer As RateContainer
Public Overridable Property SubscriptionId As String
Public Overridable Property CendynPropertyId As String
End Class
End Namespace
End Namespace
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 /hotelrate/{SubscriptionId}/{CendynPropertyId} HTTP/1.1
Host: cert.cendyn.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<HotelRate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenResSS.ServiceModel">
<CendynPropertyId>String</CendynPropertyId>
<RateContainer>
<ChangeAction>String</ChangeAction>
<EchoToken>String</EchoToken>
<RateType>
<BaseRateCode>String</BaseRateCode>
<Confidential>false</Confidential>
<CurrencyCode>String</CurrencyCode>
<DisplayText>String</DisplayText>
<EndDate>0001-01-01T00:00:00</EndDate>
<HotelCode>String</HotelCode>
<InactiveDate>0001-01-01T00:00:00</InactiveDate>
<IsActive>false</IsActive>
<IsDaily>false</IsDaily>
<LongDescription>String</LongDescription>
<MarketCode>String</MarketCode>
<MealsIncluded>false</MealsIncluded>
<MinLOS>0</MinLOS>
<RateAdjustAmount>0</RateAdjustAmount>
<RateAdjustDirection>String</RateAdjustDirection>
<RateAdjustPercent>0</RateAdjustPercent>
<RateCategory>String</RateCategory>
<RateCategoryDescription>String</RateCategoryDescription>
<RateCode>String</RateCode>
<RateName>String</RateName>
<RateStatus>String</RateStatus>
<ShortDescription>String</ShortDescription>
<SourceID>String</SourceID>
<SourceName>String</SourceName>
<StartDate>0001-01-01T00:00:00</StartDate>
<TaxIncludedIndicator>String</TaxIncludedIndicator>
</RateType>
<Rates>
<Rate>
<CurrencyCode>String</CurrencyCode>
<CustomerSegment>String</CustomerSegment>
<EndDate>0001-01-01T00:00:00</EndDate>
<ExtraAdult>0</ExtraAdult>
<ExtraBed>0</ExtraBed>
<ExtraChild>0</ExtraChild>
<FreeChildLimit>0</FreeChildLimit>
<HotelCode>String</HotelCode>
<InactiveDate>0001-01-01T00:00:00</InactiveDate>
<IncludeFriday>false</IncludeFriday>
<IncludeMonday>false</IncludeMonday>
<IncludeSaturday>false</IncludeSaturday>
<IncludeSunday>false</IncludeSunday>
<IncludeThursday>false</IncludeThursday>
<IncludeTuesday>false</IncludeTuesday>
<IncludeWednesday>false</IncludeWednesday>
<IsActive>false</IsActive>
<Rate1>0</Rate1>
<Rate2>0</Rate2>
<Rate3>0</Rate3>
<Rate4>0</Rate4>
<RateChargeDetails>
<RateChargeDetail>
<ChargeCode>String</ChargeCode>
<IsBaseRate>false</IsBaseRate>
<RateAfterTax>0</RateAfterTax>
<RateBeforeTax>0</RateBeforeTax>
<TaxAmount>0</TaxAmount>
<UnitCount>0</UnitCount>
</RateChargeDetail>
</RateChargeDetails>
<RateCode>String</RateCode>
<RateGuestCountDetails>
<RateGuestCountDetail>
<GuestCount>0</GuestCount>
<MaxRate>0</MaxRate>
<MinRate>0</MinRate>
</RateGuestCountDetail>
</RateGuestCountDetails>
<RateSetID>String</RateSetID>
<RoomCode>String</RoomCode>
<SourceID>String</SourceID>
<SourceName>String</SourceName>
<StartDate>0001-01-01T00:00:00</StartDate>
</Rate>
</Rates>
</RateContainer>
<SubscriptionId>String</SubscriptionId>
</HotelRate>
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>