# Google Shopping Merchant Accounts V1 Client - Class TermsOfService (1.4.1)

1.4.1 (latest) 1.4.0 1.3.1 1.2.2 1.1.0 1.0.0 0.10.0 0.9.1 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.3 0.2.0 0.1.0 Reference documentation and code samples for the Google Shopping Merchant Accounts V1 Client class TermsOfService.

The `TermsOfService` message represents a specific version of the terms of
service that merchants must accept to access certain features or services.

For more information, see [Terms of
Service](https://support.google.com/merchants/answer/160173).
This message is important for the onboarding process, ensuring that merchants
agree to the necessary legal agreements for using the service. Merchants can
retrieve the latest terms of service for a given `kind` and `region` through
`RetrieveLatestTermsOfService`, and accept them as required through
`AcceptTermsOfService`.

Generated from protobuf message `google.shopping.merchant.accounts.v1.TermsOfService`

## Namespace

Google \\ Shopping \\ Merchant \\ Accounts \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The resource name of the terms of service version. Format: `termsOfService/{version}` |
| `↳ region_code` | `string` Region code as defined by [CLDR](https://cldr.unicode.org/). This is either a country where the ToS applies specifically to that country or `001` when the same `TermsOfService` can be signed in any country. However note that when signing a ToS that applies globally we still expect that a specific country is provided (this should be merchant business country or program country of participation). |
| `↳ kind` | `int` The Kind this terms of service version applies to. |
| `↳ file_uri` | `string` URI for terms of service file that needs to be displayed to signing users. |
| `↳ external` | `bool` Whether this terms of service version is external. External terms of service versions can only be agreed through external processes and not directly by the merchant through UI or API. |

### getName

Identifier. The resource name of the terms of service version.

Format: `termsOfService/{version}`

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

### setName

Identifier. The resource name of the terms of service version.

Format: `termsOfService/{version}`

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

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

### getRegionCode

Region code as defined by [CLDR](https://cldr.unicode.org/). This is either
a country where the ToS applies specifically to that country or `001` when
the same `TermsOfService` can be signed in any country. However note that
when signing a ToS that applies globally we still expect that a specific
country is provided (this should be merchant business country or program
country of participation).

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

### setRegionCode

Region code as defined by [CLDR](https://cldr.unicode.org/). This is either
a country where the ToS applies specifically to that country or `001` when
the same `TermsOfService` can be signed in any country. However note that
when signing a ToS that applies globally we still expect that a specific
country is provided (this should be merchant business country or program
country of participation).

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

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

### getKind

The Kind this terms of service version applies to.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [TermsOfServiceKind](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.TermsOfServiceKind). |

### setKind

The Kind this terms of service version applies to.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [TermsOfServiceKind](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.TermsOfServiceKind). |

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

### getFileUri

URI for terms of service file that needs to be displayed to signing users.

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

### hasFileUri

### clearFileUri

### setFileUri

URI for terms of service file that needs to be displayed to signing users.

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

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

### getExternal

Whether this terms of service version is external. External terms of
service versions can only be agreed through external processes and not
directly by the merchant through UI or API.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setExternal

Whether this terms of service version is external. External terms of
service versions can only be agreed through external processes and not
directly by the merchant through UI or API.

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

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