ClubReady Api

<back to all web services

GetCustomCategoryItemsRequest

The following routes are available for this service:
GET/club/custom-category/itemsList of items for a custom category.
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 GetCustomCategoriesRequestDto extends ApiDtoBase implements IConvertible
{
    int? CustomCategoryId;

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

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

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

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

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

class GetCustomCategoryItemsRequest extends GetCustomCategoriesRequestDto 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="ChainId", ParameterType="query")
    int? ChainId;

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

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

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

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

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

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

    getTypeName() => "GetCustomCategoryItemsRequest";
    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 ApiGenericType implements IConvertible
{
    int? Id;
    String? Name;
    int? StoreId;
    int? ChainId;

    ApiGenericType({this.Id,this.Name,this.StoreId,this.ChainId});
    ApiGenericType.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        StoreId = json['StoreId'];
        ChainId = json['ChainId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'StoreId': StoreId,
        'ChainId': ChainId
    };

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

class GetCustomCategoryItemsResposeDto extends ApiResponseBase implements IConvertible
{
    List<ApiGenericType>? CategoryItems;

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

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

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

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

class GetCustomCategoryItemsResponse extends GetCustomCategoryItemsResposeDto implements IConvertible
{
    List<ApiGenericType>? CategoryItems;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'www.clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'GetCustomCategoriesRequestDto': TypeInfo(TypeOf.Class, create:() => GetCustomCategoriesRequestDto()),
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'GetCustomCategoryItemsRequest': TypeInfo(TypeOf.Class, create:() => GetCustomCategoryItemsRequest()),
    'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()),
    'ApiGenericType': TypeInfo(TypeOf.Class, create:() => ApiGenericType()),
    'GetCustomCategoryItemsResposeDto': TypeInfo(TypeOf.Class, create:() => GetCustomCategoryItemsResposeDto()),
    'List<ApiGenericType>': TypeInfo(TypeOf.Class, create:() => <ApiGenericType>[]),
    'GetCustomCategoryItemsResponse': TypeInfo(TypeOf.Class, create:() => GetCustomCategoryItemsResponse()),
});

Dart GetCustomCategoryItemsRequest 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/custom-category/items HTTP/1.1 
Host: www.clubready.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"CategoryItems":[{"Id":0,"Name":"String","StoreId":0,"ChainId":0}],"Success":false,"Message":"String"}