/* Options: Date: 2024-11-24 14:49:24 Version: 6.50 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://clubready.com/api/current //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: UserVisitHistoryRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum RestrictedResourceType { Store, Chain, User, Undefined, } abstract class IRestrictedApiRequest extends IApiKeyEndpoint { int? RestrictedId; RestrictedResourceType? RestrictedResourceType; } abstract class IApiKeyEndpoint { String? ApiKey; } class ApiDtoBase implements IConvertible { String? ApiKey; int? StoreId; int? ChainId; ApiDtoBase({this.ApiKey,this.StoreId,this.ChainId}); ApiDtoBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ApiKey = json['ApiKey']; StoreId = json['StoreId']; ChainId = json['ChainId']; return this; } Map toJson() => { 'ApiKey': ApiKey, 'StoreId': StoreId, 'ChainId': ChainId }; getTypeName() => "ApiDtoBase"; TypeContext? context = _ctx; } class UserVisitHistoryRequestDto extends ApiDtoBase implements IConvertible { int? UserId; DateTime? FromDate; DateTime? ToDate; UserVisitHistoryRequestDto({this.UserId,this.FromDate,this.ToDate}); UserVisitHistoryRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); UserId = json['UserId']; FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!); ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!); return this; } Map toJson() => super.toJson()..addAll({ 'UserId': UserId, 'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!), 'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!) }); getTypeName() => "UserVisitHistoryRequestDto"; TypeContext? context = _ctx; } /** * Gets user check-in history based on a date range. Max 31 days. */ // @Route("/users/{UserId}/visit-history", "GET") // @Api(Description="Gets user check-in history based on a date range. Max 31 days.") class UserVisitHistoryRequest extends UserVisitHistoryRequestDto 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; /** * */ // @ApiMember(DataType="integer", Description="", IsRequired=true, Name="UserId", ParameterType="query") int? UserId; /** * StoreId OR ChainId is required */ // @ApiMember(DataType="string", 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; /** * (Format:YYYY-MM-DD) */ // @ApiMember(DataType="date", Description="(Format:YYYY-MM-DD)", IsRequired=true, Name="FromDate", ParameterType="query") DateTime? FromDate; /** * Max 31 Days (Format:YYYY-MM-DD) */ // @ApiMember(DataType="date", Description="Max 31 Days (Format:YYYY-MM-DD)", IsRequired=true, Name="ToDate", ParameterType="query") DateTime? ToDate; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; UserVisitHistoryRequest({this.ApiKey,this.UserId,this.StoreId,this.ChainId,this.FromDate,this.ToDate,this.RestrictedId,this.RestrictedResourceType}); UserVisitHistoryRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; UserId = json['UserId']; StoreId = json['StoreId']; ChainId = json['ChainId']; 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 toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'UserId': UserId, 'StoreId': StoreId, 'ChainId': ChainId, 'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!), 'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!), 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); getTypeName() => "UserVisitHistoryRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'clubready.com', types: { 'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values), 'IRestrictedApiRequest': TypeInfo(TypeOf.Interface), 'IApiKeyEndpoint': TypeInfo(TypeOf.Interface), 'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()), 'UserVisitHistoryRequestDto': TypeInfo(TypeOf.Class, create:() => UserVisitHistoryRequestDto()), 'UserVisitHistoryRequest': TypeInfo(TypeOf.Class, create:() => UserVisitHistoryRequest()), });