GET | /users/{UserId}/online-cancel | Get an online cancellation link for a user |
---|
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 UserOnlineCancelRequestDto extends ApiDtoBase implements IConvertible
{
int? UserId;
UserOnlineCancelRequestDto({this.UserId});
UserOnlineCancelRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
UserId = json['UserId'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'UserId': UserId
});
getTypeName() => "UserOnlineCancelRequestDto";
TypeContext? context = _ctx;
}
enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
class UserOnlineCancelRequest extends UserOnlineCancelRequestDto 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;
/**
*
*/
// @ApiMember(DataType="integer", Description="", IsRequired=true, Name="UserId", ParameterType="query")
int? UserId;
/**
* StoreId of the user's home club
*/
// @ApiMember(DataType="integer", Description="StoreId of the user's home club", IsRequired=true, Name="StoreId", ParameterType="query")
int? StoreId;
/**
*
*/
// @ApiMember(DataType="integer", Description="", Name="ChainId", ParameterType="query")
int? ChainId;
int? RestrictedId;
RestrictedResourceType? RestrictedResourceType;
UserOnlineCancelRequest({this.ApiKey,this.UserId,this.StoreId,this.ChainId,this.RestrictedId,this.RestrictedResourceType});
UserOnlineCancelRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ApiKey = json['ApiKey'];
UserId = json['UserId'];
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,
'UserId': UserId,
'StoreId': StoreId,
'ChainId': ChainId,
'RestrictedId': RestrictedId,
'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
});
getTypeName() => "UserOnlineCancelRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
'UserOnlineCancelRequestDto': TypeInfo(TypeOf.Class, create:() => UserOnlineCancelRequestDto()),
'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
'UserOnlineCancelRequest': TypeInfo(TypeOf.Class, create:() => UserOnlineCancelRequest()),
});
Dart UserOnlineCancelRequest 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/{UserId}/online-cancel HTTP/1.1 Host: clubready.com Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length null