AIM Web Services

<back to all web services

GetTeeSlotsRequest

GetTeeSlots
Requires active-e Tee-Sheet Service

The following routes are available for this service:
POST, GET/api/GetTeeSlots
import 'package:servicestack/servicestack.dart';

// @DataContract
class BaseRequest implements IConvertible
{
    /**
    * This is your AIM API Key provided by Tri-Tech
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header")
    String? ApiKey;

    // @DataMember
    // @ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")
    String? OAuthToken;

    BaseRequest({this.ApiKey,this.OAuthToken});
    BaseRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ApiKey = json['ApiKey'];
        OAuthToken = json['OAuthToken'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ApiKey': ApiKey,
        'OAuthToken': OAuthToken
    };

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

// @DataContract
class BaseSecureRequest extends BaseRequest implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="Token", ParameterType="Header")
    String? Token;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="DeviceId", ParameterType="Header")
    String? DeviceId;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", IsRequired=true, Name="AppId", ParameterType="Header")
    String? AppId;

    BaseSecureRequest({this.Token,this.DeviceId,this.AppId});
    BaseSecureRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Token = json['Token'];
        DeviceId = json['DeviceId'];
        AppId = json['AppId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Token': Token,
        'DeviceId': DeviceId,
        'AppId': AppId
    });

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

// @DataContract
class BaseResponseResult implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
    String? StatusCode;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
    String? Login;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
    String? ErrorCode;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
    String? ErrorDisplayText;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
    String? ErrorMessage;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
    String? DomainName;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
    String? IpAddress;

    BaseResponseResult({this.StatusCode,this.Login,this.ErrorCode,this.ErrorDisplayText,this.ErrorMessage,this.DomainName,this.IpAddress});
    BaseResponseResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        StatusCode = json['StatusCode'];
        Login = json['Login'];
        ErrorCode = json['ErrorCode'];
        ErrorDisplayText = json['ErrorDisplayText'];
        ErrorMessage = json['ErrorMessage'];
        DomainName = json['DomainName'];
        IpAddress = json['IpAddress'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'StatusCode': StatusCode,
        'Login': Login,
        'ErrorCode': ErrorCode,
        'ErrorDisplayText': ErrorDisplayText,
        'ErrorMessage': ErrorMessage,
        'DomainName': DomainName,
        'IpAddress': IpAddress
    };

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

// @DataContract
class BaseResponse implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
    BaseResponseResult? Status;

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

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

    Map<String, dynamic> toJson() => {
        'Status': JsonConverters.toJson(Status,'BaseResponseResult',context!)
    };

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

// @DataContract
class TeeSlotGeneric implements IConvertible
{
    // @DataMember
    int? Id;

    // @DataMember
    DateTime? DateTime;

    // @DataMember
    double? Cost;

    // @DataMember
    double? Cost2;

    // @DataMember
    double? Cost3;

    // @DataMember
    int? SlotsOpen;

    // @DataMember
    int? MinSlots;

    // @DataMember
    String? Course;

    // @DataMember
    String? CourseTopic;

    // @DataMember
    String? Location;

    // @DataMember
    String? Note;

    // @DataMember
    bool? Has18Holes;

    // @DataMember
    String? WebId;

    // @DataMember
    bool? StartingOnBack9;

    TeeSlotGeneric({this.Id,this.DateTime,this.Cost,this.Cost2,this.Cost3,this.SlotsOpen,this.MinSlots,this.Course,this.CourseTopic,this.Location,this.Note,this.Has18Holes,this.WebId,this.StartingOnBack9});
    TeeSlotGeneric.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        DateTime = JsonConverters.fromJson(json['DateTime'],'DateTime',context!);
        Cost = JsonConverters.toDouble(json['Cost']);
        Cost2 = JsonConverters.toDouble(json['Cost2']);
        Cost3 = JsonConverters.toDouble(json['Cost3']);
        SlotsOpen = json['SlotsOpen'];
        MinSlots = json['MinSlots'];
        Course = json['Course'];
        CourseTopic = json['CourseTopic'];
        Location = json['Location'];
        Note = json['Note'];
        Has18Holes = json['Has18Holes'];
        WebId = json['WebId'];
        StartingOnBack9 = json['StartingOnBack9'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'DateTime': JsonConverters.toJson(DateTime,'DateTime',context!),
        'Cost': Cost,
        'Cost2': Cost2,
        'Cost3': Cost3,
        'SlotsOpen': SlotsOpen,
        'MinSlots': MinSlots,
        'Course': Course,
        'CourseTopic': CourseTopic,
        'Location': Location,
        'Note': Note,
        'Has18Holes': Has18Holes,
        'WebId': WebId,
        'StartingOnBack9': StartingOnBack9
    };

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

// @DataContract
class GetTeeSlotsResponse extends BaseResponse implements IConvertible
{
    // @DataMember
    List<TeeSlotGeneric>? TeeSlots;

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

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

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

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

/**
* GetTeeSlotsRequires active-e Tee-Sheet Service
*/
// @DataContract
class GetTeeSlotsRequest extends BaseSecureRequest implements IConvertible
{
    // @DataMember
    DateTime? DateFrom;

    // @DataMember
    DateTime? DateTo;

    // @DataMember
    DateTime? TimeFrom;

    // @DataMember
    DateTime? TimeTo;

    // @DataMember
    String? Course;

    // @DataMember
    String? Location;

    // @DataMember
    String? WebId;

    // @DataMember
    int? SlotsRequired;

    // @DataMember
    bool? ShowOpenSlots;

    // @DataMember
    bool? ShowReservedSlots;

    // @DataMember
    bool? Show9HoleSlots;

    // @DataMember
    bool? Show18HoleSlots;

    // @DataMember
    bool? ShowFront9;

    // @DataMember
    bool? ShowBack9;

    GetTeeSlotsRequest({this.DateFrom,this.DateTo,this.TimeFrom,this.TimeTo,this.Course,this.Location,this.WebId,this.SlotsRequired,this.ShowOpenSlots,this.ShowReservedSlots,this.Show9HoleSlots,this.Show18HoleSlots,this.ShowFront9,this.ShowBack9});
    GetTeeSlotsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        DateFrom = JsonConverters.fromJson(json['DateFrom'],'DateTime',context!);
        DateTo = JsonConverters.fromJson(json['DateTo'],'DateTime',context!);
        TimeFrom = JsonConverters.fromJson(json['TimeFrom'],'DateTime',context!);
        TimeTo = JsonConverters.fromJson(json['TimeTo'],'DateTime',context!);
        Course = json['Course'];
        Location = json['Location'];
        WebId = json['WebId'];
        SlotsRequired = json['SlotsRequired'];
        ShowOpenSlots = json['ShowOpenSlots'];
        ShowReservedSlots = json['ShowReservedSlots'];
        Show9HoleSlots = json['Show9HoleSlots'];
        Show18HoleSlots = json['Show18HoleSlots'];
        ShowFront9 = json['ShowFront9'];
        ShowBack9 = json['ShowBack9'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'DateFrom': JsonConverters.toJson(DateFrom,'DateTime',context!),
        'DateTo': JsonConverters.toJson(DateTo,'DateTime',context!),
        'TimeFrom': JsonConverters.toJson(TimeFrom,'DateTime',context!),
        'TimeTo': JsonConverters.toJson(TimeTo,'DateTime',context!),
        'Course': Course,
        'Location': Location,
        'WebId': WebId,
        'SlotsRequired': SlotsRequired,
        'ShowOpenSlots': ShowOpenSlots,
        'ShowReservedSlots': ShowReservedSlots,
        'Show9HoleSlots': Show9HoleSlots,
        'Show18HoleSlots': Show18HoleSlots,
        'ShowFront9': ShowFront9,
        'ShowBack9': ShowBack9
    });

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

TypeContext _ctx = TypeContext(library: 'active_ewebservice.biz', types: <String, TypeInfo> {
    'BaseRequest': TypeInfo(TypeOf.Class, create:() => BaseRequest()),
    'BaseSecureRequest': TypeInfo(TypeOf.Class, create:() => BaseSecureRequest()),
    'BaseResponseResult': TypeInfo(TypeOf.Class, create:() => BaseResponseResult()),
    'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()),
    'TeeSlotGeneric': TypeInfo(TypeOf.Class, create:() => TeeSlotGeneric()),
    'GetTeeSlotsResponse': TypeInfo(TypeOf.Class, create:() => GetTeeSlotsResponse()),
    'List<TeeSlotGeneric>': TypeInfo(TypeOf.Class, create:() => <TeeSlotGeneric>[]),
    'GetTeeSlotsRequest': TypeInfo(TypeOf.Class, create:() => GetTeeSlotsRequest()),
});

Dart GetTeeSlotsRequest 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 /api/GetTeeSlots HTTP/1.1 
Host: active-ewebservice.biz 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"TimeFrom":"0001-01-01T00:00:00.0000000","TimeTo":"0001-01-01T00:00:00.0000000","Course":"String","Location":"String","WebId":"String","SlotsRequired":0,"ShowOpenSlots":false,"ShowReservedSlots":false,"Show9HoleSlots":false,"Show18HoleSlots":false,"ShowFront9":false,"ShowBack9":false,"Token":"String","DeviceId":"String","AppId":"String","ApiKey":"String","OAuthToken":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"TeeSlots":[{"Id":0,"Cost":0,"Cost2":0,"Cost3":0,"SlotsOpen":0,"MinSlots":0,"Course":"String","CourseTopic":"String","Location":"String","Note":"String","Has18Holes":false,"WebId":"String","StartingOnBack9":false}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}