CenResService

<back to all web services

HotelPackage

The following routes are available for this service:
POST/HotelPackage/{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 Package
            Public Sub New()
                PackageDetails = New List(Of PackageDetail)
                PackageItems = New List(Of PackageItem)
            End Sub

            Public Overridable Property ExternalID As String
            Public Overridable Property CendynPropertyID As String
            Public Overridable Property HotelCode As String
            Public Overridable Property PackageCode As String
            Public Overridable Property PackageDescription As String
            Public Overridable Property ShortDescription As String
            Public Overridable Property ForecastGroup As String
            Public Overridable Property PrintSeparately As Nullable(Of Boolean)
            Public Overridable Property AddToRate As Nullable(Of Boolean)
            Public Overridable Property PriceAmount As Nullable(Of Decimal)
            Public Overridable Property TaxIncluded As Nullable(Of Boolean)
            Public Overridable Property CurrencyCode As String
            Public Overridable Property SellSeparate As Nullable(Of Boolean)
            Public Overridable Property PostNextDay As Nullable(Of Boolean)
            Public Overridable Property ForecastNextDay As Nullable(Of Boolean)
            Public Overridable Property CateringPackage As Nullable(Of Boolean)
            Public Overridable Property Redemption As Nullable(Of Boolean)
            Public Overridable Property OverrideFixedRate As Nullable(Of Boolean)
            Public Overridable Property CalculationRule As String
            Public Overridable Property PostingRhythm As String
            Public Overridable Property PackageElement As String
            Public Overridable Property AddToRateMode As String
            Public Overridable Property IsActive As Boolean
            Public Overridable Property InactiveDate As Nullable(Of Date)
            Public Overridable Property SourceName As String
            Public Overridable Property SourceID As String
            Public Overridable Property Action As String
            Public Overridable Property PackageDetails As List(Of PackageDetail)
            Public Overridable Property PackageItems As List(Of PackageItem)
        End Class

        Public Partial Class PackageDetail
            Public Overridable Property StartDate As Nullable(Of Date)
            Public Overridable Property EndDate As Nullable(Of Date)
            Public Overridable Property PriceAmount As Nullable(Of Decimal)
            Public Overridable Property POSAllowance As Nullable(Of Decimal)
            Public Overridable Property PointsTotal As Nullable(Of Integer)
            Public Overridable Property Action As String
            Public Overridable Property AmountBeforeTax As Nullable(Of Decimal)
            Public Overridable Property AmountAfterTax As Nullable(Of Decimal)
            Public Overridable Property ItemName As String
            Public Overridable Property Quantity As Nullable(Of Integer)
            Public Overridable Property Code As String
            Public Overridable Property ItemId As String
            Public Overridable Property ShowInReservation As Nullable(Of Boolean)
            Public Overridable Property UseInCRS As Nullable(Of Boolean)
            Public Overridable Property AddToRate As Nullable(Of Boolean)
            Public Overridable Property IsFixedCharge As Nullable(Of Boolean)
            Public Overridable Property Recurrence As String
            Public Overridable Property Relation As String
            Public Overridable Property Monday As Nullable(Of Boolean)
            Public Overridable Property Tuesday As Nullable(Of Boolean)
            Public Overridable Property Wednesday As Nullable(Of Boolean)
            Public Overridable Property Thursday As Nullable(Of Boolean)
            Public Overridable Property Friday As Nullable(Of Boolean)
            Public Overridable Property Saturday As Nullable(Of Boolean)
            Public Overridable Property Sunday As Nullable(Of Boolean)
        End Class

        Public Partial Class PackageItem
            Public Overridable Property ItemName As String
            Public Overridable Property Quantity As Nullable(Of Integer)
        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 HotelPackage
            Public Overridable Property Package As Package
            Public Overridable Property SubscriptionId As String
            Public Overridable Property CendynPropertyId As String
        End Class
    End Namespace
End Namespace

VB.NET HotelPackage DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /HotelPackage/{SubscriptionId}/{CendynPropertyId} HTTP/1.1 
Host: cert.cendyn.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<HotelPackage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenResSS.ServiceModel">
  <CendynPropertyId>String</CendynPropertyId>
  <Package>
    <Action>String</Action>
    <AddToRate>false</AddToRate>
    <AddToRateMode>String</AddToRateMode>
    <CalculationRule>String</CalculationRule>
    <CateringPackage>false</CateringPackage>
    <CendynPropertyID>String</CendynPropertyID>
    <CurrencyCode>String</CurrencyCode>
    <ExternalID>String</ExternalID>
    <ForecastGroup>String</ForecastGroup>
    <ForecastNextDay>false</ForecastNextDay>
    <HotelCode>String</HotelCode>
    <InactiveDate>0001-01-01T00:00:00</InactiveDate>
    <IsActive>false</IsActive>
    <OverrideFixedRate>false</OverrideFixedRate>
    <PackageCode>String</PackageCode>
    <PackageDescription>String</PackageDescription>
    <PackageDetails>
      <PackageDetail>
        <Action>String</Action>
        <AddToRate>false</AddToRate>
        <AmountAfterTax>0</AmountAfterTax>
        <AmountBeforeTax>0</AmountBeforeTax>
        <Code>String</Code>
        <EndDate>0001-01-01T00:00:00</EndDate>
        <Friday>false</Friday>
        <IsFixedCharge>false</IsFixedCharge>
        <ItemId>String</ItemId>
        <ItemName>String</ItemName>
        <Monday>false</Monday>
        <POSAllowance>0</POSAllowance>
        <PointsTotal>0</PointsTotal>
        <PriceAmount>0</PriceAmount>
        <Quantity>0</Quantity>
        <Recurrence>String</Recurrence>
        <Relation>String</Relation>
        <Saturday>false</Saturday>
        <ShowInReservation>false</ShowInReservation>
        <StartDate>0001-01-01T00:00:00</StartDate>
        <Sunday>false</Sunday>
        <Thursday>false</Thursday>
        <Tuesday>false</Tuesday>
        <UseInCRS>false</UseInCRS>
        <Wednesday>false</Wednesday>
      </PackageDetail>
    </PackageDetails>
    <PackageElement>String</PackageElement>
    <PackageItems>
      <PackageItem>
        <ItemName>String</ItemName>
        <Quantity>0</Quantity>
      </PackageItem>
    </PackageItems>
    <PostNextDay>false</PostNextDay>
    <PostingRhythm>String</PostingRhythm>
    <PriceAmount>0</PriceAmount>
    <PrintSeparately>false</PrintSeparately>
    <Redemption>false</Redemption>
    <SellSeparate>false</SellSeparate>
    <ShortDescription>String</ShortDescription>
    <SourceID>String</SourceID>
    <SourceName>String</SourceName>
    <TaxIncluded>false</TaxIncluded>
  </Package>
  <SubscriptionId>String</SubscriptionId>
</HotelPackage>
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>