# Google Shopping Merchant Accounts V1 Client - Class Accepted (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 Accepted.

Describes the [accepted terms of
service](https://developers.google.com/merchant/api/guides/accounts/create-and-configure#accept_the_merchant_center_terms_of_service).

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ terms_of_service` | `string` Required. The accepted [termsOfService](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.TermsOfService). |
| `↳ accepted_by` | `string` Required. The account where the acceptance was recorded. This can be the account itself or, in the case of subaccounts, the advanced account. |
| `↳ valid_until` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html` Optional. When set, it states that the accepted `TermsOfService` is only valid until the end of this date (in UTC). A new one must be accepted before then. The information of the required `TermsOfService` is found in the `Required` message. |

### getTermsOfService

Required. The accepted
[termsOfService](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.TermsOfService).

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

### setTermsOfService

Required. The accepted
[termsOfService](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.TermsOfService).

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

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

### getAcceptedBy

Required. The account where the acceptance was recorded. This can be the
account itself or, in the case of subaccounts, the advanced account.

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

### setAcceptedBy

Required. The account where the acceptance was recorded. This can be the
account itself or, in the case of subaccounts, the advanced account.

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

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

### getValidUntil

Optional. When set, it states that the accepted `TermsOfService` is only
valid until the end of this date (in UTC). A new one must be accepted
before then. The information of the required `TermsOfService` is found in
the `Required` message.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html|null` |   |

### hasValidUntil

### clearValidUntil

### setValidUntil

Optional. When set, it states that the accepted `TermsOfService` is only
valid until the end of this date (in UTC). A new one must be accepted
before then. The information of the required `TermsOfService` is found in
the `Required` message.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html` |

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