Reference documentation and code samples for the Google Ads Ad Manager V1 Client class LineItemDiscount.
Discount information for a LineItem.
Generated from protobuf message google.ads.admanager.v1.LineItemDiscount
Namespace
Google \ Ads \ AdManager \ V1Methods
__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, either percentage based or absolute. This attribute is optional and defaults to PERCENTAGE. |
↳ discount |
float
Optional. The number here is either a percentage or an absolute value depending on the DiscountType. If the DiscountType is PERCENTAGE, then only non-fractional values are supported. |
getDiscountType
Optional. The type of discount being applied to a LineItem, either percentage based or absolute. This attribute is optional and defaults to PERCENTAGE.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasDiscountType
clearDiscountType
setDiscountType
Optional. The type of discount being applied to a LineItem, either percentage based or absolute. This attribute is optional and defaults to 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. If the DiscountType is 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. If the DiscountType is PERCENTAGE, then only non-fractional values are supported.
| Parameter | |
|---|---|
| Name | Description |
var |
float
|
| Returns | |
|---|---|
| Type | Description |
$this |
|