ClubReady Api

<back to all web services

ActivateGuestPassRequest

The following routes are available for this service:
POST/club/guest-pass/activateActivate a guest pass.
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 ActivateGuestPassRequestDto extends ApiDtoBase implements IConvertible
{
    int? GuestPassId;
    DateTime? Expires;

    ActivateGuestPassRequestDto({this.GuestPassId,this.Expires});
    ActivateGuestPassRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

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

class ActivateGuestPassRequest extends ActivateGuestPassRequestDto 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;

    /**
    * Guest pass to activate.
    */
    // @ApiMember(DataType="integer", Description="Guest pass to activate.", IsRequired=true, Name="GuestPassId", ParameterType="query")
    int? GuestPassId;

    /**
    * When will this pass expire? (leave blank for never)
    */
    // @ApiMember(DataType="datetime", Description="When will this pass expire? (leave blank for never)", Name="Expires", ParameterType="query")
    DateTime? Expires;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

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

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

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

    getTypeName() => "ActivateGuestPassRequest";
    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 ActivateGuestPassResponseDto extends ApiResponseBase implements IConvertible
{
    ActivateGuestPassResponseDto();
    ActivateGuestPassResponseDto.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() => "ActivateGuestPassResponseDto";
    TypeContext? context = _ctx;
}

class ActivateGuestPassResponse extends ActivateGuestPassResponseDto implements IConvertible
{
    bool? Success;
    String? Message;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'ActivateGuestPassRequestDto': TypeInfo(TypeOf.Class, create:() => ActivateGuestPassRequestDto()),
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'ActivateGuestPassRequest': TypeInfo(TypeOf.Class, create:() => ActivateGuestPassRequest()),
    'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()),
    'ActivateGuestPassResponseDto': TypeInfo(TypeOf.Class, create:() => ActivateGuestPassResponseDto()),
    'ActivateGuestPassResponse': TypeInfo(TypeOf.Class, create:() => ActivateGuestPassResponse()),
});

Dart ActivateGuestPassRequest 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.

POST /club/guest-pass/activate HTTP/1.1 
Host: clubready.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ApiKey":"String","StoreId":0,"GuestPassId":0,"Expires":"0001-01-01T00:00:00.0000000","RestrictedId":0,"RestrictedResourceType":"Store","ChainId":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Success":false,"Message":"String"}