\Aculab\WebServicesWrapperNumberPurchaseRequest

Number purchase request.

Passed to \Aculab\WebServicesWrapper\TelephoneNumbersWebService::purchaseNumbers()

Summary

Methods
Properties
Constants
__construct()
setState()
setRegulationAddress()
setQuantity()
setBasedOn()
setAllowPartial()
setDidType()
setAllowLandline()
setAllowCellular()
setAllowPayphone()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(string  $country, string  $region) 

Create a number purchase request object.

Parameters

string $country

The country where the number is located.

string $region

The region where the number is located.

This is a region name for geographic numbers or a number prefix for mobile, toll free and national numbers.

setState()

setState(string  $state) : self

Set the state where the number is located.

Some countries require this to be specified.

Parameters

string $state

Returns

self

setRegulationAddress()

setRegulationAddress(string  $regulation_address) : self

Set the name of registered regulation address.

The name of registered regulation address that exists on the cloud account being used. Some countries require this to be specified.

Parameters

string $regulation_address

Returns

self

setQuantity()

setQuantity(integer  $quantity) : self

Set the quantity of telephone numbers to purchase.

Default is 1.

Parameters

integer $quantity

Returns

self

setBasedOn()

setBasedOn(string  $based_on) : self

Create a new service based on an existing inbound service.

If set then a new service will be created for each new number purchased, based on the specified service.

Parameters

string $based_on

The name of an existing inbound service.

Returns

self

setAllowPartial()

setAllowPartial(boolean  $allow_partial) : self

Treat partial purchases as successful.

Determines whether the request responds as having succeeded even if not all the requested telephone numbers are available. Defaults to false.

Parameters

boolean $allow_partial

Returns

self

setDidType()

setDidType(string  $did_type) : self

Set the type of each new number purchased.

One of "geographic", "national", "mobile" or "tollfree". Default is "geographic".

Parameters

string $did_type

Returns

self

setAllowLandline()

setAllowLandline(boolean  $allow_landline) : self

Set whether calls from landline numbers are allowed.

Determines if calls from landlines are allowed. Defaults to false.

For toll free numbers only.

Parameters

boolean $allow_landline

Returns

self

setAllowCellular()

setAllowCellular(boolean  $allow_cellular) : self

Set whether calls from cellular (mobile) phones are allowed.

Determines if calls from cellular (mobile) phones are allowed. Defaults to false.

For toll free numbers only.

Parameters

boolean $allow_cellular

Returns

self

setAllowPayphone()

setAllowPayphone(boolean  $allow_payphone) : self

Set whether calls from payphones are allowed.

Determines if calls from payphones are allowed. Defaults to false.

For toll free numbers only.

Parameters

boolean $allow_payphone

Returns

self