Evo Voice

<back to all web services

AppSearchPhoneNumbers

Requires Authentication
The following routes are available for this service:
GET/portal/search-phone-numbers
import 'package:servicestack/servicestack.dart';

class AppSearchPhoneNumberInfo implements IConvertible
{
    String? phoneNumber;

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

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

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

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

class AppSearchPhoneNumbersResponse implements IConvertible
{
    List<AppSearchPhoneNumberInfo>? numbers;

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

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

    Map<String, dynamic> toJson() => {
        'numbers': JsonConverters.toJson(numbers,'List<AppSearchPhoneNumberInfo>',context!)
    };

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

enum EndpointTypes
{
    PhoneNumber,
    User,
    FaxNumber,
    EmailAddress,
    Unused_1,
    Unused_2,
    Unused_3,
    Unused_4,
    Unused_5,
    Team,
}

class AppSearchPhoneNumbers implements IConvertible
{
    String? accountId;
    String? customerId;
    String? areaCode;
    String? countryCode;
    String? postalCode;
    String? contains;
    int? distance;
    EndpointTypes? phoneNumberType;

    AppSearchPhoneNumbers({this.accountId,this.customerId,this.areaCode,this.countryCode,this.postalCode,this.contains,this.distance,this.phoneNumberType});
    AppSearchPhoneNumbers.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        accountId = json['accountId'];
        customerId = json['customerId'];
        areaCode = json['areaCode'];
        countryCode = json['countryCode'];
        postalCode = json['postalCode'];
        contains = json['contains'];
        distance = json['distance'];
        phoneNumberType = JsonConverters.fromJson(json['phoneNumberType'],'EndpointTypes',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'accountId': accountId,
        'customerId': customerId,
        'areaCode': areaCode,
        'countryCode': countryCode,
        'postalCode': postalCode,
        'contains': contains,
        'distance': distance,
        'phoneNumberType': JsonConverters.toJson(phoneNumberType,'EndpointTypes',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'evovoice.io', types: <String, TypeInfo> {
    'AppSearchPhoneNumberInfo': TypeInfo(TypeOf.Class, create:() => AppSearchPhoneNumberInfo()),
    'AppSearchPhoneNumbersResponse': TypeInfo(TypeOf.Class, create:() => AppSearchPhoneNumbersResponse()),
    'List<AppSearchPhoneNumberInfo>': TypeInfo(TypeOf.Class, create:() => <AppSearchPhoneNumberInfo>[]),
    'EndpointTypes': TypeInfo(TypeOf.Enum, enumValues:EndpointTypes.values),
    'AppSearchPhoneNumbers': TypeInfo(TypeOf.Class, create:() => AppSearchPhoneNumbers()),
});

Dart AppSearchPhoneNumbers DTOs

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

HTTP + JSV

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

GET /portal/search-phone-numbers HTTP/1.1 
Host: evovoice.io 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	numbers: 
	[
		{
			phoneNumber: String
		}
	]
}