GET | /scheduling/class-category | Retrieve a list of Class Categories available to a store or chain |
---|
import 'package:servicestack/servicestack.dart';
class ClassCategoryRequestDto implements IConvertible
{
int? StoreId;
int? ChainId;
ClassCategoryRequestDto({this.StoreId,this.ChainId});
ClassCategoryRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
StoreId = json['StoreId'];
ChainId = json['ChainId'];
return this;
}
Map<String, dynamic> toJson() => {
'StoreId': StoreId,
'ChainId': ChainId
};
getTypeName() => "ClassCategoryRequestDto";
TypeContext? context = _ctx;
}
enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
class ClassCategoriesRequest extends ClassCategoryRequestDto 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 or Chain Id is required
*/
// @ApiMember(DataType="int", Description="Store Id or Chain Id is required", Name="StoreId", ParameterType="query")
int? StoreId;
/**
* Store Id or Chain Id is required
*/
// @ApiMember(DataType="integer", Description="Store Id or Chain Id is required", Name="ChainId", ParameterType="query")
int? ChainId;
int? RestrictedId;
RestrictedResourceType? RestrictedResourceType;
ClassCategoriesRequest({this.ApiKey,this.StoreId,this.ChainId,this.RestrictedId,this.RestrictedResourceType});
ClassCategoriesRequest.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() => "ClassCategoriesRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
'ClassCategoryRequestDto': TypeInfo(TypeOf.Class, create:() => ClassCategoryRequestDto()),
'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
'ClassCategoriesRequest': TypeInfo(TypeOf.Class, create:() => ClassCategoriesRequest()),
});
Dart ClassCategoriesRequest 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 /scheduling/class-category HTTP/1.1 Host: clubready.com Accept: application/json