/* Options: Date: 2024-05-14 10:37:01 Version: 6.50 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://www.clubready.com/api/current //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: ClubVisitHistoryRequest.* //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 ClubVisitHistoryRequestDto extends ApiDtoBase implements IConvertible { DateTime? FromDate; DateTime? ToDate; ClubVisitHistoryRequestDto({this.FromDate,this.ToDate}); ClubVisitHistoryRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!); ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!); return this; } Map toJson() => super.toJson()..addAll({ 'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!), 'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!) }); getTypeName() => "ClubVisitHistoryRequestDto"; TypeContext? context = _ctx; } class ClubVisitHistoryItem implements IConvertible { int? CheckinLogId; int? UserId; String? FirstName; String? LastName; int? CheckinStoreId; String? CheckinLocationName; int? HomeStoreId; String? HomeStoreLocationName; DateTime? UtcTime; ClubVisitHistoryItem({this.CheckinLogId,this.UserId,this.FirstName,this.LastName,this.CheckinStoreId,this.CheckinLocationName,this.HomeStoreId,this.HomeStoreLocationName,this.UtcTime}); ClubVisitHistoryItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CheckinLogId = json['CheckinLogId']; UserId = json['UserId']; FirstName = json['FirstName']; LastName = json['LastName']; CheckinStoreId = json['CheckinStoreId']; CheckinLocationName = json['CheckinLocationName']; HomeStoreId = json['HomeStoreId']; HomeStoreLocationName = json['HomeStoreLocationName']; UtcTime = JsonConverters.fromJson(json['UtcTime'],'DateTime',context!); return this; } Map toJson() => { 'CheckinLogId': CheckinLogId, 'UserId': UserId, 'FirstName': FirstName, 'LastName': LastName, 'CheckinStoreId': CheckinStoreId, 'CheckinLocationName': CheckinLocationName, 'HomeStoreId': HomeStoreId, 'HomeStoreLocationName': HomeStoreLocationName, 'UtcTime': JsonConverters.toJson(UtcTime,'DateTime',context!) }; getTypeName() => "ClubVisitHistoryItem"; TypeContext? context = _ctx; } class ApiResponseBase implements IConvertible { bool? Success; String? Message; ApiResponseBase({this.Success,this.Message}); ApiResponseBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Success = json['Success']; Message = json['Message']; return this; } Map toJson() => { 'Success': Success, 'Message': Message }; getTypeName() => "ApiResponseBase"; TypeContext? context = _ctx; } class ClubVisitHistoryResponseDto extends ApiResponseBase implements IConvertible { int? TotalVisits; List? Visits; ClubVisitHistoryResponseDto({this.TotalVisits,this.Visits}); ClubVisitHistoryResponseDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); TotalVisits = json['TotalVisits']; Visits = JsonConverters.fromJson(json['Visits'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'TotalVisits': TotalVisits, 'Visits': JsonConverters.toJson(Visits,'List',context!) }); getTypeName() => "ClubVisitHistoryResponseDto"; TypeContext? context = _ctx; } class ClubVisitHistoryResponse extends ClubVisitHistoryResponseDto implements IConvertible { bool? Success; String? Message; int? TotalVisits; List? Visits; ClubVisitHistoryResponse({this.Success,this.Message,this.TotalVisits,this.Visits}); ClubVisitHistoryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Success = json['Success']; Message = json['Message']; TotalVisits = json['TotalVisits']; Visits = JsonConverters.fromJson(json['Visits'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'Success': Success, 'Message': Message, 'TotalVisits': TotalVisits, 'Visits': JsonConverters.toJson(Visits,'List',context!) }); getTypeName() => "ClubVisitHistoryResponse"; TypeContext? context = _ctx; } // @Route("/club/visit-history", "GET") class ClubVisitHistoryRequest extends ClubVisitHistoryRequestDto implements IReturn, 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; /** * Either StoreId or ChainId is required */ // @ApiMember(DataType="integer", Description="Either StoreId or ChainId is required", Name="StoreId", ParameterType="query") int? StoreId; /** * Either StoreId or ChainId is required */ // @ApiMember(DataType="integer", Description="Either StoreId or ChainId is required", Name="ChainId", ParameterType="query") int? ChainId; /** * 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; ClubVisitHistoryRequest({this.ApiKey,this.StoreId,this.ChainId,this.FromDate,this.ToDate,this.RestrictedId,this.RestrictedResourceType}); ClubVisitHistoryRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; 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, 'StoreId': StoreId, 'ChainId': ChainId, 'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!), 'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!), 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => ClubVisitHistoryResponse(); getResponseTypeName() => "ClubVisitHistoryResponse"; getTypeName() => "ClubVisitHistoryRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'www.clubready.com', types: { 'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values), 'IRestrictedApiRequest': TypeInfo(TypeOf.Interface), 'IApiKeyEndpoint': TypeInfo(TypeOf.Interface), 'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()), 'ClubVisitHistoryRequestDto': TypeInfo(TypeOf.Class, create:() => ClubVisitHistoryRequestDto()), 'ClubVisitHistoryItem': TypeInfo(TypeOf.Class, create:() => ClubVisitHistoryItem()), 'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()), 'ClubVisitHistoryResponseDto': TypeInfo(TypeOf.Class, create:() => ClubVisitHistoryResponseDto()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ClubVisitHistoryResponse': TypeInfo(TypeOf.Class, create:() => ClubVisitHistoryResponse()), 'ClubVisitHistoryRequest': TypeInfo(TypeOf.Class, create:() => ClubVisitHistoryRequest()), });