ClubReady Api

<back to all web services

DoCheckInRequest

Check a user into a club

The following routes are available for this service:
POST/users/checkinCheck User Into Club
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 DoCheckInRequestDto extends ApiDtoBase implements IConvertible
{
    String? Barcode;
    int? UserId;
    DateTime? UtcTimeStamp;

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

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

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

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

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

/**
* Check a user into a club
*/
// @Api(Description="Check a user into a club")
class DoCheckInRequest extends DoCheckInRequestDto 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;

    /**
    * User barcode
    */
    // @ApiMember(DataType="string", Description="User barcode", IsRequired=true, Name="Barcode", ParameterType="query")
    String? Barcode;

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

    /**
    * UserId to check into club
    */
    // @ApiMember(DataType="integer", Description="UserId to check into club", Name="UserId", ParameterType="query")
    int? UserId;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

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

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        ApiKey = json['ApiKey'];
        Barcode = json['Barcode'];
        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,
        'Barcode': Barcode,
        'StoreId': StoreId,
        'UserId': UserId,
        'RestrictedId': RestrictedId,
        'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
    });

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

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

Dart DoCheckInRequest 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 /users/checkin HTTP/1.1 
Host: www.clubready.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ApiKey":"String","Barcode":"String","StoreId":0,"UserId":0,"RestrictedId":0,"RestrictedResourceType":"Store","UtcTimeStamp":"0001-01-01T00:00:00.0000000","ChainId":0}