# Google Cloud Channel V1 Client - Class Price (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 Price.

Represents the price of the Offer.

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

## Namespace

Google \\ Cloud \\ Channel \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ base_price` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Money.html` Base price. |
| `↳ discount` | `float` Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2. |
| `↳ effective_price` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Money.html` Effective Price after applying the discounts. |
| `↳ price_period` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Period` The time period with respect to which base and effective prices are defined. Example: 1 month, 6 months, 1 year, etc. |
| `↳ external_price_uri` | `string` Link to external price list, such as link to Google Voice rate card. |
| `↳ discount_components` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.DiscountComponent>` Breakdown of the discount into its components. This will be empty if there is no discount present. |

### getBasePrice

Base price.

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

### hasBasePrice

### clearBasePrice

### setBasePrice

Base price.

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

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

### getDiscount

Discount percentage, represented as decimal.

For example, a 20% discount will be represent as 0.2.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setDiscount

Discount percentage, represented as decimal.

For example, a 20% discount will be represent as 0.2.

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

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

### getEffectivePrice

Effective Price after applying the discounts.

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

### hasEffectivePrice

### clearEffectivePrice

### setEffectivePrice

Effective Price after applying the discounts.

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

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

### getPricePeriod

The time period with respect to which base and effective prices are
defined.

Example: 1 month, 6 months, 1 year, etc.

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

### hasPricePeriod

### clearPricePeriod

### setPricePeriod

The time period with respect to which base and effective prices are
defined.

Example: 1 month, 6 months, 1 year, etc.

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

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

### getExternalPriceUri

Link to external price list, such as link to Google Voice rate card.

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

### setExternalPriceUri

Link to external price list, such as link to Google Voice rate card.

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

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

### getDiscountComponents

Breakdown of the discount into its components.

This will be empty if there is no discount present.

| **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.DiscountComponent>` |   |

### setDiscountComponents

Breakdown of the discount into its components.

This will be empty if there is no discount present.

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

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