ClubReady Api

<back to all web services

UserAccountInfoRequest

The following routes are available for this service:
GET/users/{UserId}Get user account summary
import 'package:servicestack/servicestack.dart';

class ApiDtoBase implements IConvertible
{
    int? ChainId;
    String? ApiKey;
    int? StoreId;

    ApiDtoBase({this.ChainId,this.ApiKey,this.StoreId});
    ApiDtoBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ChainId = json['ChainId'];
        ApiKey = json['ApiKey'];
        StoreId = json['StoreId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ChainId': ChainId,
        'ApiKey': ApiKey,
        'StoreId': StoreId
    };

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

class UserAccountInfoRequestDto extends ApiDtoBase implements IConvertible
{
    int? UserId;
    bool? FullDetail;

    UserAccountInfoRequestDto({this.UserId,this.FullDetail});
    UserAccountInfoRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

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

class UserAccountInfoRequest extends UserAccountInfoRequestDto 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;

    /**
    * (debug id) Jen A = 28975
    */
    // @ApiMember(DataType="integer", Description="(debug id) Jen A = 28975", IsRequired=true, Name="UserId", ParameterType="query")
    int? UserId;

    /**
    * 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="integer", Description="StoreId OR ChainId is required", Name="ChainId", ParameterType="query")
    int? ChainId;

    /**
    * Whether you want full detail to be returned or a basic User object. (Format: true|false(default))
    */
    // @ApiMember(DataType="Boolean", Description="Whether you want full detail to be returned or a basic User object. (Format: true|false(default))", Name="FullDetail", ParameterType="query")
    bool? FullDetail;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

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

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

TypeContext _ctx = TypeContext(library: 'www.clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'UserAccountInfoRequestDto': TypeInfo(TypeOf.Class, create:() => UserAccountInfoRequestDto()),
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'UserAccountInfoRequest': TypeInfo(TypeOf.Class, create:() => UserAccountInfoRequest()),
});

Dart UserAccountInfoRequest DTOs

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

HTTP + XML

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

GET /users/{UserId} HTTP/1.1 
Host: www.clubready.com 
Accept: application/xml