/* Options: Date: 2024-11-24 14:29:12 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: CalculatePaymentPlanRequest.* //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 CalculatePaymentPlanRequestDto extends ApiDtoBase implements IConvertible { int? InstallmentPlanId; int? PackageId; DateTime? StartDate; String? PromoCode; CalculatePaymentPlanRequestDto({this.InstallmentPlanId,this.PackageId,this.StartDate,this.PromoCode}); CalculatePaymentPlanRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); InstallmentPlanId = json['InstallmentPlanId']; PackageId = json['PackageId']; StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!); PromoCode = json['PromoCode']; return this; } Map toJson() => super.toJson()..addAll({ 'InstallmentPlanId': InstallmentPlanId, 'PackageId': PackageId, 'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!), 'PromoCode': PromoCode }); getTypeName() => "CalculatePaymentPlanRequestDto"; TypeContext? context = _ctx; } class PaymentPlanInstallment implements IConvertible { bool? PayToday; double? Amount; bool? Taxed; double? TaxRate; double? TaxAmount; String? FeeName; DateTime? DueDate; String? Total; int? SetupFeeId; PaymentPlanInstallment({this.PayToday,this.Amount,this.Taxed,this.TaxRate,this.TaxAmount,this.FeeName,this.DueDate,this.Total,this.SetupFeeId}); PaymentPlanInstallment.fromJson(Map json) { fromMap(json); } fromMap(Map json) { PayToday = json['PayToday']; Amount = JsonConverters.toDouble(json['Amount']); Taxed = json['Taxed']; TaxRate = JsonConverters.toDouble(json['TaxRate']); TaxAmount = JsonConverters.toDouble(json['TaxAmount']); FeeName = json['FeeName']; DueDate = JsonConverters.fromJson(json['DueDate'],'DateTime',context!); Total = json['Total']; SetupFeeId = json['SetupFeeId']; return this; } Map toJson() => { 'PayToday': PayToday, 'Amount': Amount, 'Taxed': Taxed, 'TaxRate': TaxRate, 'TaxAmount': TaxAmount, 'FeeName': FeeName, 'DueDate': JsonConverters.toJson(DueDate,'DateTime',context!), 'Total': Total, 'SetupFeeId': SetupFeeId }; getTypeName() => "PaymentPlanInstallment"; TypeContext? context = _ctx; } class CalculatePaymentPlanResultDto implements IConvertible { String? PlanTotal; String? SubTotal; double? TaxRate; String? EnhancementFee; String? EnhancementFeeTaxAmount; bool? TaxEnhFee; String? Tax; String? TotalDueToday; List? Payments; List? Fees; bool? IsEvergreen; bool? RequirePaymentProfile; CalculatePaymentPlanResultDto({this.PlanTotal,this.SubTotal,this.TaxRate,this.EnhancementFee,this.EnhancementFeeTaxAmount,this.TaxEnhFee,this.Tax,this.TotalDueToday,this.Payments,this.Fees,this.IsEvergreen,this.RequirePaymentProfile}); CalculatePaymentPlanResultDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { PlanTotal = json['PlanTotal']; SubTotal = json['SubTotal']; TaxRate = JsonConverters.toDouble(json['TaxRate']); EnhancementFee = json['EnhancementFee']; EnhancementFeeTaxAmount = json['EnhancementFeeTaxAmount']; TaxEnhFee = json['TaxEnhFee']; Tax = json['Tax']; TotalDueToday = json['TotalDueToday']; Payments = JsonConverters.fromJson(json['Payments'],'List',context!); Fees = JsonConverters.fromJson(json['Fees'],'List',context!); IsEvergreen = json['IsEvergreen']; RequirePaymentProfile = json['RequirePaymentProfile']; return this; } Map toJson() => { 'PlanTotal': PlanTotal, 'SubTotal': SubTotal, 'TaxRate': TaxRate, 'EnhancementFee': EnhancementFee, 'EnhancementFeeTaxAmount': EnhancementFeeTaxAmount, 'TaxEnhFee': TaxEnhFee, 'Tax': Tax, 'TotalDueToday': TotalDueToday, 'Payments': JsonConverters.toJson(Payments,'List',context!), 'Fees': JsonConverters.toJson(Fees,'List',context!), 'IsEvergreen': IsEvergreen, 'RequirePaymentProfile': RequirePaymentProfile }; getTypeName() => "CalculatePaymentPlanResultDto"; TypeContext? context = _ctx; } // @Route("/sales/packages/{PackageId}/installments/calculate/{InstallmentPlanId}", "GET") class CalculatePaymentPlanRequest extends CalculatePaymentPlanRequestDto 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; /** * ID # of store to calculate plan for */ // @ApiMember(DataType="integer", Description="ID # of store to calculate plan for", IsRequired=true, Name="StoreId", ParameterType="query") int? StoreId; /** * Installment Plan to calculate a scheduel for */ // @ApiMember(DataType="integer", Description="Installment Plan to calculate a scheduel for", IsRequired=true, Name="InstallmentPlanId", ParameterType="path") int? InstallmentPlanId; /** * The package to calculate for */ // @ApiMember(DataType="integer", Description="The package to calculate for", IsRequired=true, Name="PackageId", ParameterType="path") int? PackageId; /** * Date to calculate schedule from. If not provided, will use today. */ // @ApiMember(DataType="datetime", Description="Date to calculate schedule from. If not provided, will use today.", Name="StartDate", ParameterType="query") DateTime? StartDate; /** * Promo code to apply a discount. */ // @ApiMember(DataType="string", Description="Promo code to apply a discount.", Name="PromoCode", ParameterType="query") String? PromoCode; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; CalculatePaymentPlanRequest({this.ApiKey,this.StoreId,this.InstallmentPlanId,this.PackageId,this.StartDate,this.PromoCode,this.RestrictedId,this.RestrictedResourceType}); CalculatePaymentPlanRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; InstallmentPlanId = json['InstallmentPlanId']; PackageId = json['PackageId']; StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!); PromoCode = json['PromoCode']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, 'InstallmentPlanId': InstallmentPlanId, 'PackageId': PackageId, 'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!), 'PromoCode': PromoCode, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => CalculatePaymentPlanResultDto(); getResponseTypeName() => "CalculatePaymentPlanResultDto"; getTypeName() => "CalculatePaymentPlanRequest"; 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()), 'CalculatePaymentPlanRequestDto': TypeInfo(TypeOf.Class, create:() => CalculatePaymentPlanRequestDto()), 'PaymentPlanInstallment': TypeInfo(TypeOf.Class, create:() => PaymentPlanInstallment()), 'CalculatePaymentPlanResultDto': TypeInfo(TypeOf.Class, create:() => CalculatePaymentPlanResultDto()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CalculatePaymentPlanRequest': TypeInfo(TypeOf.Class, create:() => CalculatePaymentPlanRequest()), });