/* Options: Date: 2024-11-24 13:44:13 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: GetSalesPackagesRequest.* //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 GetSalesPackagesRequestDto extends ApiDtoBase implements IConvertible { GetSalesPackagesRequestDto(); GetSalesPackagesRequestDto.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); getTypeName() => "GetSalesPackagesRequestDto"; TypeContext? context = _ctx; } // @Route("/sales/packages", "GET") class GetSalesPackagesRequest extends GetSalesPackagesRequestDto 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; /** * ID # of store to get packages for */ // @ApiMember(DataType="string", Description="ID # of store to get packages for", IsRequired=true, Name="StoreId", ParameterType="query") int? StoreId; /** * ID # of the user to get packages for */ // @ApiMember(DataType="integer", Description="ID # of the user to get packages for", Name="UserId", ParameterType="query") int? UserId; /** * The filter type which will used for packages credit (Class = 1, ClassSchedule = 2, SessionSize = 3) */ // @ApiMember(DataType="integer", Description="The filter type which will used for packages credit (Class = 1, ClassSchedule = 2, SessionSize = 3)", Name="CreditFilterType", ParameterType="query") int? CreditFilterType; /** * ClassId or ClassScheduleId or SessionSizeId packages which drop credits */ // @ApiMember(DataType="integer", Description="ClassId or ClassScheduleId or SessionSizeId packages which drop credits", Name="CreditFilterId", ParameterType="query") int? CreditFilterId; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; /** * Show packages enabled for In App purchase. True or False */ // @ApiMember(DataType="string", Description="Show packages enabled for In App purchase. True or False", Name="InApp", ParameterType="query") bool? InApp; GetSalesPackagesRequest({this.ApiKey,this.StoreId,this.UserId,this.CreditFilterType,this.CreditFilterId,this.RestrictedId,this.RestrictedResourceType,this.InApp}); GetSalesPackagesRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; UserId = json['UserId']; CreditFilterType = json['CreditFilterType']; CreditFilterId = json['CreditFilterId']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); InApp = json['InApp']; return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, 'UserId': UserId, 'CreditFilterType': CreditFilterType, 'CreditFilterId': CreditFilterId, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!), 'InApp': InApp }); getTypeName() => "GetSalesPackagesRequest"; 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()), 'GetSalesPackagesRequestDto': TypeInfo(TypeOf.Class, create:() => GetSalesPackagesRequestDto()), 'GetSalesPackagesRequest': TypeInfo(TypeOf.Class, create:() => GetSalesPackagesRequest()), });