Evo Voice

<back to all web services

NewCustomer

Creates a new customer

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
POST/customers
import 'package:servicestack/servicestack.dart';

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<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        dateCreated = json['dateCreated'];
        dateLastModified = json['dateLastModified'];
        createdBy = json['createdBy'];
        lastModifiedBy = json['lastModifiedBy'];
        return this;
    }

    Map<String, dynamic> 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<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name
    };

    getTypeName() => "CustomerBreadcrumb";
    TypeContext? context = _ctx;
}

class Value implements IConvertible
{
    bool? boolValue;
    String? stringValue;
    double? numberValue;
    List<Struct>? listValue;
    Struct? structValue;

    Value({this.boolValue,this.stringValue,this.numberValue,this.listValue,this.structValue});
    Value.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        boolValue = json['boolValue'];
        stringValue = json['stringValue'];
        numberValue = JsonConverters.toDouble(json['numberValue']);
        listValue = JsonConverters.fromJson(json['listValue'],'List<Struct>',context!);
        structValue = JsonConverters.fromJson(json['structValue'],'Struct',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'boolValue': boolValue,
        'stringValue': stringValue,
        'numberValue': numberValue,
        'listValue': JsonConverters.toJson(listValue,'List<Struct>',context!),
        'structValue': JsonConverters.toJson(structValue,'Struct',context!)
    };

    getTypeName() => "Value";
    TypeContext? context = _ctx;
}

class Struct extends Map<String,Value?> implements IConvertible
{
    Struct();
    Struct.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "Struct";
    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<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        color = JsonConverters.fromJson(json['color'],'TagColors',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'color': JsonConverters.toJson(color,'TagColors',context!)
    };

    getTypeName() => "Tag";
    TypeContext? context = _ctx;
}

enum SimpleSchedulingRuleTypes
{
    Always,
    CustomerState,
    Time,
}

class ScheduleDay implements IConvertible
{
    int? offset;
    DayOfWeek? dayOfWeek;

    ScheduleDay({this.offset,this.dayOfWeek});
    ScheduleDay.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        offset = json['offset'];
        dayOfWeek = JsonConverters.fromJson(json['dayOfWeek'],'DayOfWeek',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'offset': offset,
        'dayOfWeek': JsonConverters.toJson(dayOfWeek,'DayOfWeek',context!)
    };

    getTypeName() => "ScheduleDay";
    TypeContext? context = _ctx;
}

enum SchedulingRuleFrequency
{
    None,
    Secondly,
    Minutely,
    Hourly,
    Daily,
    Weekly,
    Monthly,
    Yearly,
}

class SchedulingRule implements IConvertible
{
    String? id;
    String? name;
    int? priority;
    String? state;
    String? source;
    String? condition;
    SimpleSchedulingRuleTypes? simpleRuleType;
    String? customerState;
    String? flowId;
    Struct? flowParams;
    bool? isAllDay;
    String? startDate;
    String? startTime;
    String? endTime;
    List<int>? bySetPosition;
    List<int>? byMonth;
    List<int>? byWeekNo;
    List<int>? byYearDay;
    List<int>? byMonthDay;
    List<ScheduleDay>? byDay;
    List<int>? byHour;
    List<int>? byMinute;
    int? interval;
    int? count;
    String? untilDate;
    SchedulingRuleFrequency? frequency;

    SchedulingRule({this.id,this.name,this.priority,this.state,this.source,this.condition,this.simpleRuleType,this.customerState,this.flowId,this.flowParams,this.isAllDay,this.startDate,this.startTime,this.endTime,this.bySetPosition,this.byMonth,this.byWeekNo,this.byYearDay,this.byMonthDay,this.byDay,this.byHour,this.byMinute,this.interval,this.count,this.untilDate,this.frequency});
    SchedulingRule.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        priority = json['priority'];
        state = json['state'];
        source = json['source'];
        condition = json['condition'];
        simpleRuleType = JsonConverters.fromJson(json['simpleRuleType'],'SimpleSchedulingRuleTypes',context!);
        customerState = json['customerState'];
        flowId = json['flowId'];
        flowParams = JsonConverters.fromJson(json['flowParams'],'Struct',context!);
        isAllDay = json['isAllDay'];
        startDate = json['startDate'];
        startTime = json['startTime'];
        endTime = json['endTime'];
        bySetPosition = JsonConverters.fromJson(json['bySetPosition'],'List<int>',context!);
        byMonth = JsonConverters.fromJson(json['byMonth'],'List<int>',context!);
        byWeekNo = JsonConverters.fromJson(json['byWeekNo'],'List<int>',context!);
        byYearDay = JsonConverters.fromJson(json['byYearDay'],'List<int>',context!);
        byMonthDay = JsonConverters.fromJson(json['byMonthDay'],'List<int>',context!);
        byDay = JsonConverters.fromJson(json['byDay'],'List<ScheduleDay>',context!);
        byHour = JsonConverters.fromJson(json['byHour'],'List<int>',context!);
        byMinute = JsonConverters.fromJson(json['byMinute'],'List<int>',context!);
        interval = json['interval'];
        count = json['count'];
        untilDate = json['untilDate'];
        frequency = JsonConverters.fromJson(json['frequency'],'SchedulingRuleFrequency',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'priority': priority,
        'state': state,
        'source': source,
        'condition': condition,
        'simpleRuleType': JsonConverters.toJson(simpleRuleType,'SimpleSchedulingRuleTypes',context!),
        'customerState': customerState,
        'flowId': flowId,
        'flowParams': JsonConverters.toJson(flowParams,'Struct',context!),
        'isAllDay': isAllDay,
        'startDate': startDate,
        'startTime': startTime,
        'endTime': endTime,
        'bySetPosition': JsonConverters.toJson(bySetPosition,'List<int>',context!),
        'byMonth': JsonConverters.toJson(byMonth,'List<int>',context!),
        'byWeekNo': JsonConverters.toJson(byWeekNo,'List<int>',context!),
        'byYearDay': JsonConverters.toJson(byYearDay,'List<int>',context!),
        'byMonthDay': JsonConverters.toJson(byMonthDay,'List<int>',context!),
        'byDay': JsonConverters.toJson(byDay,'List<ScheduleDay>',context!),
        'byHour': JsonConverters.toJson(byHour,'List<int>',context!),
        'byMinute': JsonConverters.toJson(byMinute,'List<int>',context!),
        'interval': interval,
        'count': count,
        'untilDate': untilDate,
        'frequency': JsonConverters.toJson(frequency,'SchedulingRuleFrequency',context!)
    };

    getTypeName() => "SchedulingRule";
    TypeContext? context = _ctx;
}

class Schedule implements IConvertible
{
    String? timeZoneId;
    bool? inherit;
    bool? forceClosed;
    List<SchedulingRule>? rules;
    String? defaultState;

    Schedule({this.timeZoneId,this.inherit,this.forceClosed,this.rules,this.defaultState});
    Schedule.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        timeZoneId = json['timeZoneId'];
        inherit = json['inherit'];
        forceClosed = json['forceClosed'];
        rules = JsonConverters.fromJson(json['rules'],'List<SchedulingRule>',context!);
        defaultState = json['defaultState'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'timeZoneId': timeZoneId,
        'inherit': inherit,
        'forceClosed': forceClosed,
        'rules': JsonConverters.toJson(rules,'List<SchedulingRule>',context!),
        'defaultState': defaultState
    };

    getTypeName() => "Schedule";
    TypeContext? context = _ctx;
}

class IntegrationData implements IConvertible
{
    String? thirdPartyId;

    IntegrationData({this.thirdPartyId});
    IntegrationData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        thirdPartyId = json['thirdPartyId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'thirdPartyId': thirdPartyId
    };

    getTypeName() => "IntegrationData";
    TypeContext? context = _ctx;
}

class EntityIntegrationData extends Map<String,IntegrationData?> implements IConvertible
{
    EntityIntegrationData();
    EntityIntegrationData.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "EntityIntegrationData";
    TypeContext? context = _ctx;
}

class BillingItem implements IConvertible
{
    double? baseCost;
    double? rawUnitMultiplier;
    double? unitCost;
    int? allowance;

    BillingItem({this.baseCost,this.rawUnitMultiplier,this.unitCost,this.allowance});
    BillingItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        baseCost = JsonConverters.toDouble(json['baseCost']);
        rawUnitMultiplier = JsonConverters.toDouble(json['rawUnitMultiplier']);
        unitCost = JsonConverters.toDouble(json['unitCost']);
        allowance = json['allowance'];
        return this;
    }

    Map<String, dynamic> 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<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> 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<String, dynamic> 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 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<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> 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<String, dynamic> 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;
}

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<CustomerBreadcrumb>? 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<Tag>? 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<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        accountId = json['accountId'];
        parentCustomerId = json['parentCustomerId'];
        breadcrumb = JsonConverters.fromJson(json['breadcrumb'],'List<CustomerBreadcrumb>',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<Tag>',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<String, dynamic> toJson() => super.toJson()..addAll({
        'accountId': accountId,
        'parentCustomerId': parentCustomerId,
        'breadcrumb': JsonConverters.toJson(breadcrumb,'List<CustomerBreadcrumb>',context!),
        'accountName': accountName,
        'isStaging': isStaging,
        'name': name,
        'referenceId': referenceId,
        'data': JsonConverters.toJson(data,'Struct',context!),
        'tags': JsonConverters.toJson(tags,'List<Tag>',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
*/
// @Api(Description="Creates a new customer")
class NewCustomer implements 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<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        accountId = json['accountId'];
        name = json['name'];
        parentCustomerId = json['parentCustomerId'];
        referenceId = json['referenceId'];
        data = JsonConverters.fromJson(json['data'],'Struct',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'accountId': accountId,
        'name': name,
        'parentCustomerId': parentCustomerId,
        'referenceId': referenceId,
        'data': JsonConverters.toJson(data,'Struct',context!)
    };

    getTypeName() => "NewCustomer";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'evovoice.io', types: <String, TypeInfo> {
    'EntityInfo': TypeInfo(TypeOf.AbstractClass),
    'CustomerBreadcrumb': TypeInfo(TypeOf.Class, create:() => CustomerBreadcrumb()),
    'Value': TypeInfo(TypeOf.Class, create:() => Value()),
    'List<Struct>': TypeInfo(TypeOf.Class, create:() => <Struct>[]),
    'Struct': TypeInfo(TypeOf.Class, create:() => Struct()),
    'TagColors': TypeInfo(TypeOf.Enum, enumValues:TagColors.values),
    'Tag': TypeInfo(TypeOf.Class, create:() => Tag()),
    'SimpleSchedulingRuleTypes': TypeInfo(TypeOf.Enum, enumValues:SimpleSchedulingRuleTypes.values),
    'ScheduleDay': TypeInfo(TypeOf.Class, create:() => ScheduleDay()),
    'DayOfWeek': TypeInfo(TypeOf.Class, create:() => DayOfWeek()),
    'SchedulingRuleFrequency': TypeInfo(TypeOf.Enum, enumValues:SchedulingRuleFrequency.values),
    'SchedulingRule': TypeInfo(TypeOf.Class, create:() => SchedulingRule()),
    'List<ScheduleDay>': TypeInfo(TypeOf.Class, create:() => <ScheduleDay>[]),
    'Schedule': TypeInfo(TypeOf.Class, create:() => Schedule()),
    'List<SchedulingRule>': TypeInfo(TypeOf.Class, create:() => <SchedulingRule>[]),
    'IntegrationData': TypeInfo(TypeOf.Class, create:() => IntegrationData()),
    'EntityIntegrationData': TypeInfo(TypeOf.Class, create:() => EntityIntegrationData()),
    'BillingItem': TypeInfo(TypeOf.Class, create:() => BillingItem()),
    'BillingSettings': TypeInfo(TypeOf.Class, create:() => BillingSettings()),
    'AppSettings': TypeInfo(TypeOf.Class, create:() => AppSettings()),
    'CustomerInfo': TypeInfo(TypeOf.Class, create:() => CustomerInfo()),
    'List<CustomerBreadcrumb>': TypeInfo(TypeOf.Class, create:() => <CustomerBreadcrumb>[]),
    'List<Tag>': TypeInfo(TypeOf.Class, create:() => <Tag>[]),
    'NewCustomer': TypeInfo(TypeOf.Class, create:() => NewCustomer()),
});

Dart NewCustomer DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /customers HTTP/1.1 
Host: evovoice.io 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"accountId":"String","name":"String","parentCustomerId":"String","referenceId":"String","data":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}}}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"accountId":"String","parentCustomerId":"String","breadcrumb":[{"id":"String","name":"String"}],"accountName":"String","isStaging":false,"name":"String","referenceId":"String","data":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}}},"tags":[{"id":"String","name":"String","color":"Magenta"}],"schedule":{"timeZoneId":"String","inherit":false,"forceClosed":false,"rules":[{"id":"String","name":"String","priority":0,"state":"String","source":"String","condition":"String","simpleRuleType":"Always","customerState":"String","flowId":"String","flowParams":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}}},"isAllDay":false,"startDate":"String","startTime":"String","endTime":"String","bySetPosition":[0],"byMonth":[0],"byWeekNo":[0],"byYearDay":[0],"byMonthDay":[0],"byDay":[{"offset":0,"dayOfWeek":"Sunday"}],"byHour":[0],"byMinute":[0],"interval":0,"count":0,"untilDate":"String","frequency":"None"}],"defaultState":"String"},"integrationData":{"String":{"thirdPartyId":"String"}},"overrideBillingSettings":false,"billingSettings":{"base":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"localNumbers":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"tollFreeNumbers":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"inboundVoiceCalls":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"outboundVoiceCalls":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"inboundFaxes":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"outboundFaxes":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"inboundSmsMessages":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"outboundSmsMessages":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0}},"overrideAppSettings":false,"appSettings":{"enablePhoneNumberManagement":false,"enableDeviceManagement":false,"enableDialer":false,"enableCallHistory":false,"showFileNameInMessageCenter":false,"chakraTheme":"String","customCss":"String","pageTitle":"String","stringMappings":"String","logoutUrl":"String","portMyNumberUrl":"String"},"id":"String","dateCreated":"String","dateLastModified":"String","createdBy":"String","lastModifiedBy":"String"}