Requires any of the roles: | SystemAdministrator, Manager, Customer |
GET | /system/dialing-permissions |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class DialingPermissionInfo implements IConvertible
{
String? isoCode;
String? name;
bool? lowRiskNumbersEnabled;
bool? highRiskSpecialNumbersEnabled;
bool? highRiskTollfraudNumbersEnabled;
DialingPermissionInfo({this.isoCode,this.name,this.lowRiskNumbersEnabled,this.highRiskSpecialNumbersEnabled,this.highRiskTollfraudNumbersEnabled});
DialingPermissionInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
isoCode = json['isoCode'];
name = json['name'];
lowRiskNumbersEnabled = json['lowRiskNumbersEnabled'];
highRiskSpecialNumbersEnabled = json['highRiskSpecialNumbersEnabled'];
highRiskTollfraudNumbersEnabled = json['highRiskTollfraudNumbersEnabled'];
return this;
}
Map<String, dynamic> toJson() => {
'isoCode': isoCode,
'name': name,
'lowRiskNumbersEnabled': lowRiskNumbersEnabled,
'highRiskSpecialNumbersEnabled': highRiskSpecialNumbersEnabled,
'highRiskTollfraudNumbersEnabled': highRiskTollfraudNumbersEnabled
};
getTypeName() => "DialingPermissionInfo";
TypeContext? context = _ctx;
}
class GetDialingPermissionsResponse implements IConvertible
{
List<DialingPermissionInfo>? permissions;
GetDialingPermissionsResponse({this.permissions});
GetDialingPermissionsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
permissions = JsonConverters.fromJson(json['permissions'],'List<DialingPermissionInfo>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'permissions': JsonConverters.toJson(permissions,'List<DialingPermissionInfo>',context!)
};
getTypeName() => "GetDialingPermissionsResponse";
TypeContext? context = _ctx;
}
/**
* Get all of the country based dialing permissions for this account
*/
// @Api(Description="Get all of the country based dialing permissions for this account")
class GetDialingPermissions implements IGet, IConvertible
{
/**
* The account ID you want to retrieve for
*/
// @ApiMember(Description="The account ID you want to retrieve for")
String? accountId;
GetDialingPermissions({this.accountId});
GetDialingPermissions.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
accountId = json['accountId'];
return this;
}
Map<String, dynamic> toJson() => {
'accountId': accountId
};
getTypeName() => "GetDialingPermissions";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'team.evovoice.io', types: <String, TypeInfo> {
'DialingPermissionInfo': TypeInfo(TypeOf.Class, create:() => DialingPermissionInfo()),
'GetDialingPermissionsResponse': TypeInfo(TypeOf.Class, create:() => GetDialingPermissionsResponse()),
'List<DialingPermissionInfo>': TypeInfo(TypeOf.Class, create:() => <DialingPermissionInfo>[]),
'GetDialingPermissions': TypeInfo(TypeOf.Class, create:() => GetDialingPermissions()),
});
Dart GetDialingPermissions DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /system/dialing-permissions HTTP/1.1 Host: team.evovoice.io Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"permissions":[{"isoCode":"String","name":"String","lowRiskNumbersEnabled":false,"highRiskSpecialNumbersEnabled":false,"highRiskTollfraudNumbersEnabled":false}]}