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

Defines participation in a given program for the specified account.

Programs provide a mechanism for adding functionality to a Merchant Center
accounts. A typical example of this is the [Free product
listings](https://support.google.com/merchants/answer/13889434)
program, which enables products from a business's store to be shown across
Google for free.
The following list is the available set of program resource IDs accessible
through the API:

- `checkout`
- `free-listings`
- `product-ratings`
- `shopping-ads`
- `youtube-shopping-checkout`

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

## 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 program. Format: `accounts/{account}/programs/{program}` |
| `↳ documentation_uri` | `string` Output only. The URL of a Merchant Center help page describing the program. |
| `↳ state` | `int` Output only. The participation state of the account in the program. |
| `↳ active_region_codes` | `string[]` Output only. The regions in which the account is actively participating in the program. Active regions are defined as those where all program requirements affecting the regions have been met. Region codes are defined by [CLDR](https://cldr.unicode.org/). This is either a country where the program applies specifically to that country or `001` when the program applies globally. |
| `↳ unmet_requirements` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.Program.Requirement>` Output only. The requirements that the account has not yet satisfied that are affecting participation in the program. |

### getName

Identifier. The resource name of the program.

Format: `accounts/{account}/programs/{program}`

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

### setName

Identifier. The resource name of the program.

Format: `accounts/{account}/programs/{program}`

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

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

### getDocumentationUri

Output only. The URL of a Merchant Center help page describing the program.

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

### setDocumentationUri

Output only. The URL of a Merchant Center help page describing the program.

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

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

### getState

Output only. The participation state of the account in the program.

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

### setState

Output only. The participation state of the account in the program.

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

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

### getActiveRegionCodes

Output only. The regions in which the account is actively participating in
the program. Active regions are defined as those where all program
requirements affecting the regions have been met.

Region codes are defined by [CLDR](https://cldr.unicode.org/). This is
either a country where the program applies specifically to that country or
`001` when the program applies globally.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setActiveRegionCodes

Output only. The regions in which the account is actively participating in
the program. Active regions are defined as those where all program
requirements affecting the regions have been met.

Region codes are defined by [CLDR](https://cldr.unicode.org/). This is
either a country where the program applies specifically to that country or
`001` when the program applies globally.

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

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

### getUnmetRequirements

Output only. The requirements that the account has not yet satisfied that
are affecting participation in the program.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.Program.Requirement>` |   |

### setUnmetRequirements

Output only. The requirements that the account has not yet satisfied that
are affecting participation in the program.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.Program.Requirement>` |

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