/* Options: Date: 2024-05-16 19:13:04 Version: 6.40 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://evovoice.io //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: NewCustomer.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class BillingItem implements IConvertible { double? baseCost; double? rawUnitMultiplier; double? unitCost; int? allowance; BillingItem({this.baseCost,this.rawUnitMultiplier,this.unitCost,this.allowance}); BillingItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { baseCost = JsonConverters.toDouble(json['baseCost']); rawUnitMultiplier = JsonConverters.toDouble(json['rawUnitMultiplier']); unitCost = JsonConverters.toDouble(json['unitCost']); allowance = json['allowance']; return this; } Map toJson() => { 'baseCost': baseCost, 'rawUnitMultiplier': rawUnitMultiplier, 'unitCost': unitCost, 'allowance': allowance }; getTypeName() => "BillingItem"; TypeContext? context = _ctx; } class BillingSettings implements IConvertible { BillingItem? base; BillingItem? localNumbers; BillingItem? tollFreeNumbers; BillingItem? inboundVoiceCalls; BillingItem? outboundVoiceCalls; BillingItem? inboundFaxes; BillingItem? outboundFaxes; BillingItem? inboundSmsMessages; BillingItem? outboundSmsMessages; BillingSettings({this.base,this.localNumbers,this.tollFreeNumbers,this.inboundVoiceCalls,this.outboundVoiceCalls,this.inboundFaxes,this.outboundFaxes,this.inboundSmsMessages,this.outboundSmsMessages}); BillingSettings.fromJson(Map json) { fromMap(json); } fromMap(Map json) { base = JsonConverters.fromJson(json['base'],'BillingItem',context!); localNumbers = JsonConverters.fromJson(json['localNumbers'],'BillingItem',context!); tollFreeNumbers = JsonConverters.fromJson(json['tollFreeNumbers'],'BillingItem',context!); inboundVoiceCalls = JsonConverters.fromJson(json['inboundVoiceCalls'],'BillingItem',context!); outboundVoiceCalls = JsonConverters.fromJson(json['outboundVoiceCalls'],'BillingItem',context!); inboundFaxes = JsonConverters.fromJson(json['inboundFaxes'],'BillingItem',context!); outboundFaxes = JsonConverters.fromJson(json['outboundFaxes'],'BillingItem',context!); inboundSmsMessages = JsonConverters.fromJson(json['inboundSmsMessages'],'BillingItem',context!); outboundSmsMessages = JsonConverters.fromJson(json['outboundSmsMessages'],'BillingItem',context!); return this; } Map toJson() => { 'base': JsonConverters.toJson(base,'BillingItem',context!), 'localNumbers': JsonConverters.toJson(localNumbers,'BillingItem',context!), 'tollFreeNumbers': JsonConverters.toJson(tollFreeNumbers,'BillingItem',context!), 'inboundVoiceCalls': JsonConverters.toJson(inboundVoiceCalls,'BillingItem',context!), 'outboundVoiceCalls': JsonConverters.toJson(outboundVoiceCalls,'BillingItem',context!), 'inboundFaxes': JsonConverters.toJson(inboundFaxes,'BillingItem',context!), 'outboundFaxes': JsonConverters.toJson(outboundFaxes,'BillingItem',context!), 'inboundSmsMessages': JsonConverters.toJson(inboundSmsMessages,'BillingItem',context!), 'outboundSmsMessages': JsonConverters.toJson(outboundSmsMessages,'BillingItem',context!) }; getTypeName() => "BillingSettings"; TypeContext? context = _ctx; } class Struct extends Map implements IConvertible { Struct(); Struct.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); getTypeName() => "Struct"; TypeContext? context = _ctx; } class Value implements IConvertible { bool? boolValue; String? stringValue; double? numberValue; List? listValue; Struct? structValue; Value({this.boolValue,this.stringValue,this.numberValue,this.listValue,this.structValue}); Value.fromJson(Map json) { fromMap(json); } fromMap(Map json) { boolValue = json['boolValue']; stringValue = json['stringValue']; numberValue = JsonConverters.toDouble(json['numberValue']); listValue = JsonConverters.fromJson(json['listValue'],'List',context!); structValue = JsonConverters.fromJson(json['structValue'],'Struct',context!); return this; } Map toJson() => { 'boolValue': boolValue, 'stringValue': stringValue, 'numberValue': numberValue, 'listValue': JsonConverters.toJson(listValue,'List',context!), 'structValue': JsonConverters.toJson(structValue,'Struct',context!) }; getTypeName() => "Value"; TypeContext? context = _ctx; } class AppSettings implements IConvertible { bool? enablePhoneNumberManagement; bool? enableDeviceManagement; bool? enableDialer; bool? enableCallHistory; bool? showFileNameInMessageCenter; String? chakraTheme; String? customCss; String? pageTitle; String? stringMappings; String? logoutUrl; String? portMyNumberUrl; AppSettings({this.enablePhoneNumberManagement,this.enableDeviceManagement,this.enableDialer,this.enableCallHistory,this.showFileNameInMessageCenter,this.chakraTheme,this.customCss,this.pageTitle,this.stringMappings,this.logoutUrl,this.portMyNumberUrl}); AppSettings.fromJson(Map json) { fromMap(json); } fromMap(Map json) { enablePhoneNumberManagement = json['enablePhoneNumberManagement']; enableDeviceManagement = json['enableDeviceManagement']; enableDialer = json['enableDialer']; enableCallHistory = json['enableCallHistory']; showFileNameInMessageCenter = json['showFileNameInMessageCenter']; chakraTheme = json['chakraTheme']; customCss = json['customCss']; pageTitle = json['pageTitle']; stringMappings = json['stringMappings']; logoutUrl = json['logoutUrl']; portMyNumberUrl = json['portMyNumberUrl']; return this; } Map toJson() => { 'enablePhoneNumberManagement': enablePhoneNumberManagement, 'enableDeviceManagement': enableDeviceManagement, 'enableDialer': enableDialer, 'enableCallHistory': enableCallHistory, 'showFileNameInMessageCenter': showFileNameInMessageCenter, 'chakraTheme': chakraTheme, 'customCss': customCss, 'pageTitle': pageTitle, 'stringMappings': stringMappings, 'logoutUrl': logoutUrl, 'portMyNumberUrl': portMyNumberUrl }; getTypeName() => "AppSettings"; TypeContext? context = _ctx; } enum TagColors { Magenta, Red, Volcano, Orange, Gold, Lime, Green, Cyan, Blue, GeekBlue, Purple, } class Tag implements IConvertible { String? id; String? name; TagColors? color; Tag({this.id,this.name,this.color}); Tag.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; color = JsonConverters.fromJson(json['color'],'TagColors',context!); return this; } Map toJson() => { 'id': id, 'name': name, 'color': JsonConverters.toJson(color,'TagColors',context!) }; getTypeName() => "Tag"; TypeContext? context = _ctx; } abstract class EntityInfo { /** * The ID of the object */ // @ApiMember(Description="The ID of the object") String? id; /** * The date the object was created */ // @ApiMember(Description="The date the object was created") String? dateCreated; /** * The date the object was last modified */ // @ApiMember(Description="The date the object was last modified") String? dateLastModified; /** * The user that created this object */ // @ApiMember(Description="The user that created this object") String? createdBy; /** * The user that last modified this object */ // @ApiMember(Description="The user that last modified this object") String? lastModifiedBy; EntityInfo({this.id,this.dateCreated,this.dateLastModified,this.createdBy,this.lastModifiedBy}); EntityInfo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; dateCreated = json['dateCreated']; dateLastModified = json['dateLastModified']; createdBy = json['createdBy']; lastModifiedBy = json['lastModifiedBy']; return this; } Map toJson() => { 'id': id, 'dateCreated': dateCreated, 'dateLastModified': dateLastModified, 'createdBy': createdBy, 'lastModifiedBy': lastModifiedBy }; getTypeName() => "EntityInfo"; TypeContext? context = _ctx; } class CustomerBreadcrumb implements IConvertible { String? id; String? name; CustomerBreadcrumb({this.id,this.name}); CustomerBreadcrumb.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; return this; } Map toJson() => { 'id': id, 'name': name }; getTypeName() => "CustomerBreadcrumb"; TypeContext? context = _ctx; } class IntegrationData implements IConvertible { String? thirdPartyId; IntegrationData({this.thirdPartyId}); IntegrationData.fromJson(Map json) { fromMap(json); } fromMap(Map json) { thirdPartyId = json['thirdPartyId']; return this; } Map toJson() => { 'thirdPartyId': thirdPartyId }; getTypeName() => "IntegrationData"; TypeContext? context = _ctx; } class EntityIntegrationData extends Map implements IConvertible { EntityIntegrationData(); EntityIntegrationData.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); getTypeName() => "EntityIntegrationData"; TypeContext? context = _ctx; } class Schedule implements IConvertible { String? timeZoneId; bool? inherit; bool? forceClosed; List? rules; String? defaultState; Schedule({this.timeZoneId,this.inherit,this.forceClosed,this.rules,this.defaultState}); Schedule.fromJson(Map json) { fromMap(json); } fromMap(Map json) { timeZoneId = json['timeZoneId']; inherit = json['inherit']; forceClosed = json['forceClosed']; rules = JsonConverters.fromJson(json['rules'],'List',context!); defaultState = json['defaultState']; return this; } Map toJson() => { 'timeZoneId': timeZoneId, 'inherit': inherit, 'forceClosed': forceClosed, 'rules': JsonConverters.toJson(rules,'List',context!), 'defaultState': defaultState }; getTypeName() => "Schedule"; TypeContext? context = _ctx; } class CustomerInfo extends EntityInfo implements IConvertible { /** * The ID of the account associated with this customer */ // @ApiMember(Description="The ID of the account associated with this customer") String? accountId; /** * The parent customer ID for this customer */ // @ApiMember(Description="The parent customer ID for this customer") String? parentCustomerId; /** * The breadcrumb to this customer */ // @ApiMember(Description="The breadcrumb to this customer") List? breadcrumb; /** * The name of the account associated with this customer */ // @ApiMember(Description="The name of the account associated with this customer") String? accountName; /** * Is this customer staging or production? */ // @ApiMember(Description="Is this customer staging or production?") bool? isStaging; /** * The name of the company */ // @ApiMember(Description="The name of the company") String? name; /** * The reference ID for this company */ // @ApiMember(Description="The reference ID for this company") String? referenceId; /** * This customer's data values */ // @ApiMember(Description="This customer's data values") Struct? data; /** * The list of tags for this customer */ // @ApiMember(Description="The list of tags for this customer") List? tags; /** * This customer's schedule */ // @ApiMember(Description="This customer's schedule") Schedule? schedule; /** * Integration data for this customer */ // @ApiMember(Description="Integration data for this customer") EntityIntegrationData? integrationData; /** * Override this customer's billing settings? Otherwise inherits from parent */ // @ApiMember(Description="Override this customer's billing settings? Otherwise inherits from parent") bool? overrideBillingSettings; /** * Billing settings for this customer */ // @ApiMember(Description="Billing settings for this customer") BillingSettings? billingSettings; /** * Should this customer override the parent customer's app settings */ // @ApiMember(Description="Should this customer override the parent customer's app settings") bool? overrideAppSettings; /** * App / Portal settings for this customer */ // @ApiMember(Description="App / Portal settings for this customer") AppSettings? appSettings; CustomerInfo({this.accountId,this.parentCustomerId,this.breadcrumb,this.accountName,this.isStaging,this.name,this.referenceId,this.data,this.tags,this.schedule,this.integrationData,this.overrideBillingSettings,this.billingSettings,this.overrideAppSettings,this.appSettings}); CustomerInfo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); accountId = json['accountId']; parentCustomerId = json['parentCustomerId']; breadcrumb = JsonConverters.fromJson(json['breadcrumb'],'List',context!); accountName = json['accountName']; isStaging = json['isStaging']; name = json['name']; referenceId = json['referenceId']; data = JsonConverters.fromJson(json['data'],'Struct',context!); tags = JsonConverters.fromJson(json['tags'],'List',context!); schedule = JsonConverters.fromJson(json['schedule'],'Schedule',context!); integrationData = JsonConverters.fromJson(json['integrationData'],'EntityIntegrationData',context!); overrideBillingSettings = json['overrideBillingSettings']; billingSettings = JsonConverters.fromJson(json['billingSettings'],'BillingSettings',context!); overrideAppSettings = json['overrideAppSettings']; appSettings = JsonConverters.fromJson(json['appSettings'],'AppSettings',context!); return this; } Map toJson() => super.toJson()..addAll({ 'accountId': accountId, 'parentCustomerId': parentCustomerId, 'breadcrumb': JsonConverters.toJson(breadcrumb,'List',context!), 'accountName': accountName, 'isStaging': isStaging, 'name': name, 'referenceId': referenceId, 'data': JsonConverters.toJson(data,'Struct',context!), 'tags': JsonConverters.toJson(tags,'List',context!), 'schedule': JsonConverters.toJson(schedule,'Schedule',context!), 'integrationData': JsonConverters.toJson(integrationData,'EntityIntegrationData',context!), 'overrideBillingSettings': overrideBillingSettings, 'billingSettings': JsonConverters.toJson(billingSettings,'BillingSettings',context!), 'overrideAppSettings': overrideAppSettings, 'appSettings': JsonConverters.toJson(appSettings,'AppSettings',context!) }); getTypeName() => "CustomerInfo"; TypeContext? context = _ctx; } /** * Creates a new customer */ // @Route("/customers", "POST") // @Api(Description="Creates a new customer") class NewCustomer implements IReturn, IPost, IConvertible { /** * The account ID to associate this customer with */ // @ApiMember(Description="The account ID to associate this customer with") String? accountId; /** * The name of the customer */ // @ApiMember(Description="The name of the customer") String? name; /** * The parent customer for this customer */ // @ApiMember(Description="The parent customer for this customer") String? parentCustomerId; /** * The reference ID for this customer (e.g. in a third party system) */ // @ApiMember(Description="The reference ID for this customer (e.g. in a third party system)") String? referenceId; /** * Data values for this customer */ // @ApiMember(Description="Data values for this customer") Struct? data; NewCustomer({this.accountId,this.name,this.parentCustomerId,this.referenceId,this.data}); NewCustomer.fromJson(Map json) { fromMap(json); } fromMap(Map json) { accountId = json['accountId']; name = json['name']; parentCustomerId = json['parentCustomerId']; referenceId = json['referenceId']; data = JsonConverters.fromJson(json['data'],'Struct',context!); return this; } Map toJson() => { 'accountId': accountId, 'name': name, 'parentCustomerId': parentCustomerId, 'referenceId': referenceId, 'data': JsonConverters.toJson(data,'Struct',context!) }; createResponse() => CustomerInfo(); getResponseTypeName() => "CustomerInfo"; getTypeName() => "NewCustomer"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'evovoice.io', types: { 'BillingItem': TypeInfo(TypeOf.Class, create:() => BillingItem()), 'BillingSettings': TypeInfo(TypeOf.Class, create:() => BillingSettings()), 'Struct': TypeInfo(TypeOf.Class, create:() => Struct()), 'Value': TypeInfo(TypeOf.Class, create:() => Value()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'AppSettings': TypeInfo(TypeOf.Class, create:() => AppSettings()), 'TagColors': TypeInfo(TypeOf.Enum, enumValues:TagColors.values), 'Tag': TypeInfo(TypeOf.Class, create:() => Tag()), 'EntityInfo': TypeInfo(TypeOf.AbstractClass), 'CustomerBreadcrumb': TypeInfo(TypeOf.Class, create:() => CustomerBreadcrumb()), 'IntegrationData': TypeInfo(TypeOf.Class, create:() => IntegrationData()), 'EntityIntegrationData': TypeInfo(TypeOf.Class, create:() => EntityIntegrationData()), 'Schedule': TypeInfo(TypeOf.Class, create:() => Schedule()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'SchedulingRule': TypeInfo(TypeOf.Class, create:() => SchedulingRule()), 'CustomerInfo': TypeInfo(TypeOf.Class, create:() => CustomerInfo()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'NewCustomer': TypeInfo(TypeOf.Class, create:() => NewCustomer()), });