ClubReady Api

<back to all web services

UserListDateAddedRequest

The following routes are available for this service:
GET/users/date-addedList of users added in a certain date range.
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 UserListDateAddedRequestDto extends ApiDtoBase implements IConvertible
{
    DateTime? FromDate;
    DateTime? ToDate;

    UserListDateAddedRequestDto({this.FromDate,this.ToDate});
    UserListDateAddedRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!);
        ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!),
        'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!)
    });

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

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

class UserListDateAddedRequest extends UserListDateAddedRequestDto 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;

    /**
    * Chain ID
    */
    // @ApiMember(DataType="integer", Description="Chain ID", Name="ChainId", ParameterType="query")
    int? ChainId;

    /**
    * Store ID
    */
    // @ApiMember(DataType="integer", Description="Store ID", Name="StoreId", ParameterType="query")
    int? StoreId;

    /**
    * UTC Format
    */
    // @ApiMember(DataType="date", Description="UTC Format", IsRequired=true, Name="FromDate", ParameterType="query")
    DateTime? FromDate;

    /**
    * Max 24 Hours (UTC Format)
    */
    // @ApiMember(DataType="date", Description="Max 24 Hours (UTC Format)", IsRequired=true, Name="ToDate", ParameterType="query")
    DateTime? ToDate;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

    UserListDateAddedRequest({this.ApiKey,this.ChainId,this.StoreId,this.FromDate,this.ToDate,this.RestrictedId,this.RestrictedResourceType});
    UserListDateAddedRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        ApiKey = json['ApiKey'];
        ChainId = json['ChainId'];
        StoreId = json['StoreId'];
        FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!);
        ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!);
        RestrictedId = json['RestrictedId'];
        RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ApiKey': ApiKey,
        'ChainId': ChainId,
        'StoreId': StoreId,
        'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!),
        'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!),
        'RestrictedId': RestrictedId,
        'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
    });

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

class ClubClient implements IConvertible
{
    int? UserId;
    String? Username;
    String? FirstName;
    String? LastName;
    int? StoreId;
    DateTime? DateAdded;
    int? ReferredBy;
    int? AddedBy;
    int? ReferralTypeId;
    String? ReferralTypeName;

    ClubClient({this.UserId,this.Username,this.FirstName,this.LastName,this.StoreId,this.DateAdded,this.ReferredBy,this.AddedBy,this.ReferralTypeId,this.ReferralTypeName});
    ClubClient.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        UserId = json['UserId'];
        Username = json['Username'];
        FirstName = json['FirstName'];
        LastName = json['LastName'];
        StoreId = json['StoreId'];
        DateAdded = JsonConverters.fromJson(json['DateAdded'],'DateTime',context!);
        ReferredBy = json['ReferredBy'];
        AddedBy = json['AddedBy'];
        ReferralTypeId = json['ReferralTypeId'];
        ReferralTypeName = json['ReferralTypeName'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'UserId': UserId,
        'Username': Username,
        'FirstName': FirstName,
        'LastName': LastName,
        'StoreId': StoreId,
        'DateAdded': JsonConverters.toJson(DateAdded,'DateTime',context!),
        'ReferredBy': ReferredBy,
        'AddedBy': AddedBy,
        'ReferralTypeId': ReferralTypeId,
        'ReferralTypeName': ReferralTypeName
    };

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

class UserListDateAddedResponseDto implements IConvertible
{
    List<ClubClient>? Users;

    UserListDateAddedResponseDto({this.Users});
    UserListDateAddedResponseDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Users = JsonConverters.fromJson(json['Users'],'List<ClubClient>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Users': JsonConverters.toJson(Users,'List<ClubClient>',context!)
    };

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

class UserListDateAddedResponse extends UserListDateAddedResponseDto implements IConvertible
{
    List<ClubClient>? Users;

    UserListDateAddedResponse({this.Users});
    UserListDateAddedResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Users = JsonConverters.fromJson(json['Users'],'List<ClubClient>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Users': JsonConverters.toJson(Users,'List<ClubClient>',context!)
    });

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

TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'UserListDateAddedRequestDto': TypeInfo(TypeOf.Class, create:() => UserListDateAddedRequestDto()),
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'UserListDateAddedRequest': TypeInfo(TypeOf.Class, create:() => UserListDateAddedRequest()),
    'ClubClient': TypeInfo(TypeOf.Class, create:() => ClubClient()),
    'UserListDateAddedResponseDto': TypeInfo(TypeOf.Class, create:() => UserListDateAddedResponseDto()),
    'List<ClubClient>': TypeInfo(TypeOf.Class, create:() => <ClubClient>[]),
    'UserListDateAddedResponse': TypeInfo(TypeOf.Class, create:() => UserListDateAddedResponse()),
});

Dart UserListDateAddedRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

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

GET /users/date-added HTTP/1.1 
Host: clubready.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Users":[{"UserId":0,"Username":"String","FirstName":"String","LastName":"String","StoreId":0,"DateAdded":"0001-01-01T00:00:00.0000000","ReferredBy":0,"AddedBy":0,"ReferralTypeId":0,"ReferralTypeName":"String"}]}