Cloud Commerce Producer V1BETA API - Class Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel::Usage (v0.1.0)

Reference documentation and code samples for the Cloud Commerce Producer V1BETA API class Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel::Usage.

The price for the usage SKUs.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#default_discount_percent

def default_discount_percent() -> ::Google::Type::Decimal
Returns
  • (::Google::Type::Decimal) — Optional. The default discount percent for usage SKUs. An unset default discount percent is equivalent to 0 (no discount).

    Must be between 0 and 100 inclusive, with precision up to 2 decimal places. If this field is set, then the allowed pattern for 'value' is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$. Examples of valid values: "0", "100.0", "12.34", "40.0". Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".

#default_discount_percent=

def default_discount_percent=(value) -> ::Google::Type::Decimal
Parameter
  • value (::Google::Type::Decimal) — Optional. The default discount percent for usage SKUs. An unset default discount percent is equivalent to 0 (no discount).

    Must be between 0 and 100 inclusive, with precision up to 2 decimal places. If this field is set, then the allowed pattern for 'value' is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$. Examples of valid values: "0", "100.0", "12.34", "40.0". Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".

Returns
  • (::Google::Type::Decimal) — Optional. The default discount percent for usage SKUs. An unset default discount percent is equivalent to 0 (no discount).

    Must be between 0 and 100 inclusive, with precision up to 2 decimal places. If this field is set, then the allowed pattern for 'value' is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$. Examples of valid values: "0", "100.0", "12.34", "40.0". Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".

#sku_discounts

def sku_discounts() -> ::Array<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel::SkuDiscount>
Returns

#sku_discounts=

def sku_discounts=(value) -> ::Array<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel::SkuDiscount>
Parameter
Returns