0.16.0 (latest) 0.15.1 0.14.1 0.8.0 0.7.0 0.6.2 0.5.0 0.4.1 0.3.1 0.2.0 0.1.3 Reference documentation and code samples for the Google Ads Ad Manager V1 Client class LineItemDiscount.

Discount information for a [LineItem](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.LineItem).

Generated from protobuf message `google.ads.admanager.v1.LineItemDiscount`

## Namespace

Google \\ Ads \\ AdManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ discount_type` | `int` Optional. The type of discount being applied to a [LineItem](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.LineItem), either percentage based or absolute. This attribute is optional and defaults to [PERCENTAGE](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.DiscountTypeEnum.DiscountType#_Google_Ads_AdManager_V1_DiscountTypeEnum_DiscountType__PERCENTAGE). |
| `↳ discount` | `float` Optional. The number here is either a percentage or an absolute value depending on the [DiscountType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.DiscountTypeEnum.DiscountType). If the [DiscountType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.DiscountTypeEnum.DiscountType) is [PERCENTAGE](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.DiscountTypeEnum.DiscountType#_Google_Ads_AdManager_V1_DiscountTypeEnum_DiscountType__PERCENTAGE), then only non-fractional values are supported. |

### getDiscountType

Optional. The type of discount being applied to a
[LineItem](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.LineItem), either percentage based or
absolute. This attribute is optional and defaults to
[PERCENTAGE](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.DiscountTypeEnum.DiscountType#_Google_Ads_AdManager_V1_DiscountTypeEnum_DiscountType__PERCENTAGE).

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

### hasDiscountType

### clearDiscountType

### setDiscountType

Optional. The type of discount being applied to a
[LineItem](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.LineItem), either percentage based or
absolute. This attribute is optional and defaults to
[PERCENTAGE](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.DiscountTypeEnum.DiscountType#_Google_Ads_AdManager_V1_DiscountTypeEnum_DiscountType__PERCENTAGE).

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

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

### getDiscount

Optional. The number here is either a percentage or an absolute value
depending on the
[DiscountType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.DiscountTypeEnum.DiscountType). If
the [DiscountType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.DiscountTypeEnum.DiscountType)
is
[PERCENTAGE](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.DiscountTypeEnum.DiscountType#_Google_Ads_AdManager_V1_DiscountTypeEnum_DiscountType__PERCENTAGE),
then only non-fractional values are supported.

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

### hasDiscount

### clearDiscount

### setDiscount

Optional. The number here is either a percentage or an absolute value
depending on the
[DiscountType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.DiscountTypeEnum.DiscountType). If
the [DiscountType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.DiscountTypeEnum.DiscountType)
is
[PERCENTAGE](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.DiscountTypeEnum.DiscountType#_Google_Ads_AdManager_V1_DiscountTypeEnum_DiscountType__PERCENTAGE),
then only non-fractional values are supported.

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

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