Reservation Station API

<back to all web services

GetUserSchedule

Requires Authentication
import 'package:servicestack/servicestack.dart';

class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo, IConvertible
{
    /**
    * The API Key required for authentication
    */
    // @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
    String? apiKey;

    /**
    * Latitude of the user making this request
    */
    // @ApiMember(DataType="double", Description="Latitude of the user making this request")
    double? latitude;

    /**
    * Longitude of the user making this request
    */
    // @ApiMember(DataType="double", Description="Longitude of the user making this request")
    double? longitude;

    ApiServiceRequest({this.apiKey,this.latitude,this.longitude});
    ApiServiceRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        apiKey = json['apiKey'];
        latitude = JsonConverters.toDouble(json['latitude']);
        longitude = JsonConverters.toDouble(json['longitude']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'apiKey': apiKey,
        'latitude': latitude,
        'longitude': longitude
    };

    getTypeName() => "ApiServiceRequest";
    TypeContext? context = _ctx;
}

class ApiServiceResponse implements IServiceResponse, IConvertible
{
    String? description;
    String? heading;
    bool? wasSuccessful;
    dynamic? modelState;

    ApiServiceResponse({this.description,this.heading,this.wasSuccessful,this.modelState});
    ApiServiceResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        description = json['description'];
        heading = json['heading'];
        wasSuccessful = json['wasSuccessful'];
        modelState = JsonConverters.fromJson(json['modelState'],'dynamic',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'description': description,
        'heading': heading,
        'wasSuccessful': wasSuccessful,
        'modelState': JsonConverters.toJson(modelState,'dynamic',context!)
    };

    getTypeName() => "ApiServiceResponse";
    TypeContext? context = _ctx;
}

class UserCustomFieldData implements IConvertible
{
    String? id;
    String? value;
    String? name;
    bool? optional;

    UserCustomFieldData({this.id,this.value,this.name,this.optional});
    UserCustomFieldData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        value = json['value'];
        name = json['name'];
        optional = json['optional'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'value': value,
        'name': name,
        'optional': optional
    };

    getTypeName() => "UserCustomFieldData";
    TypeContext? context = _ctx;
}

class GuestData implements IConvertible
{
    String? name;
    String? emailAddress;
    String? mobileNumber;
    List<UserCustomFieldData>? userCustomFields;
    bool? isAlreadyUser;
    int? systemUserId;

    GuestData({this.name,this.emailAddress,this.mobileNumber,this.userCustomFields,this.isAlreadyUser,this.systemUserId});
    GuestData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'];
        emailAddress = json['emailAddress'];
        mobileNumber = json['mobileNumber'];
        userCustomFields = JsonConverters.fromJson(json['userCustomFields'],'List<UserCustomFieldData>',context!);
        isAlreadyUser = json['isAlreadyUser'];
        systemUserId = json['systemUserId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'emailAddress': emailAddress,
        'mobileNumber': mobileNumber,
        'userCustomFields': JsonConverters.toJson(userCustomFields,'List<UserCustomFieldData>',context!),
        'isAlreadyUser': isAlreadyUser,
        'systemUserId': systemUserId
    };

    getTypeName() => "GuestData";
    TypeContext? context = _ctx;
}

class UserBookingData implements IBookingData, IConvertible
{
    int? bookingId;
    String? start;
    String? end;
    bool? remindStart;
    bool? remind30Mins;
    bool? remind1Hour;
    bool? remind6Hours;
    bool? remind12Hours;
    bool? remind1Day;
    bool? remind1Week;
    String? facilityName;
    int? facilityId;
    String? bookingNotes;
    double? billedAmount;
    double? billableHours;
    bool? finished;
    int? facilityTimeOffset;
    int? cancellationLeadTime;
    bool? isCoordinator;
    GuestData? userData;
    bool? allowExtraRequirements;

    UserBookingData({this.bookingId,this.start,this.end,this.remindStart,this.remind30Mins,this.remind1Hour,this.remind6Hours,this.remind12Hours,this.remind1Day,this.remind1Week,this.facilityName,this.facilityId,this.bookingNotes,this.billedAmount,this.billableHours,this.finished,this.facilityTimeOffset,this.cancellationLeadTime,this.isCoordinator,this.userData,this.allowExtraRequirements});
    UserBookingData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        bookingId = json['bookingId'];
        start = json['start'];
        end = json['end'];
        remindStart = json['remindStart'];
        remind30Mins = json['remind30Mins'];
        remind1Hour = json['remind1Hour'];
        remind6Hours = json['remind6Hours'];
        remind12Hours = json['remind12Hours'];
        remind1Day = json['remind1Day'];
        remind1Week = json['remind1Week'];
        facilityName = json['facilityName'];
        facilityId = json['facilityId'];
        bookingNotes = json['bookingNotes'];
        billedAmount = JsonConverters.toDouble(json['billedAmount']);
        billableHours = JsonConverters.toDouble(json['billableHours']);
        finished = json['finished'];
        facilityTimeOffset = json['facilityTimeOffset'];
        cancellationLeadTime = json['cancellationLeadTime'];
        isCoordinator = json['isCoordinator'];
        userData = JsonConverters.fromJson(json['userData'],'GuestData',context!);
        allowExtraRequirements = json['allowExtraRequirements'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'bookingId': bookingId,
        'start': start,
        'end': end,
        'remindStart': remindStart,
        'remind30Mins': remind30Mins,
        'remind1Hour': remind1Hour,
        'remind6Hours': remind6Hours,
        'remind12Hours': remind12Hours,
        'remind1Day': remind1Day,
        'remind1Week': remind1Week,
        'facilityName': facilityName,
        'facilityId': facilityId,
        'bookingNotes': bookingNotes,
        'billedAmount': billedAmount,
        'billableHours': billableHours,
        'finished': finished,
        'facilityTimeOffset': facilityTimeOffset,
        'cancellationLeadTime': cancellationLeadTime,
        'isCoordinator': isCoordinator,
        'userData': JsonConverters.toJson(userData,'GuestData',context!),
        'allowExtraRequirements': allowExtraRequirements
    };

    getTypeName() => "UserBookingData";
    TypeContext? context = _ctx;
}

class UserScheduleDayData implements IConvertible
{
    String? date;
    List<UserBookingData>? bookings;

    UserScheduleDayData({this.date,this.bookings});
    UserScheduleDayData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        date = json['date'];
        bookings = JsonConverters.fromJson(json['bookings'],'List<UserBookingData>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'date': date,
        'bookings': JsonConverters.toJson(bookings,'List<UserBookingData>',context!)
    };

    getTypeName() => "UserScheduleDayData";
    TypeContext? context = _ctx;
}

class GetUserScheduleResponse extends ApiServiceResponse implements IConvertible
{
    List<UserScheduleDayData>? bookings;

    GetUserScheduleResponse({this.bookings});
    GetUserScheduleResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        bookings = JsonConverters.fromJson(json['bookings'],'List<UserScheduleDayData>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'bookings': JsonConverters.toJson(bookings,'List<UserScheduleDayData>',context!)
    });

    getTypeName() => "GetUserScheduleResponse";
    TypeContext? context = _ctx;
}

class GetUserSchedule extends ApiServiceRequest implements IConvertible
{
    GetUserSchedule();
    GetUserSchedule.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "GetUserSchedule";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'reservation.api.dev.86degrees.com', types: <String, TypeInfo> {
    'ApiServiceRequest': TypeInfo(TypeOf.Class, create:() => ApiServiceRequest()),
    'ApiServiceResponse': TypeInfo(TypeOf.Class, create:() => ApiServiceResponse()),
    'UserCustomFieldData': TypeInfo(TypeOf.Class, create:() => UserCustomFieldData()),
    'GuestData': TypeInfo(TypeOf.Class, create:() => GuestData()),
    'List<UserCustomFieldData>': TypeInfo(TypeOf.Class, create:() => <UserCustomFieldData>[]),
    'UserBookingData': TypeInfo(TypeOf.Class, create:() => UserBookingData()),
    'UserScheduleDayData': TypeInfo(TypeOf.Class, create:() => UserScheduleDayData()),
    'List<UserBookingData>': TypeInfo(TypeOf.Class, create:() => <UserBookingData>[]),
    'GetUserScheduleResponse': TypeInfo(TypeOf.Class, create:() => GetUserScheduleResponse()),
    'List<UserScheduleDayData>': TypeInfo(TypeOf.Class, create:() => <UserScheduleDayData>[]),
    'GetUserSchedule': TypeInfo(TypeOf.Class, create:() => GetUserSchedule()),
});

Dart GetUserSchedule DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /jsonl/reply/GetUserSchedule HTTP/1.1 
Host: reservation.api.dev.86degrees.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"apiKey":"String","latitude":0,"longitude":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"bookings":[{}],"description":"String","heading":"String","wasSuccessful":false,"modelState":{}}