Interface LineItemDiscountOrBuilder (0.54.0)

public interface LineItemDiscountOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getDiscount()

public abstract double 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.

optional double discount = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
double

The discount.

getDiscountType()

public abstract DiscountTypeEnum.DiscountType getDiscountType()

Optional. The type of discount being applied to a LineItem, either percentage based or absolute. This attribute is optional and defaults to PERCENTAGE.

optional .google.ads.admanager.v1.DiscountTypeEnum.DiscountType discount_type = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DiscountTypeEnum.DiscountType

The discountType.

getDiscountTypeValue()

public abstract int getDiscountTypeValue()

Optional. The type of discount being applied to a LineItem, either percentage based or absolute. This attribute is optional and defaults to PERCENTAGE.

optional .google.ads.admanager.v1.DiscountTypeEnum.DiscountType discount_type = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for discountType.

hasDiscount()

public abstract boolean hasDiscount()

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.

optional double discount = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the discount field is set.

hasDiscountType()

public abstract boolean hasDiscountType()

Optional. The type of discount being applied to a LineItem, either percentage based or absolute. This attribute is optional and defaults to PERCENTAGE.

optional .google.ads.admanager.v1.DiscountTypeEnum.DiscountType discount_type = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the discountType field is set.