# Google Cloud Channel V1 Client - Class PricePhase (2.4.1)

2.4.1 (latest) 2.4.0 2.3.1 2.2.1 2.1.4 2.0.0 1.9.5 1.8.2 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.1 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Channel V1 Client class PricePhase.

Specifies the price by the duration of months.

For example, a 20% discount for the first six months, then a 10% discount
starting on the seventh month.

Generated from protobuf message `google.cloud.channel.v1.PricePhase`

## Namespace

Google \\ Cloud \\ Channel \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ period_type` | `int` Defines the phase period type. |
| `↳ first_period` | `int` Defines first period for the phase. |
| `↳ last_period` | `int` Defines first period for the phase. |
| `↳ price` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Price` Price of the phase. Present if there are no price tiers. |
| `↳ price_tiers` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.PriceTier>` Price by the resource tiers. |

### getPeriodType

Defines the phase period type.

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

### setPeriodType

Defines the phase period type.

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

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

### getFirstPeriod

Defines first period for the phase.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setFirstPeriod

Defines first period for the phase.

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

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

### getLastPeriod

Defines first period for the phase.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setLastPeriod

Defines first period for the phase.

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

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

### getPrice

Price of the phase. Present if there are no price tiers.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Price|null` |   |

### hasPrice

### clearPrice

### setPrice

Price of the phase. Present if there are no price tiers.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Price` |

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

### getPriceTiers

Price by the resource tiers.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.PriceTier>` |   |

### setPriceTiers

Price by the resource tiers.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.PriceTier>` |

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