/* Options: Date: 2025-12-06 07:02:52 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://backoffice-api.brovs.com //GlobalNamespace: BackofficeApi //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: UpdateSubscriptionPlanRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ library BackofficeApi; import 'package:servicestack/servicestack.dart'; class PlanDetailsFreeUntil implements IConvertible { DateTime? stopAt; PlanDetailsFreeUntil({this.stopAt}); PlanDetailsFreeUntil.fromJson(Map json) { fromMap(json); } fromMap(Map json) { stopAt = JsonConverters.fromJson(json['stopAt'],'DateTime',context!); return this; } Map toJson() => { 'stopAt': JsonConverters.toJson(stopAt,'DateTime',context!) }; getTypeName() => "PlanDetailsFreeUntil"; TypeContext? context = _ctx; } enum Period { Monthly, Yearly, } class PlanDetailsInvoice implements IConvertible { Period? period; double? amount; String? currency; PlanDetailsInvoice({this.period,this.amount,this.currency}); PlanDetailsInvoice.fromJson(Map json) { fromMap(json); } fromMap(Map json) { period = JsonConverters.fromJson(json['period'],'Period',context!); amount = JsonConverters.toDouble(json['amount']); currency = json['currency']; return this; } Map toJson() => { 'period': JsonConverters.toJson(period,'Period',context!), 'amount': amount, 'currency': currency }; getTypeName() => "PlanDetailsInvoice"; TypeContext? context = _ctx; } class PlanDetailsMonthlyStripe implements IConvertible { double? amount; String? currency; int? freeStartUpMonths; PlanDetailsMonthlyStripe({this.amount,this.currency,this.freeStartUpMonths}); PlanDetailsMonthlyStripe.fromJson(Map json) { fromMap(json); } fromMap(Map json) { amount = JsonConverters.toDouble(json['amount']); currency = json['currency']; freeStartUpMonths = json['freeStartUpMonths']; return this; } Map toJson() => { 'amount': amount, 'currency': currency, 'freeStartUpMonths': freeStartUpMonths }; getTypeName() => "PlanDetailsMonthlyStripe"; TypeContext? context = _ctx; } class PlanDetailsFreeOnClaim implements IConvertible { int? months; PlanDetailsFreeOnClaim({this.months}); PlanDetailsFreeOnClaim.fromJson(Map json) { fromMap(json); } fromMap(Map json) { months = json['months']; return this; } Map toJson() => { 'months': months }; getTypeName() => "PlanDetailsFreeOnClaim"; TypeContext? context = _ctx; } class SubscriptionPlanDetailsUnion implements IConvertible { PlanDetailsFreeUntil? freeUntil; PlanDetailsInvoice? invoice; PlanDetailsMonthlyStripe? monthlyStripe; PlanDetailsFreeOnClaim? freeOnClaim; SubscriptionPlanDetailsUnion({this.freeUntil,this.invoice,this.monthlyStripe,this.freeOnClaim}); SubscriptionPlanDetailsUnion.fromJson(Map json) { fromMap(json); } fromMap(Map json) { freeUntil = JsonConverters.fromJson(json['freeUntil'],'PlanDetailsFreeUntil',context!); invoice = JsonConverters.fromJson(json['invoice'],'PlanDetailsInvoice',context!); monthlyStripe = JsonConverters.fromJson(json['monthlyStripe'],'PlanDetailsMonthlyStripe',context!); freeOnClaim = JsonConverters.fromJson(json['freeOnClaim'],'PlanDetailsFreeOnClaim',context!); return this; } Map toJson() => { 'freeUntil': JsonConverters.toJson(freeUntil,'PlanDetailsFreeUntil',context!), 'invoice': JsonConverters.toJson(invoice,'PlanDetailsInvoice',context!), 'monthlyStripe': JsonConverters.toJson(monthlyStripe,'PlanDetailsMonthlyStripe',context!), 'freeOnClaim': JsonConverters.toJson(freeOnClaim,'PlanDetailsFreeOnClaim',context!) }; getTypeName() => "SubscriptionPlanDetailsUnion"; TypeContext? context = _ctx; } class UpdateSubscriptionPlanResponse implements IConvertible { bool? success; UpdateSubscriptionPlanResponse({this.success}); UpdateSubscriptionPlanResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { success = json['success']; return this; } Map toJson() => { 'success': success }; getTypeName() => "UpdateSubscriptionPlanResponse"; TypeContext? context = _ctx; } // @Route("/subscription/update_plan", "PUT") class UpdateSubscriptionPlanRequest implements IReturn, IPut, IConvertible { int? id; bool? canBeSelectedByClient; SubscriptionPlanDetailsUnion? subscriptionPlanDetails; UpdateSubscriptionPlanRequest({this.id,this.canBeSelectedByClient,this.subscriptionPlanDetails}); UpdateSubscriptionPlanRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; canBeSelectedByClient = json['canBeSelectedByClient']; subscriptionPlanDetails = JsonConverters.fromJson(json['subscriptionPlanDetails'],'SubscriptionPlanDetailsUnion',context!); return this; } Map toJson() => { 'id': id, 'canBeSelectedByClient': canBeSelectedByClient, 'subscriptionPlanDetails': JsonConverters.toJson(subscriptionPlanDetails,'SubscriptionPlanDetailsUnion',context!) }; createResponse() => UpdateSubscriptionPlanResponse(); getResponseTypeName() => "UpdateSubscriptionPlanResponse"; getTypeName() => "UpdateSubscriptionPlanRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'BackofficeApi', types: { 'PlanDetailsFreeUntil': TypeInfo(TypeOf.Class, create:() => PlanDetailsFreeUntil()), 'Period': TypeInfo(TypeOf.Enum, enumValues:Period.values), 'PlanDetailsInvoice': TypeInfo(TypeOf.Class, create:() => PlanDetailsInvoice()), 'PlanDetailsMonthlyStripe': TypeInfo(TypeOf.Class, create:() => PlanDetailsMonthlyStripe()), 'PlanDetailsFreeOnClaim': TypeInfo(TypeOf.Class, create:() => PlanDetailsFreeOnClaim()), 'SubscriptionPlanDetailsUnion': TypeInfo(TypeOf.Class, create:() => SubscriptionPlanDetailsUnion()), 'UpdateSubscriptionPlanResponse': TypeInfo(TypeOf.Class, create:() => UpdateSubscriptionPlanResponse()), 'UpdateSubscriptionPlanRequest': TypeInfo(TypeOf.Class, create:() => UpdateSubscriptionPlanRequest()), });