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

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) — 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) — 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) — 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

#discount_type=

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