| POST | /reservation/notice/{SubscriptionId} |
|---|
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 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 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 ReservationStatusNotice implements IConvertible
{
String? cendynPropertyId;
String? externalResId1;
String? externalResId2;
String? resStatus;
String? cancellationID;
DateTime? cancellationDate;
DateTime? dateResUpdated;
String? resUpdatedBy;
String? roomNumber;
DateTime? roomNumberStartDate;
DateTime? roomNumberEndDate;
List<StayHistoryRevenue>? stayHistoryRevenueCollection;
DateTime? resArriveDate;
DateTime? resDepartDate;
String? currency;
String? roomType;
String? externalProfileID;
List<UniqueIDType>? uniqueIDs;
ReservationStatusNotice({this.cendynPropertyId,this.externalResId1,this.externalResId2,this.resStatus,this.cancellationID,this.cancellationDate,this.dateResUpdated,this.resUpdatedBy,this.roomNumber,this.roomNumberStartDate,this.roomNumberEndDate,this.stayHistoryRevenueCollection,this.resArriveDate,this.resDepartDate,this.currency,this.roomType,this.externalProfileID,this.uniqueIDs});
ReservationStatusNotice.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
cendynPropertyId = json['cendynPropertyId'];
externalResId1 = json['externalResId1'];
externalResId2 = json['externalResId2'];
resStatus = json['resStatus'];
cancellationID = json['cancellationID'];
cancellationDate = JsonConverters.fromJson(json['cancellationDate'],'DateTime',context!);
dateResUpdated = JsonConverters.fromJson(json['dateResUpdated'],'DateTime',context!);
resUpdatedBy = json['resUpdatedBy'];
roomNumber = json['roomNumber'];
roomNumberStartDate = JsonConverters.fromJson(json['roomNumberStartDate'],'DateTime',context!);
roomNumberEndDate = JsonConverters.fromJson(json['roomNumberEndDate'],'DateTime',context!);
stayHistoryRevenueCollection = JsonConverters.fromJson(json['stayHistoryRevenueCollection'],'List<StayHistoryRevenue>',context!);
resArriveDate = JsonConverters.fromJson(json['resArriveDate'],'DateTime',context!);
resDepartDate = JsonConverters.fromJson(json['resDepartDate'],'DateTime',context!);
currency = json['currency'];
roomType = json['roomType'];
externalProfileID = json['externalProfileID'];
uniqueIDs = JsonConverters.fromJson(json['uniqueIDs'],'List<UniqueIDType>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'cendynPropertyId': cendynPropertyId,
'externalResId1': externalResId1,
'externalResId2': externalResId2,
'resStatus': resStatus,
'cancellationID': cancellationID,
'cancellationDate': JsonConverters.toJson(cancellationDate,'DateTime',context!),
'dateResUpdated': JsonConverters.toJson(dateResUpdated,'DateTime',context!),
'resUpdatedBy': resUpdatedBy,
'roomNumber': roomNumber,
'roomNumberStartDate': JsonConverters.toJson(roomNumberStartDate,'DateTime',context!),
'roomNumberEndDate': JsonConverters.toJson(roomNumberEndDate,'DateTime',context!),
'stayHistoryRevenueCollection': JsonConverters.toJson(stayHistoryRevenueCollection,'List<StayHistoryRevenue>',context!),
'resArriveDate': JsonConverters.toJson(resArriveDate,'DateTime',context!),
'resDepartDate': JsonConverters.toJson(resDepartDate,'DateTime',context!),
'currency': currency,
'roomType': roomType,
'externalProfileID': externalProfileID,
'uniqueIDs': JsonConverters.toJson(uniqueIDs,'List<UniqueIDType>',context!)
};
getTypeName() => "ReservationStatusNotice";
TypeContext? context = _ctx;
}
class ReservationStatusNoticePost implements IConvertible
{
ReservationStatusNotice? noticeMessage;
String? subscriptionId;
ReservationStatusNoticePost({this.noticeMessage,this.subscriptionId});
ReservationStatusNoticePost.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
noticeMessage = JsonConverters.fromJson(json['noticeMessage'],'ReservationStatusNotice',context!);
subscriptionId = json['subscriptionId'];
return this;
}
Map<String, dynamic> toJson() => {
'noticeMessage': JsonConverters.toJson(noticeMessage,'ReservationStatusNotice',context!),
'subscriptionId': subscriptionId
};
getTypeName() => "ReservationStatusNoticePost";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'cert.cendyn.com', types: <String, TypeInfo> {
'Response': TypeInfo(TypeOf.Class, create:() => Response()),
'StayHistoryRevenue': TypeInfo(TypeOf.Class, create:() => StayHistoryRevenue()),
'UniqueIDType': TypeInfo(TypeOf.Class, create:() => UniqueIDType()),
'ReservationStatusNotice': TypeInfo(TypeOf.Class, create:() => ReservationStatusNotice()),
'List<StayHistoryRevenue>': TypeInfo(TypeOf.Class, create:() => <StayHistoryRevenue>[]),
'List<UniqueIDType>': TypeInfo(TypeOf.Class, create:() => <UniqueIDType>[]),
'ReservationStatusNoticePost': TypeInfo(TypeOf.Class, create:() => ReservationStatusNoticePost()),
});
Dart ReservationStatusNoticePost DTOs
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 /reservation/notice/{SubscriptionId} HTTP/1.1
Host: cert.cendyn.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ReservationStatusNoticePost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenResSS.ServiceModel">
<NoticeMessage>
<CancellationDate>0001-01-01T00:00:00</CancellationDate>
<CancellationID>String</CancellationID>
<CendynPropertyId>String</CendynPropertyId>
<Currency>String</Currency>
<DateResUpdated>0001-01-01T00:00:00</DateResUpdated>
<ExternalProfileID>String</ExternalProfileID>
<ExternalResId1>String</ExternalResId1>
<ExternalResId2>String</ExternalResId2>
<ResArriveDate>0001-01-01T00:00:00</ResArriveDate>
<ResDepartDate>0001-01-01T00:00:00</ResDepartDate>
<ResStatus>String</ResStatus>
<ResUpdatedBy>String</ResUpdatedBy>
<RoomNumber>String</RoomNumber>
<RoomNumberEndDate>0001-01-01T00:00:00</RoomNumberEndDate>
<RoomNumberStartDate>0001-01-01T00:00:00</RoomNumberStartDate>
<RoomType>String</RoomType>
<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>
<UniqueIDs>
<UniqueIDType>
<Context>String</Context>
<ID>String</ID>
<Type>String</Type>
</UniqueIDType>
</UniqueIDs>
</NoticeMessage>
<SubscriptionId>String</SubscriptionId>
</ReservationStatusNoticePost>
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>