GET | /users/custom-category | List of a user's items for custom categories. |
---|
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 GetCustomCategoriesUserRequestDto extends ApiDtoBase implements IConvertible
{
int? UserId;
int? CustomCategoryId;
GetCustomCategoriesUserRequestDto({this.UserId,this.CustomCategoryId});
GetCustomCategoriesUserRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
UserId = json['UserId'];
CustomCategoryId = json['CustomCategoryId'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'UserId': UserId,
'CustomCategoryId': CustomCategoryId
});
getTypeName() => "GetCustomCategoriesUserRequestDto";
TypeContext? context = _ctx;
}
enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
class GetCustomCategoriesUserRequest extends GetCustomCategoriesUserRequestDto 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;
/**
* ClubReady Club ID (StoreID internally)
*/
// @ApiMember(DataType="integer", Description="ClubReady Club ID (StoreID internally)", Name="StoreId", ParameterType="query")
int? StoreId;
/**
* StoreId OR ChainId is required
*/
// @ApiMember(DataType="integer", Description="StoreId OR ChainId is required", Name="ChainId", ParameterType="query")
int? ChainId;
/**
* ClubReady User ID
*/
// @ApiMember(DataType="integer", Description="ClubReady User ID", IsRequired=true, Name="UserId", ParameterType="query")
int? UserId;
/**
* Custom Category ID
*/
// @ApiMember(DataType="integer", Description="Custom Category ID", Name="CustomCategoryId", ParameterType="query")
int? CustomCategoryId;
int? RestrictedId;
RestrictedResourceType? RestrictedResourceType;
GetCustomCategoriesUserRequest({this.ApiKey,this.StoreId,this.ChainId,this.UserId,this.CustomCategoryId,this.RestrictedId,this.RestrictedResourceType});
GetCustomCategoriesUserRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ApiKey = json['ApiKey'];
StoreId = json['StoreId'];
ChainId = json['ChainId'];
UserId = json['UserId'];
CustomCategoryId = json['CustomCategoryId'];
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,
'UserId': UserId,
'CustomCategoryId': CustomCategoryId,
'RestrictedId': RestrictedId,
'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
});
getTypeName() => "GetCustomCategoriesUserRequest";
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 CustomCategoryItemInfo implements IConvertible
{
int? CustomCategoryId;
String? CustomCategoryName;
int? CustomCategoryItemId;
String? CustomCategoryItemName;
CustomCategoryItemInfo({this.CustomCategoryId,this.CustomCategoryName,this.CustomCategoryItemId,this.CustomCategoryItemName});
CustomCategoryItemInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CustomCategoryId = json['CustomCategoryId'];
CustomCategoryName = json['CustomCategoryName'];
CustomCategoryItemId = json['CustomCategoryItemId'];
CustomCategoryItemName = json['CustomCategoryItemName'];
return this;
}
Map<String, dynamic> toJson() => {
'CustomCategoryId': CustomCategoryId,
'CustomCategoryName': CustomCategoryName,
'CustomCategoryItemId': CustomCategoryItemId,
'CustomCategoryItemName': CustomCategoryItemName
};
getTypeName() => "CustomCategoryItemInfo";
TypeContext? context = _ctx;
}
class GetCustomCategoriesUserResponseDto extends ApiResponseBase implements IConvertible
{
int? UserId;
List<CustomCategoryItemInfo>? CustomCategories;
GetCustomCategoriesUserResponseDto({this.UserId,this.CustomCategories});
GetCustomCategoriesUserResponseDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
UserId = json['UserId'];
CustomCategories = JsonConverters.fromJson(json['CustomCategories'],'List<CustomCategoryItemInfo>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'UserId': UserId,
'CustomCategories': JsonConverters.toJson(CustomCategories,'List<CustomCategoryItemInfo>',context!)
});
getTypeName() => "GetCustomCategoriesUserResponseDto";
TypeContext? context = _ctx;
}
class GetCustomCategoriesUserResponse extends GetCustomCategoriesUserResponseDto implements IConvertible
{
int? UserId;
List<CustomCategoryItemInfo>? CustomCategories;
GetCustomCategoriesUserResponse({this.UserId,this.CustomCategories});
GetCustomCategoriesUserResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
UserId = json['UserId'];
CustomCategories = JsonConverters.fromJson(json['CustomCategories'],'List<CustomCategoryItemInfo>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'UserId': UserId,
'CustomCategories': JsonConverters.toJson(CustomCategories,'List<CustomCategoryItemInfo>',context!)
});
getTypeName() => "GetCustomCategoriesUserResponse";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
'GetCustomCategoriesUserRequestDto': TypeInfo(TypeOf.Class, create:() => GetCustomCategoriesUserRequestDto()),
'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
'GetCustomCategoriesUserRequest': TypeInfo(TypeOf.Class, create:() => GetCustomCategoriesUserRequest()),
'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()),
'CustomCategoryItemInfo': TypeInfo(TypeOf.Class, create:() => CustomCategoryItemInfo()),
'GetCustomCategoriesUserResponseDto': TypeInfo(TypeOf.Class, create:() => GetCustomCategoriesUserResponseDto()),
'List<CustomCategoryItemInfo>': TypeInfo(TypeOf.Class, create:() => <CustomCategoryItemInfo>[]),
'GetCustomCategoriesUserResponse': TypeInfo(TypeOf.Class, create:() => GetCustomCategoriesUserResponse()),
});
Dart GetCustomCategoriesUserRequest 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /users/custom-category HTTP/1.1 Host: clubready.com Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"UserId":0,"CustomCategories":[{"CustomCategoryId":0,"CustomCategoryName":"String","CustomCategoryItemId":0,"CustomCategoryItemName":"String"}],"Success":false,"Message":"String"}