ShortCode
extends Message
in package
An object representing a short code, which is a phone number that is typically much shorter than regular phone numbers and can be used to address messages in MMS and SMS systems, as well as for abbreviated dialing (e.g. "Text 611 to see how many minutes you have remaining on your plan.").
Short codes are restricted to a region and are not internationally dialable, which means the same short code can exist in different regions, with different usage and pricing, even if those regions share the same country calling code (e.g. US and CA).
Generated from protobuf message google.type.PhoneNumber.ShortCode
Table of Contents
Properties
- $number : mixed
- Required. The short code digits, without a leading plus ('+') or country calling code, e.g. "611".
- $region_code : mixed
- Required. The BCP-47 region code of the location where calls to this short code can be made, such as "US" and "BB".
Methods
- __construct() : mixed
- Constructor.
- getNumber() : string
- Required. The short code digits, without a leading plus ('+') or country calling code, e.g. "611".
- getRegionCode() : string
- Required. The BCP-47 region code of the location where calls to this short code can be made, such as "US" and "BB".
- setNumber() : $this
- Required. The short code digits, without a leading plus ('+') or country calling code, e.g. "611".
- setRegionCode() : $this
- Required. The BCP-47 region code of the location where calls to this short code can be made, such as "US" and "BB".
Properties
$number
Required. The short code digits, without a leading plus ('+') or country calling code, e.g. "611".
protected
mixed
$number
= ''
Generated from protobuf field string number = 2 [json_name = "number"];
$region_code
Required. The BCP-47 region code of the location where calls to this short code can be made, such as "US" and "BB".
protected
mixed
$region_code
= ''
Reference(s):
- http://www.unicode.org/reports/tr35/#unicode_region_subtag
Generated from protobuf field string region_code = 1 [json_name = "regionCode"];
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $data = NULL ]) : mixed
Parameters
- $data : array<string|int, mixed> = NULL
-
{ Optional. Data for populating the Message object.
@type string $region_code Required. The BCP-47 region code of the location where calls to this short code can be made, such as "US" and "BB". Reference(s): - http://www.unicode.org/reports/tr35/#unicode_region_subtag @type string $number Required. The short code digits, without a leading plus ('+') or country calling code, e.g. "611".}
getNumber()
Required. The short code digits, without a leading plus ('+') or country calling code, e.g. "611".
public
getNumber() : string
Generated from protobuf field string number = 2 [json_name = "number"];
Return values
stringgetRegionCode()
Required. The BCP-47 region code of the location where calls to this short code can be made, such as "US" and "BB".
public
getRegionCode() : string
Reference(s):
- http://www.unicode.org/reports/tr35/#unicode_region_subtag
Generated from protobuf field string region_code = 1 [json_name = "regionCode"];
Return values
stringsetNumber()
Required. The short code digits, without a leading plus ('+') or country calling code, e.g. "611".
public
setNumber(string $var) : $this
Generated from protobuf field string number = 2 [json_name = "number"];
Parameters
- $var : string
Return values
$thissetRegionCode()
Required. The BCP-47 region code of the location where calls to this short code can be made, such as "US" and "BB".
public
setRegionCode(string $var) : $this
Reference(s):
- http://www.unicode.org/reports/tr35/#unicode_region_subtag
Generated from protobuf field string region_code = 1 [json_name = "regionCode"];
Parameters
- $var : string