Requires any of the roles: | SystemAdministrator, Manager, Customer |
PATCH | /system/dialing-permissions/{isoCode} |
---|
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
/** @description Update the specified dialing permissions */
// @Api(Description="Update the specified dialing permissions")
class PatchDialingPermissions implements IPatch, JsonSerializable
{
public function __construct(
/** @description The account ID you are modifying */
// @ApiMember(Description="The account ID you are modifying")
/** @var string|null */
public ?string $accountId=null,
/** @description The ISO code to patch */
// @ApiMember(Description="The ISO code to patch")
/** @var string|null */
public ?string $isoCode=null,
/** @description If low risk numbers within this code are enabled */
// @ApiMember(Description="If low risk numbers within this code are enabled")
/** @var bool|null */
public ?bool $lowRiskNumbersEnabled=null,
/** @description If high risk special numbers within this code are enabled */
// @ApiMember(Description="If high risk special numbers within this code are enabled")
/** @var bool|null */
public ?bool $highRiskSpecialNumbersEnabled=null,
/** @description If high risk toll fraud within this code are enabled */
// @ApiMember(Description="If high risk toll fraud within this code are enabled")
/** @var bool|null */
public ?bool $highRiskTollfraudNumbersEnabled=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['accountId'])) $this->accountId = $o['accountId'];
if (isset($o['isoCode'])) $this->isoCode = $o['isoCode'];
if (isset($o['lowRiskNumbersEnabled'])) $this->lowRiskNumbersEnabled = $o['lowRiskNumbersEnabled'];
if (isset($o['highRiskSpecialNumbersEnabled'])) $this->highRiskSpecialNumbersEnabled = $o['highRiskSpecialNumbersEnabled'];
if (isset($o['highRiskTollfraudNumbersEnabled'])) $this->highRiskTollfraudNumbersEnabled = $o['highRiskTollfraudNumbersEnabled'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->accountId)) $o['accountId'] = $this->accountId;
if (isset($this->isoCode)) $o['isoCode'] = $this->isoCode;
if (isset($this->lowRiskNumbersEnabled)) $o['lowRiskNumbersEnabled'] = $this->lowRiskNumbersEnabled;
if (isset($this->highRiskSpecialNumbersEnabled)) $o['highRiskSpecialNumbersEnabled'] = $this->highRiskSpecialNumbersEnabled;
if (isset($this->highRiskTollfraudNumbersEnabled)) $o['highRiskTollfraudNumbersEnabled'] = $this->highRiskTollfraudNumbersEnabled;
return empty($o) ? new class(){} : $o;
}
}
PHP PatchDialingPermissions DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PATCH /system/dialing-permissions/{isoCode} HTTP/1.1
Host: team.evovoice.io
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
accountId: String,
isoCode: String,
lowRiskNumbersEnabled: False,
highRiskSpecialNumbersEnabled: False,
highRiskTollfraudNumbersEnabled: False
}