# Cloud Channel V1 API - Class Google::Cloud::Channel::V1::DiscountComponent (v2.6.0)

2.6.0 (latest) 2.5.0 2.4.1 2.3.0 2.2.1 2.1.0 2.0.1 1.3.0 1.2.0 1.1.0 1.0.1 0.24.0 0.23.2 0.22.1 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.5 Reference documentation and code samples for the Cloud Channel V1 API class Google::Cloud::Channel::V1::DiscountComponent.

Represents a single component of the total discount applicable on a Price.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #discount_absolute

    def discount_absolute() -> ::Google::Type::Money

**Returns**

- ([::Google::Type::Money](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-channel-v1/latest/Google-Type-Money)) --- Fixed value discount.


  Note: The following fields are mutually exclusive: `discount_absolute`, `discount_percentage`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #discount_absolute=

    def discount_absolute=(value) -> ::Google::Type::Money

**Parameter**

- **value** ([::Google::Type::Money](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-channel-v1/latest/Google-Type-Money)) --- Fixed value discount.


  Note: The following fields are mutually exclusive: `discount_absolute`, `discount_percentage`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Type::Money](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-channel-v1/latest/Google-Type-Money)) --- Fixed value discount.


  Note: The following fields are mutually exclusive: `discount_absolute`, `discount_percentage`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #discount_percentage

    def discount_percentage() -> ::Float

**Returns**

- (::Float) --- Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.

  Note: The following fields are mutually exclusive: `discount_percentage`, `discount_absolute`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #discount_percentage=

    def discount_percentage=(value) -> ::Float

**Parameter**

- **value** (::Float) --- Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.


  Note: The following fields are mutually exclusive: `discount_percentage`, `discount_absolute`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::Float) --- Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.

  Note: The following fields are mutually exclusive: `discount_percentage`, `discount_absolute`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #discount_type

    def discount_type() -> ::Google::Cloud::Channel::V1::DiscountType

**Returns**

- ([::Google::Cloud::Channel::V1::DiscountType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-channel-v1/latest/Google-Cloud-Channel-V1-DiscountType)) --- Type of the discount.

### #discount_type=

    def discount_type=(value) -> ::Google::Cloud::Channel::V1::DiscountType

**Parameter**

- **value** ([::Google::Cloud::Channel::V1::DiscountType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-channel-v1/latest/Google-Cloud-Channel-V1-DiscountType)) --- Type of the discount.
**Returns**

- ([::Google::Cloud::Channel::V1::DiscountType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-channel-v1/latest/Google-Cloud-Channel-V1-DiscountType)) --- Type of the discount.