ClubReady Api

<back to all web services

GetGuestPassesRequest

The following routes are available for this service:
GET/club/guest-pass/getGet a user's guest pass(es).
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 GetGuestPassRequestDto extends ApiDtoBase implements IConvertible
{
    int? UserId;

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

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

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

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

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

class GetGuestPassesRequest extends GetGuestPassRequestDto 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;

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

    /**
    * User ID
    */
    // @ApiMember(DataType="integer", Description="User ID", IsRequired=true, Name="UserId", ParameterType="query")
    int? UserId;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

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

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

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

    getTypeName() => "GetGuestPassesRequest";
    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 GuestPassSimple implements IConvertible
{
    int? GuestPassId;
    int? GuestPassTypeId;
    int? StoreId;
    DateTime? ActivatedOn;
    DateTime? Expires;

    GuestPassSimple({this.GuestPassId,this.GuestPassTypeId,this.StoreId,this.ActivatedOn,this.Expires});
    GuestPassSimple.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        GuestPassId = json['GuestPassId'];
        GuestPassTypeId = json['GuestPassTypeId'];
        StoreId = json['StoreId'];
        ActivatedOn = JsonConverters.fromJson(json['ActivatedOn'],'DateTime',context!);
        Expires = JsonConverters.fromJson(json['Expires'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'GuestPassId': GuestPassId,
        'GuestPassTypeId': GuestPassTypeId,
        'StoreId': StoreId,
        'ActivatedOn': JsonConverters.toJson(ActivatedOn,'DateTime',context!),
        'Expires': JsonConverters.toJson(Expires,'DateTime',context!)
    };

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

class GetGuestPassResponseDto extends ApiResponseBase implements IConvertible
{
    List<GuestPassSimple>? GuestPasses;

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

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

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

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

class GetGuestPassesResponse extends GetGuestPassResponseDto implements IConvertible
{
    bool? Success;
    String? Message;
    List<GuestPassSimple>? GuestPasses;

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

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Success': Success,
        'Message': Message,
        'GuestPasses': JsonConverters.toJson(GuestPasses,'List<GuestPassSimple>',context!)
    });

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

TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'GetGuestPassRequestDto': TypeInfo(TypeOf.Class, create:() => GetGuestPassRequestDto()),
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'GetGuestPassesRequest': TypeInfo(TypeOf.Class, create:() => GetGuestPassesRequest()),
    'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()),
    'GuestPassSimple': TypeInfo(TypeOf.Class, create:() => GuestPassSimple()),
    'GetGuestPassResponseDto': TypeInfo(TypeOf.Class, create:() => GetGuestPassResponseDto()),
    'List<GuestPassSimple>': TypeInfo(TypeOf.Class, create:() => <GuestPassSimple>[]),
    'GetGuestPassesResponse': TypeInfo(TypeOf.Class, create:() => GetGuestPassesResponse()),
});

Dart GetGuestPassesRequest DTOs

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

HTTP + XML

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

GET /club/guest-pass/get HTTP/1.1 
Host: clubready.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetGuestPassesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.ClubAccess.Model">
  <Message xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Message>
  <Success xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">false</Success>
  <GuestPasses xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">
    <GuestPassSimple>
      <ActivatedOn>0001-01-01T00:00:00</ActivatedOn>
      <Expires>0001-01-01T00:00:00</Expires>
      <GuestPassId>0</GuestPassId>
      <GuestPassTypeId>0</GuestPassTypeId>
      <StoreId>0</StoreId>
    </GuestPassSimple>
  </GuestPasses>
</GetGuestPassesResponse>