CenResService

<back to all web services

ReservationStatusNoticeRequest

The following routes are available for this service:
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 .xml suffix or ?format=xml

HTTP + XML

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/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ReservationStatusNoticeResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenResSS.ServiceModel">
  <PageNumber>0</PageNumber>
  <PageSize>0</PageSize>
  <RecordsAvailable>0</RecordsAvailable>
  <RecordsReturned>0</RecordsReturned>
  <Status>Success</Status>
  <StatusMessage>String</StatusMessage>
  <Records>
    <ReservationStatusNotice>
      <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>
    </ReservationStatusNotice>
  </Records>
</ReservationStatusNoticeResponse>