/* Options: Date: 2024-11-24 13:38:21 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: PackageEligibilityRequest.* //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 PackageEligibilityRequestDto extends ApiDtoBase implements IConvertible { int? PackageId; int? MemberId; PackageEligibilityRequestDto({this.PackageId,this.MemberId}); PackageEligibilityRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); PackageId = json['PackageId']; MemberId = json['MemberId']; return this; } Map toJson() => super.toJson()..addAll({ 'PackageId': PackageId, 'MemberId': MemberId }); getTypeName() => "PackageEligibilityRequestDto"; TypeContext? context = _ctx; } class PackageEligibilityItem implements IConvertible { String? Name; String? Value; bool? IsEligible; String? Message; PackageEligibilityItem({this.Name,this.Value,this.IsEligible,this.Message}); PackageEligibilityItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Name = json['Name']; Value = json['Value']; IsEligible = json['IsEligible']; Message = json['Message']; return this; } Map toJson() => { 'Name': Name, 'Value': Value, 'IsEligible': IsEligible, 'Message': Message }; getTypeName() => "PackageEligibilityItem"; TypeContext? context = _ctx; } class PackageEligibility implements IConvertible { bool? IsEligible; List? Eligibility; PackageEligibility({this.IsEligible,this.Eligibility}); PackageEligibility.fromJson(Map json) { fromMap(json); } fromMap(Map json) { IsEligible = json['IsEligible']; Eligibility = JsonConverters.fromJson(json['Eligibility'],'List',context!); return this; } Map toJson() => { 'IsEligible': IsEligible, 'Eligibility': JsonConverters.toJson(Eligibility,'List',context!) }; getTypeName() => "PackageEligibility"; 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 PackageEligibilityResponseDto extends ApiResponseBase implements IConvertible { PackageEligibility? EligibilityInfo; PackageEligibilityResponseDto({this.EligibilityInfo}); PackageEligibilityResponseDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); EligibilityInfo = JsonConverters.fromJson(json['EligibilityInfo'],'PackageEligibility',context!); return this; } Map toJson() => super.toJson()..addAll({ 'EligibilityInfo': JsonConverters.toJson(EligibilityInfo,'PackageEligibility',context!) }); getTypeName() => "PackageEligibilityResponseDto"; TypeContext? context = _ctx; } class PackageEligibilityResponse extends PackageEligibilityResponseDto implements IConvertible { PackageEligibility? EligibilityInfo; PackageEligibilityResponse({this.EligibilityInfo}); PackageEligibilityResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); EligibilityInfo = JsonConverters.fromJson(json['EligibilityInfo'],'PackageEligibility',context!); return this; } Map toJson() => super.toJson()..addAll({ 'EligibilityInfo': JsonConverters.toJson(EligibilityInfo,'PackageEligibility',context!) }); getTypeName() => "PackageEligibilityResponse"; TypeContext? context = _ctx; } // @Route("/sales/members/{MemberId}/package-eligibility", "GET") class PackageEligibilityRequest extends PackageEligibilityRequestDto 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; /** * Store ID # member belongs to */ // @ApiMember(DataType="integer", Description="Store ID # member belongs to", IsRequired=true, Name="StoreId", ParameterType="query") int? StoreId; /** * ID of the member to lookup */ // @ApiMember(DataType="integer", Description="ID of the member to lookup", IsRequired=true, Name="MemberId", ParameterType="path") int? MemberId; /** * ID of the package to check */ // @ApiMember(DataType="integer", Description="ID of the package to check", IsRequired=true, Name="PackageId", ParameterType="query") int? PackageId; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; PackageEligibilityRequest({this.ApiKey,this.StoreId,this.MemberId,this.PackageId,this.RestrictedId,this.RestrictedResourceType}); PackageEligibilityRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; MemberId = json['MemberId']; PackageId = json['PackageId']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, 'MemberId': MemberId, 'PackageId': PackageId, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => PackageEligibilityResponse(); getResponseTypeName() => "PackageEligibilityResponse"; getTypeName() => "PackageEligibilityRequest"; 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()), 'PackageEligibilityRequestDto': TypeInfo(TypeOf.Class, create:() => PackageEligibilityRequestDto()), 'PackageEligibilityItem': TypeInfo(TypeOf.Class, create:() => PackageEligibilityItem()), 'PackageEligibility': TypeInfo(TypeOf.Class, create:() => PackageEligibility()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()), 'PackageEligibilityResponseDto': TypeInfo(TypeOf.Class, create:() => PackageEligibilityResponseDto()), 'PackageEligibilityResponse': TypeInfo(TypeOf.Class, create:() => PackageEligibilityResponse()), 'PackageEligibilityRequest': TypeInfo(TypeOf.Class, create:() => PackageEligibilityRequest()), });