/* Options: Date: 2026-06-13 03:55:48 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.dev.dynamics.trendsic.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: FinanceRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class DashboardStatTile implements IConvertible { String? Key; String? Label; double? Value; double? PreviousValue; String? Unit; double? DeltaPct; DashboardStatTile({this.Key,this.Label,this.Value,this.PreviousValue,this.Unit,this.DeltaPct}); DashboardStatTile.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Key = json['Key']; Label = json['Label']; Value = JsonConverters.toDouble(json['Value']); PreviousValue = JsonConverters.toDouble(json['PreviousValue']); Unit = json['Unit']; DeltaPct = JsonConverters.toDouble(json['DeltaPct']); return this; } Map toJson() => { 'Key': Key, 'Label': Label, 'Value': Value, 'PreviousValue': PreviousValue, 'Unit': Unit, 'DeltaPct': DeltaPct }; getTypeName() => "DashboardStatTile"; TypeContext? context = _ctx; } class DashboardSeriesPoint implements IConvertible { String? Label; double? Value; DashboardSeriesPoint({this.Label,this.Value}); DashboardSeriesPoint.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Label = json['Label']; Value = JsonConverters.toDouble(json['Value']); return this; } Map toJson() => { 'Label': Label, 'Value': Value }; getTypeName() => "DashboardSeriesPoint"; TypeContext? context = _ctx; } class DashboardSeries implements IConvertible { String? Name; List? Points = []; DashboardSeries({this.Name,this.Points}); DashboardSeries.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Name = json['Name']; Points = JsonConverters.fromJson(json['Points'],'List',context!); return this; } Map toJson() => { 'Name': Name, 'Points': JsonConverters.toJson(Points,'List',context!) }; getTypeName() => "DashboardSeries"; TypeContext? context = _ctx; } class FinanceLocationRow implements IConvertible { String? LocationName; double? ServiceRev; double? ProductRev; double? SubscriptionRev; double? Total; FinanceLocationRow({this.LocationName,this.ServiceRev,this.ProductRev,this.SubscriptionRev,this.Total}); FinanceLocationRow.fromJson(Map json) { fromMap(json); } fromMap(Map json) { LocationName = json['LocationName']; ServiceRev = JsonConverters.toDouble(json['ServiceRev']); ProductRev = JsonConverters.toDouble(json['ProductRev']); SubscriptionRev = JsonConverters.toDouble(json['SubscriptionRev']); Total = JsonConverters.toDouble(json['Total']); return this; } Map toJson() => { 'LocationName': LocationName, 'ServiceRev': ServiceRev, 'ProductRev': ProductRev, 'SubscriptionRev': SubscriptionRev, 'Total': Total }; getTypeName() => "FinanceLocationRow"; TypeContext? context = _ctx; } class FinanceTopRow implements IConvertible { String? Name; double? Revenue; FinanceTopRow({this.Name,this.Revenue}); FinanceTopRow.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Name = json['Name']; Revenue = JsonConverters.toDouble(json['Revenue']); return this; } Map toJson() => { 'Name': Name, 'Revenue': Revenue }; getTypeName() => "FinanceTopRow"; TypeContext? context = _ctx; } class FinanceSubscriptionInfo implements IConvertible { double? Mrr; double? Arr; int? ActiveCount; int? NewCount; int? ChurnedCount; double? ChurnRatePct; FinanceSubscriptionInfo({this.Mrr,this.Arr,this.ActiveCount,this.NewCount,this.ChurnedCount,this.ChurnRatePct}); FinanceSubscriptionInfo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Mrr = JsonConverters.toDouble(json['Mrr']); Arr = JsonConverters.toDouble(json['Arr']); ActiveCount = json['ActiveCount']; NewCount = json['NewCount']; ChurnedCount = json['ChurnedCount']; ChurnRatePct = JsonConverters.toDouble(json['ChurnRatePct']); return this; } Map toJson() => { 'Mrr': Mrr, 'Arr': Arr, 'ActiveCount': ActiveCount, 'NewCount': NewCount, 'ChurnedCount': ChurnedCount, 'ChurnRatePct': ChurnRatePct }; getTypeName() => "FinanceSubscriptionInfo"; TypeContext? context = _ctx; } class FinanceResponse implements IConvertible { ResponseStatus? ResponseStatus; List? Stats = []; List? Trend = []; DashboardSeries? SourceMix; List? ByLocation = []; List? TopServices = []; List? TopProducts = []; FinanceSubscriptionInfo? Subscriptions; FinanceResponse({this.ResponseStatus,this.Stats,this.Trend,this.SourceMix,this.ByLocation,this.TopServices,this.TopProducts,this.Subscriptions}); FinanceResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); Stats = JsonConverters.fromJson(json['Stats'],'List',context!); Trend = JsonConverters.fromJson(json['Trend'],'List',context!); SourceMix = JsonConverters.fromJson(json['SourceMix'],'DashboardSeries',context!); ByLocation = JsonConverters.fromJson(json['ByLocation'],'List',context!); TopServices = JsonConverters.fromJson(json['TopServices'],'List',context!); TopProducts = JsonConverters.fromJson(json['TopProducts'],'List',context!); Subscriptions = JsonConverters.fromJson(json['Subscriptions'],'FinanceSubscriptionInfo',context!); return this; } Map toJson() => { 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!), 'Stats': JsonConverters.toJson(Stats,'List',context!), 'Trend': JsonConverters.toJson(Trend,'List',context!), 'SourceMix': JsonConverters.toJson(SourceMix,'DashboardSeries',context!), 'ByLocation': JsonConverters.toJson(ByLocation,'List',context!), 'TopServices': JsonConverters.toJson(TopServices,'List',context!), 'TopProducts': JsonConverters.toJson(TopProducts,'List',context!), 'Subscriptions': JsonConverters.toJson(Subscriptions,'FinanceSubscriptionInfo',context!) }; getTypeName() => "FinanceResponse"; TypeContext? context = _ctx; } // @Route("/v1/dashboard/finance", "POST,OPTIONS") class FinanceRequest implements IReturn, IConvertible, IPost { DateTime? FromDate; DateTime? ToDate; List? LocationIds = []; FinanceRequest({this.FromDate,this.ToDate,this.LocationIds}); FinanceRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!); ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!); LocationIds = JsonConverters.fromJson(json['LocationIds'],'List',context!); return this; } Map toJson() => { 'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!), 'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!), 'LocationIds': JsonConverters.toJson(LocationIds,'List',context!) }; createResponse() => FinanceResponse(); getResponseTypeName() => "FinanceResponse"; getTypeName() => "FinanceRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: { 'DashboardStatTile': TypeInfo(TypeOf.Class, create:() => DashboardStatTile()), 'DashboardSeriesPoint': TypeInfo(TypeOf.Class, create:() => DashboardSeriesPoint()), 'DashboardSeries': TypeInfo(TypeOf.Class, create:() => DashboardSeries()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'FinanceLocationRow': TypeInfo(TypeOf.Class, create:() => FinanceLocationRow()), 'FinanceTopRow': TypeInfo(TypeOf.Class, create:() => FinanceTopRow()), 'FinanceSubscriptionInfo': TypeInfo(TypeOf.Class, create:() => FinanceSubscriptionInfo()), 'FinanceResponse': TypeInfo(TypeOf.Class, create:() => FinanceResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'FinanceRequest': TypeInfo(TypeOf.Class, create:() => FinanceRequest()), });