# Google API Common Protos Client - Class ShortCode (4.14.0)

4.14.0 (latest) 4.13.0 4.12.5 4.11.0 4.10.0 4.9.0 4.8.3 Reference documentation and code samples for the Google API Common Protos Client class ShortCode.

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
(For example "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 (For example: US and CA).

Generated from protobuf message `google.type.PhoneNumber.ShortCode`

## Namespace

Google \\ Type \\ PhoneNumber

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ region_code` | `string` 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> |
| `↳ number` | `string` Required. The short code digits, without a leading plus ('+') or country calling code. For example "611". |

### getRegionCode

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>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setRegionCode

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>

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNumber

Required. The short code digits, without a leading plus ('+') or country
calling code. For example "611".

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setNumber

Required. The short code digits, without a leading plus ('+') or country
calling code. For example "611".

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |