/* Options: Date: 2024-05-13 18:12:52 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: CreditCheckRequest.* //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 CreditCheckRequestDto extends ApiDtoBase implements IConvertible { int? UserId; int? CustomerSessionId; int? ClassId; int? SessionSizeId; CreditCheckRequestDto({this.UserId,this.CustomerSessionId,this.ClassId,this.SessionSizeId}); CreditCheckRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); UserId = json['UserId']; CustomerSessionId = json['CustomerSessionId']; ClassId = json['ClassId']; SessionSizeId = json['SessionSizeId']; return this; } Map toJson() => super.toJson()..addAll({ 'UserId': UserId, 'CustomerSessionId': CustomerSessionId, 'ClassId': ClassId, 'SessionSizeId': SessionSizeId }); getTypeName() => "CreditCheckRequestDto"; 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 CreditCheckResponseDto extends ApiResponseBase implements IConvertible { bool? CanUse; CreditCheckResponseDto({this.CanUse}); CreditCheckResponseDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); CanUse = json['CanUse']; return this; } Map toJson() => super.toJson()..addAll({ 'CanUse': CanUse }); getTypeName() => "CreditCheckResponseDto"; TypeContext? context = _ctx; } class CreditCheckResponse extends CreditCheckResponseDto implements IConvertible { bool? Success; String? Message; bool? CanUse; CreditCheckResponse({this.Success,this.Message,this.CanUse}); CreditCheckResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Success = json['Success']; Message = json['Message']; CanUse = json['CanUse']; return this; } Map toJson() => super.toJson()..addAll({ 'Success': Success, 'Message': Message, 'CanUse': CanUse }); getTypeName() => "CreditCheckResponse"; TypeContext? context = _ctx; } // @Route("/scheduling/{UserId}/credit-check", "GET") class CreditCheckRequest extends CreditCheckRequestDto 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; /** * ClubReady Customer Session ID */ // @ApiMember(DataType="integer", Description="ClubReady Customer Session ID", IsRequired=true, Name="CustomerSessionId", ParameterType="query") int? CustomerSessionId; /** * ClubReady Class ID */ // @ApiMember(DataType="integer", Description="ClubReady Class ID", Name="ClassId", ParameterType="query") int? ClassId; /** * ClubReady Session Size ID */ // @ApiMember(DataType="integer", Description="ClubReady Session Size ID", Name="SessionSizeId", ParameterType="query") int? SessionSizeId; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; CreditCheckRequest({this.ApiKey,this.ChainId,this.StoreId,this.UserId,this.CustomerSessionId,this.ClassId,this.SessionSizeId,this.RestrictedId,this.RestrictedResourceType}); CreditCheckRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; ChainId = json['ChainId']; StoreId = json['StoreId']; UserId = json['UserId']; CustomerSessionId = json['CustomerSessionId']; ClassId = json['ClassId']; SessionSizeId = json['SessionSizeId']; 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, 'CustomerSessionId': CustomerSessionId, 'ClassId': ClassId, 'SessionSizeId': SessionSizeId, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => CreditCheckResponse(); getResponseTypeName() => "CreditCheckResponse"; getTypeName() => "CreditCheckRequest"; 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()), 'CreditCheckRequestDto': TypeInfo(TypeOf.Class, create:() => CreditCheckRequestDto()), 'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()), 'CreditCheckResponseDto': TypeInfo(TypeOf.Class, create:() => CreditCheckResponseDto()), 'CreditCheckResponse': TypeInfo(TypeOf.Class, create:() => CreditCheckResponse()), 'CreditCheckRequest': TypeInfo(TypeOf.Class, create:() => CreditCheckRequest()), });