ClubReady Api

<back to all web services

GetGuestPassTypesRequest

The following routes are available for this service:
GET/club/guest-pass/typesGuest passes available at 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 GetGuestPassTypesRequestDto extends ApiDtoBase implements IConvertible
{
    GetGuestPassTypesRequestDto();
    GetGuestPassTypesRequestDto.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() => "GetGuestPassTypesRequestDto";
    TypeContext? context = _ctx;
}

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

class GetGuestPassTypesRequest extends GetGuestPassTypesRequestDto 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;

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

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

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

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

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

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

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

class ApiResponseBase implements IConvertible
{
    bool? Success;
    String? Message;

    ApiResponseBase({this.Success,this.Message});
    ApiResponseBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Success': Success,
        'Message': Message
    };

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

class GuestPassTypeDto implements IConvertible
{
    int? GuestPassTypeId;
    int? ChainId;
    int? StoreId;
    String? PassName;
    int? DurationDays;
    bool? ExpirationEditable;
    int? MaxDurationDays;
    bool? AutoActivateWhenIssued;
    bool? IssueBarcodeWhenActivated;
    String? TagWhenActivated;
    int? MaxIssuedCount;
    bool? IsDeleted;
    int? InactiveCount;
    int? ActiveCount;
    int? ExpiredCount;
    int? TotalCount;

    GuestPassTypeDto({this.GuestPassTypeId,this.ChainId,this.StoreId,this.PassName,this.DurationDays,this.ExpirationEditable,this.MaxDurationDays,this.AutoActivateWhenIssued,this.IssueBarcodeWhenActivated,this.TagWhenActivated,this.MaxIssuedCount,this.IsDeleted,this.InactiveCount,this.ActiveCount,this.ExpiredCount,this.TotalCount});
    GuestPassTypeDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        GuestPassTypeId = json['GuestPassTypeId'];
        ChainId = json['ChainId'];
        StoreId = json['StoreId'];
        PassName = json['PassName'];
        DurationDays = json['DurationDays'];
        ExpirationEditable = json['ExpirationEditable'];
        MaxDurationDays = json['MaxDurationDays'];
        AutoActivateWhenIssued = json['AutoActivateWhenIssued'];
        IssueBarcodeWhenActivated = json['IssueBarcodeWhenActivated'];
        TagWhenActivated = json['TagWhenActivated'];
        MaxIssuedCount = json['MaxIssuedCount'];
        IsDeleted = json['IsDeleted'];
        InactiveCount = json['InactiveCount'];
        ActiveCount = json['ActiveCount'];
        ExpiredCount = json['ExpiredCount'];
        TotalCount = json['TotalCount'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'GuestPassTypeId': GuestPassTypeId,
        'ChainId': ChainId,
        'StoreId': StoreId,
        'PassName': PassName,
        'DurationDays': DurationDays,
        'ExpirationEditable': ExpirationEditable,
        'MaxDurationDays': MaxDurationDays,
        'AutoActivateWhenIssued': AutoActivateWhenIssued,
        'IssueBarcodeWhenActivated': IssueBarcodeWhenActivated,
        'TagWhenActivated': TagWhenActivated,
        'MaxIssuedCount': MaxIssuedCount,
        'IsDeleted': IsDeleted,
        'InactiveCount': InactiveCount,
        'ActiveCount': ActiveCount,
        'ExpiredCount': ExpiredCount,
        'TotalCount': TotalCount
    };

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

class GetGuestPassTypesResponseDto extends ApiResponseBase implements IConvertible
{
    List<GuestPassTypeDto>? GuestPassTypes;

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

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

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

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

class GetGuestPassTypesResponse extends GetGuestPassTypesResponseDto implements IConvertible
{
    List<GuestPassTypeDto>? GuestPassTypes;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'www.clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'GetGuestPassTypesRequestDto': TypeInfo(TypeOf.Class, create:() => GetGuestPassTypesRequestDto()),
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'GetGuestPassTypesRequest': TypeInfo(TypeOf.Class, create:() => GetGuestPassTypesRequest()),
    'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()),
    'GuestPassTypeDto': TypeInfo(TypeOf.Class, create:() => GuestPassTypeDto()),
    'GetGuestPassTypesResponseDto': TypeInfo(TypeOf.Class, create:() => GetGuestPassTypesResponseDto()),
    'List<GuestPassTypeDto>': TypeInfo(TypeOf.Class, create:() => <GuestPassTypeDto>[]),
    'GetGuestPassTypesResponse': TypeInfo(TypeOf.Class, create:() => GetGuestPassTypesResponse()),
});

Dart GetGuestPassTypesRequest 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 /club/guest-pass/types HTTP/1.1 
Host: www.clubready.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"GuestPassTypes":[{"GuestPassTypeId":0,"ChainId":0,"StoreId":0,"PassName":"String","DurationDays":0,"ExpirationEditable":false,"MaxDurationDays":0,"AutoActivateWhenIssued":false,"IssueBarcodeWhenActivated":false,"TagWhenActivated":"String","MaxIssuedCount":0,"IsDeleted":false,"InactiveCount":0,"ActiveCount":0,"ExpiredCount":0,"TotalCount":0}],"Success":false,"Message":"String"}