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 Foundation
import ServiceStack

public class ReservationStatusNoticeRequest : Codable
{
    public var cendynPropertyId:String?
    public var query:ReservationStatusNoticeQueryType?
    public var id:String?
    public var stayDate:Date?

    required public init(){}
}

public enum ReservationStatusNoticeQueryType : String, Codable
{
    case ResId
    case ProfileId
    case RoomId
}

public class ReservationStatusNoticeResponse : CenResResponse
{
    public var records:[ReservationStatusNotice] = []

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case records
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        records = try container.decodeIfPresent([ReservationStatusNotice].self, forKey: .records) ?? []
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if records.count > 0 { try container.encode(records, forKey: .records) }
    }
}

public class CenResResponse : Codable
{
    public var status:RequestStatus?
    public var statusMessage:String?
    public var recordsReturned:Int?
    public var recordsAvailable:Int?
    public var pageNumber:Int?
    public var pageSize:Int?

    required public init(){}
}

public enum RequestStatus : String, Codable
{
    case Success
    case Warning
    case Error
    case NotAuthorized
    case Failure
}

public class ReservationStatusNotice : Codable
{
    public var cendynPropertyId:String?
    public var externalResId1:String?
    public var externalResId2:String?
    public var resStatus:String?
    public var cancellationID:String?
    public var cancellationDate:Date?
    public var dateResUpdated:Date?
    public var resUpdatedBy:String?
    public var roomNumber:String?
    public var roomNumberStartDate:Date?
    public var roomNumberEndDate:Date?
    public var stayHistoryRevenueCollection:[StayHistoryRevenue] = []
    public var resArriveDate:Date?
    public var resDepartDate:Date?
    public var currency:String?
    public var roomType:String?
    public var externalProfileID:String?
    public var uniqueIDs:[UniqueIDType] = []

    required public init(){}
}

public class StayHistoryRevenue : Codable
{
    public var recordStatus:String?
    // @DataMember(IsRequired=true)
    public var revenueGroup:String?

    // @DataMember(IsRequired=true)
    public var revenueType:String?

    // @DataMember(IsRequired=true)
    public var amount:Double?

    public var currencyCode:String?
    public var folioWindow:String?
    public var transactionDate:Date?
    public var inactiveDate:Date?

    required public init(){}
}

public class UniqueIDType : Codable
{
    public var id:String?
    public var type:String?
    public var context:String?

    required public init(){}
}


Swift 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

HTTP + JSON

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}