/* Options: Date: 2024-11-24 14:07:05 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: GetSalesPackageDiscountsRequest.* //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 GetSalesPackageInstallmentsDto extends ApiDtoBase implements IConvertible { int? PackageId; GetSalesPackageInstallmentsDto({this.PackageId}); GetSalesPackageInstallmentsDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); PackageId = json['PackageId']; return this; } Map toJson() => super.toJson()..addAll({ 'PackageId': PackageId }); getTypeName() => "GetSalesPackageInstallmentsDto"; TypeContext? context = _ctx; } // @Route("/sales/packages/{PackageId}/installments", "GET") class GetSalesPackageDiscountsRequest extends GetSalesPackageInstallmentsDto 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 package plans for */ // @ApiMember(DataType="string", Description="ID # of store to get package plans for", IsRequired=true, Name="StoreId", ParameterType="query") int? StoreId; /** * ID # of package to get installment plans for */ // @ApiMember(DataType="string", Description="ID # of package to get installment plans for", IsRequired=true, Name="PackageId", ParameterType="path") int? PackageId; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; GetSalesPackageDiscountsRequest({this.ApiKey,this.StoreId,this.PackageId,this.RestrictedId,this.RestrictedResourceType}); GetSalesPackageDiscountsRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; PackageId = json['PackageId']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, 'PackageId': PackageId, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); getTypeName() => "GetSalesPackageDiscountsRequest"; 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()), 'GetSalesPackageInstallmentsDto': TypeInfo(TypeOf.Class, create:() => GetSalesPackageInstallmentsDto()), 'GetSalesPackageDiscountsRequest': TypeInfo(TypeOf.Class, create:() => GetSalesPackageDiscountsRequest()), });