GET | /users/find/login-details | Verify a user's login details. |
---|
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 UserFindByLoginRequestDto extends ApiDtoBase implements IConvertible
{
int? UserId;
String? UserName;
String? Password;
UserFindByLoginRequestDto({this.UserId,this.UserName,this.Password});
UserFindByLoginRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
UserId = json['UserId'];
UserName = json['UserName'];
Password = json['Password'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'UserId': UserId,
'UserName': UserName,
'Password': Password
});
getTypeName() => "UserFindByLoginRequestDto";
TypeContext? context = _ctx;
}
enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
class UserFindByLoginRequest extends UserFindByLoginRequestDto 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 username
*/
// @ApiMember(DataType="string", Description="ClubReady username", IsRequired=true, Name="UserName", ParameterType="query")
String? UserName;
/**
* ClubReady password
*/
// @ApiMember(DataType="string", Description="ClubReady password", IsRequired=true, Name="Password", ParameterType="query")
String? Password;
int? RestrictedId;
RestrictedResourceType? RestrictedResourceType;
UserFindByLoginRequest({this.ApiKey,this.StoreId,this.ChainId,this.UserName,this.Password,this.RestrictedId,this.RestrictedResourceType});
UserFindByLoginRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ApiKey = json['ApiKey'];
StoreId = json['StoreId'];
ChainId = json['ChainId'];
UserName = json['UserName'];
Password = json['Password'];
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,
'UserName': UserName,
'Password': Password,
'RestrictedId': RestrictedId,
'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
});
getTypeName() => "UserFindByLoginRequest";
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 UserFindByLoginResponseDto extends ApiResponseBase implements IConvertible
{
int? HomeStoreId;
int? UserId;
UserFindByLoginResponseDto({this.HomeStoreId,this.UserId});
UserFindByLoginResponseDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
HomeStoreId = json['HomeStoreId'];
UserId = json['UserId'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'HomeStoreId': HomeStoreId,
'UserId': UserId
});
getTypeName() => "UserFindByLoginResponseDto";
TypeContext? context = _ctx;
}
class UserFindByLoginResponse extends UserFindByLoginResponseDto implements IConvertible
{
int? HomeStoreId;
int? UserId;
UserFindByLoginResponse({this.HomeStoreId,this.UserId});
UserFindByLoginResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
HomeStoreId = json['HomeStoreId'];
UserId = json['UserId'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'HomeStoreId': HomeStoreId,
'UserId': UserId
});
getTypeName() => "UserFindByLoginResponse";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
'UserFindByLoginRequestDto': TypeInfo(TypeOf.Class, create:() => UserFindByLoginRequestDto()),
'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
'UserFindByLoginRequest': TypeInfo(TypeOf.Class, create:() => UserFindByLoginRequest()),
'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()),
'UserFindByLoginResponseDto': TypeInfo(TypeOf.Class, create:() => UserFindByLoginResponseDto()),
'UserFindByLoginResponse': TypeInfo(TypeOf.Class, create:() => UserFindByLoginResponse()),
});
Dart UserFindByLoginRequest 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/find/login-details HTTP/1.1 Host: clubready.com Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"HomeStoreId":0,"UserId":0,"Success":false,"Message":"String"}