/* Options: Date: 2024-05-14 23:33:08 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: CreditDetailRequest.* //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 SessionCreditDetail implements IConvertible { int? ServiceId; int? SessionSizeId; int? ClassId; String? Name; int? Total; int? Available; int? StoreId; SessionCreditDetail({this.ServiceId,this.SessionSizeId,this.ClassId,this.Name,this.Total,this.Available,this.StoreId}); SessionCreditDetail.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ServiceId = json['ServiceId']; SessionSizeId = json['SessionSizeId']; ClassId = json['ClassId']; Name = json['Name']; Total = json['Total']; Available = json['Available']; StoreId = json['StoreId']; return this; } Map toJson() => { 'ServiceId': ServiceId, 'SessionSizeId': SessionSizeId, 'ClassId': ClassId, 'Name': Name, 'Total': Total, 'Available': Available, 'StoreId': StoreId }; getTypeName() => "SessionCreditDetail"; 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 CreditDetailResponseDto extends ApiResponseBase implements IConvertible { int? TotalPurchased; int? TotalAvailable; List? Credits; CreditDetailResponseDto({this.TotalPurchased,this.TotalAvailable,this.Credits}); CreditDetailResponseDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); TotalPurchased = json['TotalPurchased']; TotalAvailable = json['TotalAvailable']; Credits = JsonConverters.fromJson(json['Credits'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'TotalPurchased': TotalPurchased, 'TotalAvailable': TotalAvailable, 'Credits': JsonConverters.toJson(Credits,'List',context!) }); getTypeName() => "CreditDetailResponseDto"; TypeContext? context = _ctx; } class CreditDetailResponse extends CreditDetailResponseDto implements IConvertible { bool? Success; String? Message; int? TotalPurchased; int? TotalAvailable; List? Credits; CreditDetailResponse({this.Success,this.Message,this.TotalPurchased,this.TotalAvailable,this.Credits}); CreditDetailResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Success = json['Success']; Message = json['Message']; TotalPurchased = json['TotalPurchased']; TotalAvailable = json['TotalAvailable']; Credits = JsonConverters.fromJson(json['Credits'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'Success': Success, 'Message': Message, 'TotalPurchased': TotalPurchased, 'TotalAvailable': TotalAvailable, 'Credits': JsonConverters.toJson(Credits,'List',context!) }); getTypeName() => "CreditDetailResponse"; TypeContext? context = _ctx; } // @Route("/scheduling/{UserId}/credit-detail", "GET") class CreditDetailRequest extends ApiDtoBase 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; /** * 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; /** * ClubReady User ID */ // @ApiMember(DataType="integer", Description="ClubReady User ID", IsRequired=true, Name="UserId", ParameterType="path") int? UserId; /** * Determines if the list of the user's credits are broken out by store ID. */ // @ApiMember(DataType="Boolean", Description="Determines if the list of the user's credits are broken out by store ID.", Name="FullDetail", ParameterType="query") bool? FullDetail; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; CreditDetailRequest({this.ApiKey,this.ChainId,this.StoreId,this.UserId,this.FullDetail,this.RestrictedId,this.RestrictedResourceType}); CreditDetailRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; ChainId = json['ChainId']; StoreId = json['StoreId']; UserId = json['UserId']; FullDetail = json['FullDetail']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'ChainId': ChainId, 'StoreId': StoreId, 'UserId': UserId, 'FullDetail': FullDetail, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => CreditDetailResponse(); getResponseTypeName() => "CreditDetailResponse"; getTypeName() => "CreditDetailRequest"; 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()), 'SessionCreditDetail': TypeInfo(TypeOf.Class, create:() => SessionCreditDetail()), 'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()), 'CreditDetailResponseDto': TypeInfo(TypeOf.Class, create:() => CreditDetailResponseDto()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CreditDetailResponse': TypeInfo(TypeOf.Class, create:() => CreditDetailResponse()), 'CreditDetailRequest': TypeInfo(TypeOf.Class, create:() => CreditDetailRequest()), });