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

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

The discount for a specific SKU.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#cloud_billing_sku

def cloud_billing_sku() -> ::String
Returns
  • (::String) — Optional. The name of a Google SKU from the Cloud Billing API.

    Used for partner products sold by Google, such as Premium Operating System Images sold for use in Compute Engine. This is not common. SKUs of this type are not present on this API and can instead be found on the Cloud Billing API or at https://cloud.google.com/skus.

    Must refer to a SKU in the price model of the base standard offer. Google SKUs are always referenced in standard offers via SkuGroups.

    Format: services/{service}/skus/{sku}

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

#cloud_billing_sku=

def cloud_billing_sku=(value) -> ::String
Parameter
  • value (::String) — Optional. The name of a Google SKU from the Cloud Billing API.

    Used for partner products sold by Google, such as Premium Operating System Images sold for use in Compute Engine. This is not common. SKUs of this type are not present on this API and can instead be found on the Cloud Billing API or at https://cloud.google.com/skus.

    Must refer to a SKU in the price model of the base standard offer. Google SKUs are always referenced in standard offers via SkuGroups.

    Format: services/{service}/skus/{sku}

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

Returns
  • (::String) — Optional. The name of a Google SKU from the Cloud Billing API.

    Used for partner products sold by Google, such as Premium Operating System Images sold for use in Compute Engine. This is not common. SKUs of this type are not present on this API and can instead be found on the Cloud Billing API or at https://cloud.google.com/skus.

    Must refer to a SKU in the price model of the base standard offer. Google SKUs are always referenced in standard offers via SkuGroups.

    Format: services/{service}/skus/{sku}

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

#discount_percent

def discount_percent() -> ::Google::Type::Decimal
Returns
  • (::Google::Type::Decimal) — Optional. The discount percent for the SKU. For example, 10 means a discount of 10%. If the original SKU price is $100/hour then the discounted price will be $90/hour.

    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", and "". Must be present to publish the offer.

#discount_percent=

def discount_percent=(value) -> ::Google::Type::Decimal
Parameter
  • value (::Google::Type::Decimal) — Optional. The discount percent for the SKU. For example, 10 means a discount of 10%. If the original SKU price is $100/hour then the discounted price will be $90/hour.

    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", and "". Must be present to publish the offer.

Returns
  • (::Google::Type::Decimal) — Optional. The discount percent for the SKU. For example, 10 means a discount of 10%. If the original SKU price is $100/hour then the discounted price will be $90/hour.

    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", and "". Must be present to publish the offer.

#sku

def sku() -> ::String
Returns
  • (::String) — Optional. The name of a partner SKU from this API.

    Must refer to a SKU in the price model of the base standard offer. Inclusion in the base price model can occur either directly or indirectly via inclusion in an included SkuGroup.

    Currently, standard offer price models include only partner SKUs in the same project as the standard offer. This may change.

    Format: projects/{project}/locations/{location}/services/{service}/skus/{sku}

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

#sku=

def sku=(value) -> ::String
Parameter
  • value (::String) — Optional. The name of a partner SKU from this API.

    Must refer to a SKU in the price model of the base standard offer. Inclusion in the base price model can occur either directly or indirectly via inclusion in an included SkuGroup.

    Currently, standard offer price models include only partner SKUs in the same project as the standard offer. This may change.

    Format: projects/{project}/locations/{location}/services/{service}/skus/{sku}

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

Returns
  • (::String) — Optional. The name of a partner SKU from this API.

    Must refer to a SKU in the price model of the base standard offer. Inclusion in the base price model can occur either directly or indirectly via inclusion in an included SkuGroup.

    Currently, standard offer price models include only partner SKUs in the same project as the standard offer. This may change.

    Format: projects/{project}/locations/{location}/services/{service}/skus/{sku}

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