GET | /users/find | Find a member. |
---|
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 SearchUsersRequestDto extends ApiDtoBase implements IConvertible
{
String? Barcode;
String? FirstName;
String? LastName;
String? Email;
String? Phone;
int? UserType;
int? Page;
SearchUsersRequestDto({this.Barcode,this.FirstName,this.LastName,this.Email,this.Phone,this.UserType,this.Page});
SearchUsersRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Barcode = json['Barcode'];
FirstName = json['FirstName'];
LastName = json['LastName'];
Email = json['Email'];
Phone = json['Phone'];
UserType = json['UserType'];
Page = json['Page'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Barcode': Barcode,
'FirstName': FirstName,
'LastName': LastName,
'Email': Email,
'Phone': Phone,
'UserType': UserType,
'Page': Page
});
getTypeName() => "SearchUsersRequestDto";
TypeContext? context = _ctx;
}
enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
class SearchUsersRequest extends SearchUsersRequestDto 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;
/**
* Filter by First Name
*/
// @ApiMember(DataType="string", Description="Filter by First Name", Name="FirstName", ParameterType="query")
String? FirstName;
/**
* Filter by Last Name
*/
// @ApiMember(DataType="string", Description="Filter by Last Name", Name="LastName", ParameterType="query")
String? LastName;
/**
* StoreId OR ChainId is required
*/
// @ApiMember(DataType="integer", Description="StoreId OR ChainId is required", Name="StoreId", ParameterType="query")
int? StoreId;
/**
* StoreId OR ChainId is required
*/
// @ApiMember(DataType="string", Description="StoreId OR ChainId is required", Name="ChainId", ParameterType="query")
int? ChainId;
/**
* Filter by barcode
*/
// @ApiMember(DataType="string", Description="Filter by barcode", Name="Barcode", ParameterType="query")
String? Barcode;
/**
* Filter by Email Address
*/
// @ApiMember(DataType="string", Description="Filter by Email Address", Name="Email", ParameterType="query")
String? Email;
/**
* Filter by Phone Number
*/
// @ApiMember(DataType="string", Description="Filter by Phone Number", Name="Phone", ParameterType="query")
String? Phone;
/**
* Filter by ClubReady User Type
*/
// @ApiMember(DataType="integer", Description="Filter by ClubReady User Type", Name="UserType", ParameterType="query")
int? UserType;
/**
* Page of users to retrieve. Pulls back 100 users per page.
*/
// @ApiMember(DataType="integer", Description="Page of users to retrieve. Pulls back 100 users per page.", Name="Page", ParameterType="query")
int? Page;
int? RestrictedId;
RestrictedResourceType? RestrictedResourceType;
SearchUsersRequest({this.ApiKey,this.FirstName,this.LastName,this.StoreId,this.ChainId,this.Barcode,this.Email,this.Phone,this.UserType,this.Page,this.RestrictedId,this.RestrictedResourceType});
SearchUsersRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ApiKey = json['ApiKey'];
FirstName = json['FirstName'];
LastName = json['LastName'];
StoreId = json['StoreId'];
ChainId = json['ChainId'];
Barcode = json['Barcode'];
Email = json['Email'];
Phone = json['Phone'];
UserType = json['UserType'];
Page = json['Page'];
RestrictedId = json['RestrictedId'];
RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'ApiKey': ApiKey,
'FirstName': FirstName,
'LastName': LastName,
'StoreId': StoreId,
'ChainId': ChainId,
'Barcode': Barcode,
'Email': Email,
'Phone': Phone,
'UserType': UserType,
'Page': Page,
'RestrictedId': RestrictedId,
'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
});
getTypeName() => "SearchUsersRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
'SearchUsersRequestDto': TypeInfo(TypeOf.Class, create:() => SearchUsersRequestDto()),
'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
'SearchUsersRequest': TypeInfo(TypeOf.Class, create:() => SearchUsersRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /users/find HTTP/1.1 Host: clubready.com Accept: text/jsv