Google Cloud Commerce Producer V1beta Client - Class PriceModel (0.2.0)

Reference documentation and code samples for the Google Cloud Commerce Producer V1beta Client class PriceModel.

The price model of the private offer.

Private offers are referred to as having different kinds of price models based on the combination of fields set in the price model. The following terminology is used in documentation and other reference material.

  • Usage-based: the price model does not set flat_fee
  • Usage-only: the price model sets only usage
  • CUD (committed use discount): the price model sets commitment
    • Commitment discount with additional usage at list price: The price model sets commitment and not usage.
    • Commitment with all usage discounted: The price model sets commitment and usage.
  • Flat fee: the price model sets only flat_fee
  • Flat fee with usage: the price model sets flat_fee and usage See https://docs.cloud.google.com/marketplace/docs/partners/offers/select-pricing-model#CUD for the price models.

Generated from protobuf message google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel

Namespace

Google \ Cloud \ CommerceProducer \ V1beta \ PrivateOffer \ SingleProductOffer

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ flat_fee PriceModel\FlatFee

Optional. The price configurations for the flat fee subscription. Must be unset when the base standard offer's price model does not include subscription SKUs.

↳ commitment PriceModel\Commitment

Optional. The price configurations for the commitment based subscription. Must be unset when the base standard offer's price model includes subscription SKUs.

↳ usage PriceModel\Usage

Optional. The price configurations for the usage part. If this field is set, the Commitment.discount_percent must be unset. A private offer can apply a discount to all usage or to a usage commitment, but not both. Must be unset when the base standard offer's price model includes no usage SKUs.

getFlatFee

Optional. The price configurations for the flat fee subscription.

Must be unset when the base standard offer's price model does not include subscription SKUs.

Returns
Type Description
PriceModel\FlatFee|null

hasFlatFee

setFlatFee

Optional. The price configurations for the flat fee subscription.

Must be unset when the base standard offer's price model does not include subscription SKUs.

Parameter
Name Description
var PriceModel\FlatFee
Returns
Type Description
$this

getCommitment

Optional. The price configurations for the commitment based subscription. Must be unset when the base standard offer's price model includes subscription SKUs.

Returns
Type Description
PriceModel\Commitment|null

hasCommitment

setCommitment

Optional. The price configurations for the commitment based subscription. Must be unset when the base standard offer's price model includes subscription SKUs.

Parameter
Name Description
var PriceModel\Commitment
Returns
Type Description
$this

getUsage

Optional. The price configurations for the usage part.

If this field is set, the Commitment.discount_percent must be unset. A private offer can apply a discount to all usage or to a usage commitment, but not both. Must be unset when the base standard offer's price model includes no usage SKUs.

Returns
Type Description
PriceModel\Usage|null

hasUsage

clearUsage

setUsage

Optional. The price configurations for the usage part.

If this field is set, the Commitment.discount_percent must be unset. A private offer can apply a discount to all usage or to a usage commitment, but not both. Must be unset when the base standard offer's price model includes no usage SKUs.

Parameter
Name Description
var PriceModel\Usage
Returns
Type Description
$this

getSubscription

Returns
Type Description
string