| GET | /v2/reservation/notice/{Query} | ||
|---|---|---|---|
| GET | /v2/reservation/notice/{Query}/{CendynPropertyId} |
import 'package:servicestack/servicestack.dart';
enum RequestStatus
{
Success,
Warning,
Error,
NotAuthorized,
Failure,
}
class CenResResponse implements IConvertible
{
RequestStatus? status;
String? statusMessage;
int? recordsReturned;
int? recordsAvailable;
int? pageNumber;
int? pageSize;
CenResResponse({this.status,this.statusMessage,this.recordsReturned,this.recordsAvailable,this.pageNumber,this.pageSize});
CenResResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
status = JsonConverters.fromJson(json['status'],'RequestStatus',context!);
statusMessage = json['statusMessage'];
recordsReturned = json['recordsReturned'];
recordsAvailable = json['recordsAvailable'];
pageNumber = json['pageNumber'];
pageSize = json['pageSize'];
return this;
}
Map<String, dynamic> toJson() => {
'status': JsonConverters.toJson(status,'RequestStatus',context!),
'statusMessage': statusMessage,
'recordsReturned': recordsReturned,
'recordsAvailable': recordsAvailable,
'pageNumber': pageNumber,
'pageSize': pageSize
};
getTypeName() => "CenResResponse";
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 ReservationStatusNoticeResponse extends CenResResponse implements IConvertible
{
List<ReservationStatusNotice>? records;
ReservationStatusNoticeResponse({this.records});
ReservationStatusNoticeResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
records = JsonConverters.fromJson(json['records'],'List<ReservationStatusNotice>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'records': JsonConverters.toJson(records,'List<ReservationStatusNotice>',context!)
});
getTypeName() => "ReservationStatusNoticeResponse";
TypeContext? context = _ctx;
}
enum ReservationStatusNoticeQueryType
{
ResId,
ProfileId,
RoomId,
}
class ReservationStatusNoticeRequest implements IConvertible
{
String? cendynPropertyId;
ReservationStatusNoticeQueryType? query;
String? id;
DateTime? stayDate;
ReservationStatusNoticeRequest({this.cendynPropertyId,this.query,this.id,this.stayDate});
ReservationStatusNoticeRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
cendynPropertyId = json['cendynPropertyId'];
query = JsonConverters.fromJson(json['query'],'ReservationStatusNoticeQueryType',context!);
id = json['id'];
stayDate = JsonConverters.fromJson(json['stayDate'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'cendynPropertyId': cendynPropertyId,
'query': JsonConverters.toJson(query,'ReservationStatusNoticeQueryType',context!),
'id': id,
'stayDate': JsonConverters.toJson(stayDate,'DateTime',context!)
};
getTypeName() => "ReservationStatusNoticeRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'cert.cendyn.com', types: <String, TypeInfo> {
'RequestStatus': TypeInfo(TypeOf.Enum, enumValues:RequestStatus.values),
'CenResResponse': TypeInfo(TypeOf.Class, create:() => CenResResponse()),
'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>[]),
'ReservationStatusNoticeResponse': TypeInfo(TypeOf.Class, create:() => ReservationStatusNoticeResponse()),
'List<ReservationStatusNotice>': TypeInfo(TypeOf.Class, create:() => <ReservationStatusNotice>[]),
'ReservationStatusNoticeQueryType': TypeInfo(TypeOf.Enum, enumValues:ReservationStatusNoticeQueryType.values),
'ReservationStatusNoticeRequest': TypeInfo(TypeOf.Class, create:() => ReservationStatusNoticeRequest()),
});
Dart ReservationStatusNoticeRequest DTOs
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.
GET /v2/reservation/notice/{Query} HTTP/1.1
Host: cert.cendyn.com
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"records":[{"cendynPropertyId":"String","externalResId1":"String","externalResId2":"String","resStatus":"String","cancellationID":"String","cancellationDate":"0001-01-01T00:00:00.0000000","dateResUpdated":"0001-01-01T00:00:00.0000000","resUpdatedBy":"String","roomNumber":"String","roomNumberStartDate":"0001-01-01T00:00:00.0000000","roomNumberEndDate":"0001-01-01T00:00:00.0000000","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"}],"resArriveDate":"0001-01-01T00:00:00.0000000","resDepartDate":"0001-01-01T00:00:00.0000000","currency":"String","roomType":"String","externalProfileID":"String","uniqueIDs":[{"id":"String","type":"String","context":"String"}]}],"status":"Success","statusMessage":"String","recordsReturned":0,"recordsAvailable":0,"pageNumber":0,"pageSize":0}