ClubReady Api

<back to all web services

StaffListRequest

The following routes are available for this service:
GET/staffGet Staff for a location
import 'package:servicestack/servicestack.dart';

class ApiDtoBase implements IConvertible
{
    String? ApiKey;
    int? StoreId;
    int? ChainId;

    ApiDtoBase({this.ApiKey,this.StoreId,this.ChainId});
    ApiDtoBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class StaffListRequestDto extends ApiDtoBase implements IConvertible
{
    int? StaffType;

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

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

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

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

enum RestrictedResourceType
{
    Store,
    Chain,
    User,
    Undefined,
}

class StaffListRequest extends StaffListRequestDto implements IRestrictedApiRequest, IConvertible
{
    /**
    * Api Key - grants access to resources
    */
    // @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
    String? ApiKey;

    /**
    * StoreId is required
    */
    // @ApiMember(DataType="integer", Description="StoreId is required", IsRequired=true, Name="StoreId", ParameterType="query")
    int? StoreId;

    /**
    * ClubReady AdminTypeId
    */
    // @ApiMember(DataType="integer", Description="ClubReady AdminTypeId", Name="StaffType", ParameterType="query")
    int? StaffType;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;
    /**
    * Restricts results to staff that are available for scheduling
    */
    // @ApiMember(DataType="bool", Description="Restricts results to staff that are available for scheduling", Name="AvailableForScheduling", ParameterType="query")
    bool? AvailableForScheduling;

    StaffListRequest({this.ApiKey,this.StoreId,this.StaffType,this.RestrictedId,this.RestrictedResourceType,this.AvailableForScheduling});
    StaffListRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        ApiKey = json['ApiKey'];
        StoreId = json['StoreId'];
        StaffType = json['StaffType'];
        RestrictedId = json['RestrictedId'];
        RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!);
        AvailableForScheduling = json['AvailableForScheduling'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ApiKey': ApiKey,
        'StoreId': StoreId,
        'StaffType': StaffType,
        'RestrictedId': RestrictedId,
        'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!),
        'AvailableForScheduling': AvailableForScheduling
    });

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

TypeContext _ctx = TypeContext(library: 'www.clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'StaffListRequestDto': TypeInfo(TypeOf.Class, create:() => StaffListRequestDto()),
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'StaffListRequest': TypeInfo(TypeOf.Class, create:() => StaffListRequest()),
});

Dart StaffListRequest DTOs

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

HTTP + CSV

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

GET /staff HTTP/1.1 
Host: www.clubready.com 
Accept: text/csv