| 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 .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 /reservation/notice/{SubscriptionId} HTTP/1.1
Host: cert.cendyn.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"noticeMessage":{"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"}]},"subscriptionId":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"statusCode":"String","recordCount":0,"errorCount":0}