ClubReady Api

<back to all web services

PasswordResetRequest

The following routes are available for this service:
POST/users/passwordresetSend password reset email to 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 PasswordResetRequestDto extends ApiDtoBase implements IConvertible
{
    String? Email;
    String? Username;
    int? Filter;

    PasswordResetRequestDto({this.Email,this.Username,this.Filter});
    PasswordResetRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Email = json['Email'];
        Username = json['Username'];
        Filter = json['Filter'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Email': Email,
        'Username': Username,
        'Filter': Filter
    });

    getTypeName() => "PasswordResetRequestDto";
    TypeContext? context = _ctx;
}

enum RestrictedResourceType
{
    Store,
    Chain,
    User,
    Undefined,
}

class PasswordResetRequest extends PasswordResetRequestDto 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", Name="UserName", ParameterType="query")
    String? Username;

    /**
    * User's email address.
    */
    // @ApiMember(DataType="string", Description="User's email address.", Name="Email", ParameterType="query")
    String? Email;

    /**
    * 0 = All, 1 = Prospects, 2 = Active, 3 = Inactive, 4 = All Members, 5 = Past Due
    */
    // @ApiMember(DataType="integer", Description="0 = All, 1 = Prospects, 2 = Active, 3 = Inactive, 4 = All Members, 5 = Past Due", Name="Filter", ParameterType="query")
    int? Filter;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

    PasswordResetRequest({this.ApiKey,this.StoreId,this.ChainId,this.Username,this.Email,this.Filter,this.RestrictedId,this.RestrictedResourceType});
    PasswordResetRequest.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'];
        Email = json['Email'];
        Filter = json['Filter'];
        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,
        'Email': Email,
        'Filter': Filter,
        'RestrictedId': RestrictedId,
        'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
    });

    getTypeName() => "PasswordResetRequest";
    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 PasswordResetResponseDto extends ApiResponseBase implements IConvertible
{
    PasswordResetResponseDto();
    PasswordResetResponseDto.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "PasswordResetResponseDto";
    TypeContext? context = _ctx;
}

class PasswordResetResponse extends PasswordResetResponseDto implements IConvertible
{
    bool? Success;
    String? Message;

    PasswordResetResponse({this.Success,this.Message});
    PasswordResetResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Success = json['Success'];
        Message = json['Message'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Success': Success,
        'Message': Message
    });

    getTypeName() => "PasswordResetResponse";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'PasswordResetRequestDto': TypeInfo(TypeOf.Class, create:() => PasswordResetRequestDto()),
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'PasswordResetRequest': TypeInfo(TypeOf.Class, create:() => PasswordResetRequest()),
    'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()),
    'PasswordResetResponseDto': TypeInfo(TypeOf.Class, create:() => PasswordResetResponseDto()),
    'PasswordResetResponse': TypeInfo(TypeOf.Class, create:() => PasswordResetResponse()),
});

Dart PasswordResetRequest 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

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /users/passwordreset HTTP/1.1 
Host: clubready.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ApiKey":"String","StoreId":0,"ChainId":0,"Username":"String","Email":"String","Filter":0,"RestrictedId":0,"RestrictedResourceType":"Chain"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Success":false,"Message":"String"}