| POST | /stayhistory/{SubscriptionId}/{CendynPropertyId} |
|---|
import 'package:servicestack/servicestack.dart';
class Response implements IConvertible
{
String? statusCode;
int? recordCount;
int? errorCount;
Response({this.statusCode,this.recordCount,this.errorCount});
Response.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
statusCode = json['statusCode'];
recordCount = json['recordCount'];
errorCount = json['errorCount'];
return this;
}
Map<String, dynamic> toJson() => {
'statusCode': statusCode,
'recordCount': recordCount,
'errorCount': errorCount
};
getTypeName() => "Response";
TypeContext? context = _ctx;
}
class UniqueIDType implements IConvertible
{
String? id;
String? type;
String? Context;
UniqueIDType({this.id,this.type,this.Context});
UniqueIDType.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
type = json['type'];
Context = json['context'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'type': type,
'context': Context
};
getTypeName() => "UniqueIDType";
TypeContext? context = _ctx;
}
class StayHistoryRevenue implements IConvertible
{
String? recordStatus;
// @DataMember(IsRequired=true)
String? revenueGroup;
// @DataMember(IsRequired=true)
String? revenueType;
// @DataMember(IsRequired=true)
double? amount;
String? currencyCode;
String? folioWindow;
DateTime? transactionDate;
DateTime? inactiveDate;
StayHistoryRevenue({this.recordStatus,this.revenueGroup,this.revenueType,this.amount,this.currencyCode,this.folioWindow,this.transactionDate,this.inactiveDate});
StayHistoryRevenue.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
recordStatus = json['recordStatus'];
revenueGroup = json['revenueGroup'];
revenueType = json['revenueType'];
amount = JsonConverters.toDouble(json['amount']);
currencyCode = json['currencyCode'];
folioWindow = json['folioWindow'];
transactionDate = JsonConverters.fromJson(json['transactionDate'],'DateTime',context!);
inactiveDate = JsonConverters.fromJson(json['inactiveDate'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'recordStatus': recordStatus,
'revenueGroup': revenueGroup,
'revenueType': revenueType,
'amount': amount,
'currencyCode': currencyCode,
'folioWindow': folioWindow,
'transactionDate': JsonConverters.toJson(transactionDate,'DateTime',context!),
'inactiveDate': JsonConverters.toJson(inactiveDate,'DateTime',context!)
};
getTypeName() => "StayHistoryRevenue";
TypeContext? context = _ctx;
}
class StayHistoryDailyRate implements IConvertible
{
String? recordStatus;
DateTime? transactionDate;
String? rateCode;
String? marketCode;
double? amount;
String? currencyCode;
String? roomNumber;
String? resourceID;
String? pseudoRoom;
String? roomCategory;
String? rateRoomType;
DateTime? inactiveDate;
StayHistoryDailyRate({this.recordStatus,this.transactionDate,this.rateCode,this.marketCode,this.amount,this.currencyCode,this.roomNumber,this.resourceID,this.pseudoRoom,this.roomCategory,this.rateRoomType,this.inactiveDate});
StayHistoryDailyRate.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
recordStatus = json['recordStatus'];
transactionDate = JsonConverters.fromJson(json['transactionDate'],'DateTime',context!);
rateCode = json['rateCode'];
marketCode = json['marketCode'];
amount = JsonConverters.toDouble(json['amount']);
currencyCode = json['currencyCode'];
roomNumber = json['roomNumber'];
resourceID = json['resourceID'];
pseudoRoom = json['pseudoRoom'];
roomCategory = json['roomCategory'];
rateRoomType = json['rateRoomType'];
inactiveDate = JsonConverters.fromJson(json['inactiveDate'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'recordStatus': recordStatus,
'transactionDate': JsonConverters.toJson(transactionDate,'DateTime',context!),
'rateCode': rateCode,
'marketCode': marketCode,
'amount': amount,
'currencyCode': currencyCode,
'roomNumber': roomNumber,
'resourceID': resourceID,
'pseudoRoom': pseudoRoom,
'roomCategory': roomCategory,
'rateRoomType': rateRoomType,
'inactiveDate': JsonConverters.toJson(inactiveDate,'DateTime',context!)
};
getTypeName() => "StayHistoryDailyRate";
TypeContext? context = _ctx;
}
class StayHistory implements IConvertible
{
String? cendynPropertyID;
String? resortID;
String? externalProfileID1;
String? externalResId1;
String? crsBookNo;
String? resortBookNo;
int? resortLegNo;
String? confirmationID;
String? reservationStatus;
bool? hasDailyRooms;
String? rateRoomType;
DateTime? actualArrivalDate;
DateTime? actualDepartureDate;
DateTime? bookDate;
DateTime? bookedArrivalDate;
DateTime? bookedDepartureDate;
String? compYN;
int? adults;
int? children;
String? roomCategory;
String? roomNumber;
double? rateAmount;
String? rateCode;
String? rateAmountCurrencyCode;
String? currencyCode;
String? sourceCode;
String? marketCode;
String? travelAgentID;
String? companyID;
String? channel;
String? paymentMethod;
String? rateCurrencyCode;
double? totalRevenue;
double? roomRevenue;
double? fbRevenue;
String? membershipType;
String? membershipID;
String? transactionID;
String? transactionStatus;
List<UniqueIDType>? uniqueIDs;
List<StayHistoryRevenue>? stayHistoryRevenueCollection;
List<StayHistoryDailyRate>? stayHistoryDailyRateCollection;
StayHistory({this.cendynPropertyID,this.resortID,this.externalProfileID1,this.externalResId1,this.crsBookNo,this.resortBookNo,this.resortLegNo,this.confirmationID,this.reservationStatus,this.hasDailyRooms,this.rateRoomType,this.actualArrivalDate,this.actualDepartureDate,this.bookDate,this.bookedArrivalDate,this.bookedDepartureDate,this.compYN,this.adults,this.children,this.roomCategory,this.roomNumber,this.rateAmount,this.rateCode,this.rateAmountCurrencyCode,this.currencyCode,this.sourceCode,this.marketCode,this.travelAgentID,this.companyID,this.channel,this.paymentMethod,this.rateCurrencyCode,this.totalRevenue,this.roomRevenue,this.fbRevenue,this.membershipType,this.membershipID,this.transactionID,this.transactionStatus,this.uniqueIDs,this.stayHistoryRevenueCollection,this.stayHistoryDailyRateCollection});
StayHistory.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
cendynPropertyID = json['cendynPropertyID'];
resortID = json['resortID'];
externalProfileID1 = json['externalProfileID1'];
externalResId1 = json['externalResId1'];
crsBookNo = json['crsBookNo'];
resortBookNo = json['resortBookNo'];
resortLegNo = json['resortLegNo'];
confirmationID = json['confirmationID'];
reservationStatus = json['reservationStatus'];
hasDailyRooms = json['hasDailyRooms'];
rateRoomType = json['rateRoomType'];
actualArrivalDate = JsonConverters.fromJson(json['actualArrivalDate'],'DateTime',context!);
actualDepartureDate = JsonConverters.fromJson(json['actualDepartureDate'],'DateTime',context!);
bookDate = JsonConverters.fromJson(json['bookDate'],'DateTime',context!);
bookedArrivalDate = JsonConverters.fromJson(json['bookedArrivalDate'],'DateTime',context!);
bookedDepartureDate = JsonConverters.fromJson(json['bookedDepartureDate'],'DateTime',context!);
compYN = json['compYN'];
adults = json['adults'];
children = json['children'];
roomCategory = json['roomCategory'];
roomNumber = json['roomNumber'];
rateAmount = JsonConverters.toDouble(json['rateAmount']);
rateCode = json['rateCode'];
rateAmountCurrencyCode = json['rateAmountCurrencyCode'];
currencyCode = json['currencyCode'];
sourceCode = json['sourceCode'];
marketCode = json['marketCode'];
travelAgentID = json['travelAgentID'];
companyID = json['companyID'];
channel = json['channel'];
paymentMethod = json['paymentMethod'];
rateCurrencyCode = json['rateCurrencyCode'];
totalRevenue = JsonConverters.toDouble(json['totalRevenue']);
roomRevenue = JsonConverters.toDouble(json['roomRevenue']);
fbRevenue = JsonConverters.toDouble(json['fbRevenue']);
membershipType = json['membershipType'];
membershipID = json['membershipID'];
transactionID = json['transactionID'];
transactionStatus = json['transactionStatus'];
uniqueIDs = JsonConverters.fromJson(json['uniqueIDs'],'List<UniqueIDType>',context!);
stayHistoryRevenueCollection = JsonConverters.fromJson(json['stayHistoryRevenueCollection'],'List<StayHistoryRevenue>',context!);
stayHistoryDailyRateCollection = JsonConverters.fromJson(json['stayHistoryDailyRateCollection'],'List<StayHistoryDailyRate>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'cendynPropertyID': cendynPropertyID,
'resortID': resortID,
'externalProfileID1': externalProfileID1,
'externalResId1': externalResId1,
'crsBookNo': crsBookNo,
'resortBookNo': resortBookNo,
'resortLegNo': resortLegNo,
'confirmationID': confirmationID,
'reservationStatus': reservationStatus,
'hasDailyRooms': hasDailyRooms,
'rateRoomType': rateRoomType,
'actualArrivalDate': JsonConverters.toJson(actualArrivalDate,'DateTime',context!),
'actualDepartureDate': JsonConverters.toJson(actualDepartureDate,'DateTime',context!),
'bookDate': JsonConverters.toJson(bookDate,'DateTime',context!),
'bookedArrivalDate': JsonConverters.toJson(bookedArrivalDate,'DateTime',context!),
'bookedDepartureDate': JsonConverters.toJson(bookedDepartureDate,'DateTime',context!),
'compYN': compYN,
'adults': adults,
'children': children,
'roomCategory': roomCategory,
'roomNumber': roomNumber,
'rateAmount': rateAmount,
'rateCode': rateCode,
'rateAmountCurrencyCode': rateAmountCurrencyCode,
'currencyCode': currencyCode,
'sourceCode': sourceCode,
'marketCode': marketCode,
'travelAgentID': travelAgentID,
'companyID': companyID,
'channel': channel,
'paymentMethod': paymentMethod,
'rateCurrencyCode': rateCurrencyCode,
'totalRevenue': totalRevenue,
'roomRevenue': roomRevenue,
'fbRevenue': fbRevenue,
'membershipType': membershipType,
'membershipID': membershipID,
'transactionID': transactionID,
'transactionStatus': transactionStatus,
'uniqueIDs': JsonConverters.toJson(uniqueIDs,'List<UniqueIDType>',context!),
'stayHistoryRevenueCollection': JsonConverters.toJson(stayHistoryRevenueCollection,'List<StayHistoryRevenue>',context!),
'stayHistoryDailyRateCollection': JsonConverters.toJson(stayHistoryDailyRateCollection,'List<StayHistoryDailyRate>',context!)
};
getTypeName() => "StayHistory";
TypeContext? context = _ctx;
}
class StayHistoryContainer implements IConvertible
{
String? echoToken;
List<StayHistory>? stayHistoryList;
StayHistoryContainer({this.echoToken,this.stayHistoryList});
StayHistoryContainer.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
echoToken = json['echoToken'];
stayHistoryList = JsonConverters.fromJson(json['stayHistoryList'],'List<StayHistory>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'echoToken': echoToken,
'stayHistoryList': JsonConverters.toJson(stayHistoryList,'List<StayHistory>',context!)
};
getTypeName() => "StayHistoryContainer";
TypeContext? context = _ctx;
}
class StayHistoryPost implements IConvertible
{
StayHistoryContainer? stayHistoryContainer;
String? subscriptionId;
String? cendynPropertyId;
StayHistoryPost({this.stayHistoryContainer,this.subscriptionId,this.cendynPropertyId});
StayHistoryPost.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
stayHistoryContainer = JsonConverters.fromJson(json['stayHistoryContainer'],'StayHistoryContainer',context!);
subscriptionId = json['subscriptionId'];
cendynPropertyId = json['cendynPropertyId'];
return this;
}
Map<String, dynamic> toJson() => {
'stayHistoryContainer': JsonConverters.toJson(stayHistoryContainer,'StayHistoryContainer',context!),
'subscriptionId': subscriptionId,
'cendynPropertyId': cendynPropertyId
};
getTypeName() => "StayHistoryPost";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'cert.cendyn.com', types: <String, TypeInfo> {
'Response': TypeInfo(TypeOf.Class, create:() => Response()),
'UniqueIDType': TypeInfo(TypeOf.Class, create:() => UniqueIDType()),
'StayHistoryRevenue': TypeInfo(TypeOf.Class, create:() => StayHistoryRevenue()),
'StayHistoryDailyRate': TypeInfo(TypeOf.Class, create:() => StayHistoryDailyRate()),
'StayHistory': TypeInfo(TypeOf.Class, create:() => StayHistory()),
'List<UniqueIDType>': TypeInfo(TypeOf.Class, create:() => <UniqueIDType>[]),
'List<StayHistoryRevenue>': TypeInfo(TypeOf.Class, create:() => <StayHistoryRevenue>[]),
'List<StayHistoryDailyRate>': TypeInfo(TypeOf.Class, create:() => <StayHistoryDailyRate>[]),
'StayHistoryContainer': TypeInfo(TypeOf.Class, create:() => StayHistoryContainer()),
'List<StayHistory>': TypeInfo(TypeOf.Class, create:() => <StayHistory>[]),
'StayHistoryPost': TypeInfo(TypeOf.Class, create:() => StayHistoryPost()),
});
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 /stayhistory/{SubscriptionId}/{CendynPropertyId} HTTP/1.1
Host: cert.cendyn.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"stayHistoryContainer":{"echoToken":"String","stayHistoryList":[{"cendynPropertyID":"String","resortID":"String","externalProfileID1":"String","externalResId1":"String","crsBookNo":"String","resortBookNo":"String","resortLegNo":0,"confirmationID":"String","reservationStatus":"String","hasDailyRooms":false,"rateRoomType":"String","actualArrivalDate":"0001-01-01T00:00:00.0000000","actualDepartureDate":"0001-01-01T00:00:00.0000000","bookDate":"0001-01-01T00:00:00.0000000","bookedArrivalDate":"0001-01-01T00:00:00.0000000","bookedDepartureDate":"0001-01-01T00:00:00.0000000","compYN":"String","adults":0,"children":0,"roomCategory":"String","roomNumber":"String","rateAmount":0,"rateCode":"String","rateAmountCurrencyCode":"String","currencyCode":"String","sourceCode":"String","marketCode":"String","travelAgentID":"String","companyID":"String","channel":"String","paymentMethod":"String","rateCurrencyCode":"String","totalRevenue":0,"roomRevenue":0,"fbRevenue":0,"membershipType":"String","membershipID":"String","transactionID":"String","transactionStatus":"String","uniqueIDs":[{"id":"String","type":"String","context":"String"}],"stayHistoryRevenueCollection":[{"recordStatus":"String","revenueGroup":"String","revenueType":"String","amount":0,"currencyCode":"String","folioWindow":"String","transactionDate":"0001-01-01T00:00:00.0000000","inactiveDate":"0001-01-01T00:00:00.0000000"}],"stayHistoryDailyRateCollection":[{"recordStatus":"String","transactionDate":"0001-01-01T00:00:00.0000000","rateCode":"String","marketCode":"String","amount":0,"currencyCode":"String","roomNumber":"String","resourceID":"String","pseudoRoom":"String","roomCategory":"String","rateRoomType":"String","inactiveDate":"0001-01-01T00:00:00.0000000"}]}]},"subscriptionId":"String","cendynPropertyId":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"statusCode":"String","recordCount":0,"errorCount":0}