| POST | /HotelPackage/{SubscriptionId}/{CendynPropertyId} |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using CenResSS.ServiceModel;
using Cendyn.CenRes.DataLib.Models;
namespace Cendyn.CenRes.DataLib.Models
{
public partial class Package
{
public Package()
{
PackageDetails = new List<PackageDetail>{};
PackageItems = new List<PackageItem>{};
}
public virtual string ExternalID { get; set; }
public virtual string CendynPropertyID { get; set; }
public virtual string HotelCode { get; set; }
public virtual string PackageCode { get; set; }
public virtual string PackageDescription { get; set; }
public virtual string ShortDescription { get; set; }
public virtual string ForecastGroup { get; set; }
public virtual bool? PrintSeparately { get; set; }
public virtual bool? AddToRate { get; set; }
public virtual decimal? PriceAmount { get; set; }
public virtual bool? TaxIncluded { get; set; }
public virtual string CurrencyCode { get; set; }
public virtual bool? SellSeparate { get; set; }
public virtual bool? PostNextDay { get; set; }
public virtual bool? ForecastNextDay { get; set; }
public virtual bool? CateringPackage { get; set; }
public virtual bool? Redemption { get; set; }
public virtual bool? OverrideFixedRate { get; set; }
public virtual string CalculationRule { get; set; }
public virtual string PostingRhythm { get; set; }
public virtual string PackageElement { get; set; }
public virtual string AddToRateMode { get; set; }
public virtual bool IsActive { get; set; }
public virtual DateTime? InactiveDate { get; set; }
public virtual string SourceName { get; set; }
public virtual string SourceID { get; set; }
public virtual string Action { get; set; }
public virtual List<PackageDetail> PackageDetails { get; set; }
public virtual List<PackageItem> PackageItems { get; set; }
}
public partial class PackageDetail
{
public virtual DateTime? StartDate { get; set; }
public virtual DateTime? EndDate { get; set; }
public virtual decimal? PriceAmount { get; set; }
public virtual decimal? POSAllowance { get; set; }
public virtual int? PointsTotal { get; set; }
public virtual string Action { get; set; }
public virtual decimal? AmountBeforeTax { get; set; }
public virtual decimal? AmountAfterTax { get; set; }
public virtual string ItemName { get; set; }
public virtual int? Quantity { get; set; }
public virtual string Code { get; set; }
public virtual string ItemId { get; set; }
public virtual bool? ShowInReservation { get; set; }
public virtual bool? UseInCRS { get; set; }
public virtual bool? AddToRate { get; set; }
public virtual bool? IsFixedCharge { get; set; }
public virtual string Recurrence { get; set; }
public virtual string Relation { get; set; }
public virtual bool? Monday { get; set; }
public virtual bool? Tuesday { get; set; }
public virtual bool? Wednesday { get; set; }
public virtual bool? Thursday { get; set; }
public virtual bool? Friday { get; set; }
public virtual bool? Saturday { get; set; }
public virtual bool? Sunday { get; set; }
}
public partial class PackageItem
{
public virtual string ItemName { get; set; }
public virtual int? Quantity { get; set; }
}
public partial class Response
{
public virtual string StatusCode { get; set; }
public virtual int RecordCount { get; set; }
public virtual int ErrorCount { get; set; }
}
}
namespace CenResSS.ServiceModel
{
public partial class HotelPackage
{
public virtual Package Package { get; set; }
public virtual string SubscriptionId { get; set; }
public virtual string CendynPropertyId { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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/json
Content-Type: application/json
Content-Length: length
{"package":{"externalID":"String","cendynPropertyID":"String","hotelCode":"String","packageCode":"String","packageDescription":"String","shortDescription":"String","forecastGroup":"String","printSeparately":false,"addToRate":false,"priceAmount":0,"taxIncluded":false,"currencyCode":"String","sellSeparate":false,"postNextDay":false,"forecastNextDay":false,"cateringPackage":false,"redemption":false,"overrideFixedRate":false,"calculationRule":"String","postingRhythm":"String","packageElement":"String","addToRateMode":"String","isActive":false,"inactiveDate":"0001-01-01T00:00:00.0000000","sourceName":"String","sourceID":"String","action":"String","packageDetails":[{"startDate":"0001-01-01T00:00:00.0000000","endDate":"0001-01-01T00:00:00.0000000","priceAmount":0,"posAllowance":0,"pointsTotal":0,"action":"String","amountBeforeTax":0,"amountAfterTax":0,"itemName":"String","quantity":0,"code":"String","itemId":"String","showInReservation":false,"useInCRS":false,"addToRate":false,"isFixedCharge":false,"recurrence":"String","relation":"String","monday":false,"tuesday":false,"wednesday":false,"thursday":false,"friday":false,"saturday":false,"sunday":false}],"packageItems":[{"itemName":"String","quantity":0}]},"subscriptionId":"String","cendynPropertyId":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"statusCode":"String","recordCount":0,"errorCount":0}