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 .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/types HTTP/1.1 
Host: www.clubready.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetGuestPassTypesResponse 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>
  <GuestPassTypes xmlns:d2p1="http://schemas.datacontract.org/2004/07/ClubReady.Core.ClubAccess.GuestPasses.Dtos" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">
    <d2p1:GuestPassTypeDto>
      <d2p1:ActiveCount>0</d2p1:ActiveCount>
      <d2p1:AutoActivateWhenIssued>false</d2p1:AutoActivateWhenIssued>
      <d2p1:ChainId>0</d2p1:ChainId>
      <d2p1:DurationDays>0</d2p1:DurationDays>
      <d2p1:ExpirationEditable>false</d2p1:ExpirationEditable>
      <d2p1:ExpiredCount>0</d2p1:ExpiredCount>
      <d2p1:GuestPassTypeId>0</d2p1:GuestPassTypeId>
      <d2p1:InactiveCount>0</d2p1:InactiveCount>
      <d2p1:IsDeleted>false</d2p1:IsDeleted>
      <d2p1:IssueBarcodeWhenActivated>false</d2p1:IssueBarcodeWhenActivated>
      <d2p1:MaxDurationDays>0</d2p1:MaxDurationDays>
      <d2p1:MaxIssuedCount>0</d2p1:MaxIssuedCount>
      <d2p1:PassName>String</d2p1:PassName>
      <d2p1:StoreId>0</d2p1:StoreId>
      <d2p1:TagWhenActivated>String</d2p1:TagWhenActivated>
      <d2p1:TotalCount>0</d2p1:TotalCount>
    </d2p1:GuestPassTypeDto>
  </GuestPassTypes>
</GetGuestPassTypesResponse>