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

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

Configurations for the offer that is associated with a single product.

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

Namespace

Google \ Cloud \ CommerceProducer \ V1beta \ PrivateOffer

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ amended_private_offer string

Optional. An existing private offer that will be superseded by this offer. Unless the private offer is for a product type that supports multiple active orders, an amendment private offer must be transacted if and only if the destination customer billing account already contains an active order for the same product. The offer to be superseded must be the offer associated with an active order. Amendments generally fall into one of two scenarios: 1. Active Order / Ended Offer: The term of the amended offer has ended but it is still associated with an active order. The new offer must amend the ended private offer. 2. Active Order / Active Offer: The term of the amended offer is still active and the associated order is active. Similar to above, the new offer must amend the currently active offer (unless "multiple active orders" are supported). If this is set, then the base_standard_offer parent service must match the parent service of the base_standard_offer in the amended_private_offer. Active Term Restrictions: If the term of the amended private offer has NOT ended, then the following compatibility rules apply: * * Price Model Compatibility: * * Flat Fee (with or without usage) offers can amend Flat Fee offers. * * Usage-only or CUD offers can amend usage-only offers. * * Commitment-based offers must amend offers of the same price model subtype (e.g., "additional usage at list price" vs "all usage discounted"). * * Billing Frequency Compatibility: Determined by standard_interval or custom_interval_price. * * If the amended offer has a custom billing frequency, the new offer must also have a custom frequency. * * If the amended offer has a standard frequency (Monthly, Quarterly, or Yearly), the new offer must maintain the same frequency or transition to a custom frequency. * * Switching between different standard frequencies (e.g., Monthly to Quarterly) is not supported. * * For Monthly frequency, switching between MONTHLY_PRORATED and MONTHLY_NOT_PRORATED is supported, unless the offer's term.end_policy is MATCH_AMENDED_OFFER. * * For usage-only offers, there are no billing frequency restrictions. Other criteria for offer amendment are detailed elsewhere.

↳ amended_standard_offer string

Optional. An existing standard offer that will be superseded by this offer. An amendment private offer must be transacted if the destination customer billing account already contains an active order for the same product, and otherwise cannot be transacted. The offer to be superseded must be the offer associated with the active order. If this is set, then the base_standard_offer must contain the same parent service as the parent service of the amended_standard_offer. The price model of this offer must be compatible with the price model of the amended_standard_offer: * * Flat Fee, or Flat Fee with usage offers can amend Flat Fee or Flat Fee with usage standard offers. * * Usage-only offers, or CUD offers can amend usage-only standard offers. Other criteria for offer amendment are detailed elsewhere.

↳ standard_interval_price SingleProductOffer\StandardIntervalPrice

Optional. Price configurations for offers with standard intervals. A price must be set when publishing the offer.

↳ custom_interval_price SingleProductOffer\CustomIntervalPrice

Optional. Price configurations for offers with custom intervals. Custom interval corresponds to "custom billing frequency", see https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule. A price must be set when publishing the offer.

↳ base_standard_offer string

Optional. The StandardOffer this PrivateOffer is based on. Must be in the same project as the private offer, and must be effective at the time of publishing. Must be present to publish the offer. Format: projects/{project}/locations/{location}/services/{service}/standardOffers/{standard_offer}

↳ service_level string

Output only. The service level (also known as the 'plan') of the base standard offer. The value is populated at publish time from the base standard offer.

↳ reseller_private_offer_plan_id string

Output only. Present for offers created by a reseller from a reseller private offer plan (RPOP). When set, contains the ID of the originating RPOP. Not included for PRIVATE_OFFER_VIEW_BASIC.

↳ features array<SingleProductOffer\Feature>

Optional. The custom product features to display for this offer. Feature display_name values must be unique to publish the offer. The set of features specified here should generally include all features included in the base service level, with optionally customized values, but is not required to match exactly and may include additional features.

↳ effective_installment_timeline array<SingleProductOffer\Installment>

Output only. The effective installment timeline of the offer. Not included for PRIVATE_OFFER_VIEW_BASIC. Included for PRIVATE_OFFER_VIEW_FULL if all necessary information is available to generate the timeline, and if the offer has 'standard_interval_price' of 'MONTHLY_PRORATED', 'MONTHLY_NOT_PRORATED', 'QUARTERLY_NOT_PRORATED', or 'YEARLY_NOT_PRORATED'.

↳ contract_value SingleProductOffer\ContractValue

Output only. Contract value of the offer. Not included for PRIVATE_OFFER_VIEW_BASIC.

↳ revenue_share SingleProductOffer\RevenueShare

Output only. Revenue share information for this Private Offer. Not included for PRIVATE_OFFER_VIEW_BASIC.

↳ additional_contract_value SingleProductOffer\AdditionalContractValue

Optional. Additional contract value that the customer is legally obligated to spend on the product over the duration of the offer.

getAmendedPrivateOffer

Optional. An existing private offer that will be superseded by this offer. Unless the private offer is for a product type that supports multiple active orders, an amendment private offer must be transacted if and only if the destination customer billing account already contains an active order for the same product. The offer to be superseded must be the offer associated with an active order.

Amendments generally fall into one of two scenarios:

  1. Active Order / Ended Offer: The term of the amended offer has ended but it is still associated with an active order. The new offer must amend the ended private offer.
  2. Active Order / Active Offer: The term of the amended offer is still active and the associated order is active. Similar to above, the new offer must amend the currently active offer (unless "multiple active orders" are supported). If this is set, then the base_standard_offer parent service must match the parent service of the base_standard_offer in the amended_private_offer. Active Term Restrictions: If the term of the amended private offer has NOT ended, then the following compatibility rules apply:
  3. Price Model Compatibility:
    • Flat Fee (with or without usage) offers can amend Flat Fee offers.
    • Usage-only or CUD offers can amend usage-only offers.
    • Commitment-based offers must amend offers of the same price model subtype (e.g., "additional usage at list price" vs "all usage discounted").
  4. Billing Frequency Compatibility: Determined by standard_interval or custom_interval_price.
    • If the amended offer has a custom billing frequency, the new offer must also have a custom frequency.
    • If the amended offer has a standard frequency (Monthly, Quarterly, or Yearly), the new offer must maintain the same frequency or transition to a custom frequency.
    • Switching between different standard frequencies (e.g., Monthly to Quarterly) is not supported.
    • For Monthly frequency, switching between MONTHLY_PRORATED and MONTHLY_NOT_PRORATED is supported, unless the offer's term.end_policy is MATCH_AMENDED_OFFER.
    • For usage-only offers, there are no billing frequency restrictions. Other criteria for offer amendment are detailed elsewhere.
Returns
Type Description
string

hasAmendedPrivateOffer

setAmendedPrivateOffer

Optional. An existing private offer that will be superseded by this offer. Unless the private offer is for a product type that supports multiple active orders, an amendment private offer must be transacted if and only if the destination customer billing account already contains an active order for the same product. The offer to be superseded must be the offer associated with an active order.

Amendments generally fall into one of two scenarios:

  1. Active Order / Ended Offer: The term of the amended offer has ended but it is still associated with an active order. The new offer must amend the ended private offer.
  2. Active Order / Active Offer: The term of the amended offer is still active and the associated order is active. Similar to above, the new offer must amend the currently active offer (unless "multiple active orders" are supported). If this is set, then the base_standard_offer parent service must match the parent service of the base_standard_offer in the amended_private_offer. Active Term Restrictions: If the term of the amended private offer has NOT ended, then the following compatibility rules apply:
  3. Price Model Compatibility:
    • Flat Fee (with or without usage) offers can amend Flat Fee offers.
    • Usage-only or CUD offers can amend usage-only offers.
    • Commitment-based offers must amend offers of the same price model subtype (e.g., "additional usage at list price" vs "all usage discounted").
  4. Billing Frequency Compatibility: Determined by standard_interval or custom_interval_price.
    • If the amended offer has a custom billing frequency, the new offer must also have a custom frequency.
    • If the amended offer has a standard frequency (Monthly, Quarterly, or Yearly), the new offer must maintain the same frequency or transition to a custom frequency.
    • Switching between different standard frequencies (e.g., Monthly to Quarterly) is not supported.
    • For Monthly frequency, switching between MONTHLY_PRORATED and MONTHLY_NOT_PRORATED is supported, unless the offer's term.end_policy is MATCH_AMENDED_OFFER.
    • For usage-only offers, there are no billing frequency restrictions. Other criteria for offer amendment are detailed elsewhere.
Parameter
Name Description
var string
Returns
Type Description
$this

getAmendedStandardOffer

Optional. An existing standard offer that will be superseded by this offer. An amendment private offer must be transacted if the destination customer billing account already contains an active order for the same product, and otherwise cannot be transacted. The offer to be superseded must be the offer associated with the active order.

If this is set, then the base_standard_offer must contain the same parent service as the parent service of the amended_standard_offer. The price model of this offer must be compatible with the price model of the amended_standard_offer:

  • Flat Fee, or Flat Fee with usage offers can amend Flat Fee or Flat Fee with usage standard offers.
  • Usage-only offers, or CUD offers can amend usage-only standard offers. Other criteria for offer amendment are detailed elsewhere.
Returns
Type Description
string

hasAmendedStandardOffer

setAmendedStandardOffer

Optional. An existing standard offer that will be superseded by this offer. An amendment private offer must be transacted if the destination customer billing account already contains an active order for the same product, and otherwise cannot be transacted. The offer to be superseded must be the offer associated with the active order.

If this is set, then the base_standard_offer must contain the same parent service as the parent service of the amended_standard_offer. The price model of this offer must be compatible with the price model of the amended_standard_offer:

  • Flat Fee, or Flat Fee with usage offers can amend Flat Fee or Flat Fee with usage standard offers.
  • Usage-only offers, or CUD offers can amend usage-only standard offers. Other criteria for offer amendment are detailed elsewhere.
Parameter
Name Description
var string
Returns
Type Description
$this

getStandardIntervalPrice

Optional. Price configurations for offers with standard intervals.

A price must be set when publishing the offer.

Returns
Type Description
SingleProductOffer\StandardIntervalPrice|null

hasStandardIntervalPrice

setStandardIntervalPrice

Optional. Price configurations for offers with standard intervals.

A price must be set when publishing the offer.

Parameter
Name Description
var SingleProductOffer\StandardIntervalPrice
Returns
Type Description
$this

getCustomIntervalPrice

Optional. Price configurations for offers with custom intervals.

Custom interval corresponds to "custom billing frequency", see https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule. A price must be set when publishing the offer.

Returns
Type Description
SingleProductOffer\CustomIntervalPrice|null

hasCustomIntervalPrice

setCustomIntervalPrice

Optional. Price configurations for offers with custom intervals.

Custom interval corresponds to "custom billing frequency", see https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule. A price must be set when publishing the offer.

Parameter
Name Description
var SingleProductOffer\CustomIntervalPrice
Returns
Type Description
$this

getBaseStandardOffer

Optional. The StandardOffer this PrivateOffer is based on.

Must be in the same project as the private offer, and must be effective at the time of publishing. Must be present to publish the offer. Format: projects/{project}/locations/{location}/services/{service}/standardOffers/{standard_offer}

Returns
Type Description
string

setBaseStandardOffer

Optional. The StandardOffer this PrivateOffer is based on.

Must be in the same project as the private offer, and must be effective at the time of publishing. Must be present to publish the offer. Format: projects/{project}/locations/{location}/services/{service}/standardOffers/{standard_offer}

Parameter
Name Description
var string
Returns
Type Description
$this

getServiceLevel

Output only. The service level (also known as the 'plan') of the base standard offer. The value is populated at publish time from the base standard offer.

Returns
Type Description
string

setServiceLevel

Output only. The service level (also known as the 'plan') of the base standard offer. The value is populated at publish time from the base standard offer.

Parameter
Name Description
var string
Returns
Type Description
$this

getResellerPrivateOfferPlanId

Output only. Present for offers created by a reseller from a reseller private offer plan (RPOP). When set, contains the ID of the originating RPOP. Not included for PRIVATE_OFFER_VIEW_BASIC.

Returns
Type Description
string

setResellerPrivateOfferPlanId

Output only. Present for offers created by a reseller from a reseller private offer plan (RPOP). When set, contains the ID of the originating RPOP. Not included for PRIVATE_OFFER_VIEW_BASIC.

Parameter
Name Description
var string
Returns
Type Description
$this

getFeatures

Optional. The custom product features to display for this offer.

Feature display_name values must be unique to publish the offer. The set of features specified here should generally include all features included in the base service level, with optionally customized values, but is not required to match exactly and may include additional features.

Returns
Type Description
Google\Protobuf\RepeatedField<SingleProductOffer\Feature>

setFeatures

Optional. The custom product features to display for this offer.

Feature display_name values must be unique to publish the offer. The set of features specified here should generally include all features included in the base service level, with optionally customized values, but is not required to match exactly and may include additional features.

Parameter
Name Description
var array<SingleProductOffer\Feature>
Returns
Type Description
$this

getEffectiveInstallmentTimeline

Output only. The effective installment timeline of the offer.

Not included for PRIVATE_OFFER_VIEW_BASIC. Included for PRIVATE_OFFER_VIEW_FULL if all necessary information is available to generate the timeline, and if the offer has 'standard_interval_price' of 'MONTHLY_PRORATED', 'MONTHLY_NOT_PRORATED', 'QUARTERLY_NOT_PRORATED', or 'YEARLY_NOT_PRORATED'.

Returns
Type Description
Google\Protobuf\RepeatedField<SingleProductOffer\Installment>

setEffectiveInstallmentTimeline

Output only. The effective installment timeline of the offer.

Not included for PRIVATE_OFFER_VIEW_BASIC. Included for PRIVATE_OFFER_VIEW_FULL if all necessary information is available to generate the timeline, and if the offer has 'standard_interval_price' of 'MONTHLY_PRORATED', 'MONTHLY_NOT_PRORATED', 'QUARTERLY_NOT_PRORATED', or 'YEARLY_NOT_PRORATED'.

Parameter
Name Description
var array<SingleProductOffer\Installment>
Returns
Type Description
$this

getContractValue

Output only. Contract value of the offer.

Not included for PRIVATE_OFFER_VIEW_BASIC.

Returns
Type Description
SingleProductOffer\ContractValue|null

hasContractValue

clearContractValue

setContractValue

Output only. Contract value of the offer.

Not included for PRIVATE_OFFER_VIEW_BASIC.

Parameter
Name Description
var SingleProductOffer\ContractValue
Returns
Type Description
$this

getRevenueShare

Output only. Revenue share information for this Private Offer.

Not included for PRIVATE_OFFER_VIEW_BASIC.

Returns
Type Description
SingleProductOffer\RevenueShare|null

hasRevenueShare

clearRevenueShare

setRevenueShare

Output only. Revenue share information for this Private Offer.

Not included for PRIVATE_OFFER_VIEW_BASIC.

Parameter
Name Description
var SingleProductOffer\RevenueShare
Returns
Type Description
$this

getAdditionalContractValue

Optional. Additional contract value that the customer is legally obligated to spend on the product over the duration of the offer.

Returns
Type Description
SingleProductOffer\AdditionalContractValue|null

hasAdditionalContractValue

clearAdditionalContractValue

setAdditionalContractValue

Optional. Additional contract value that the customer is legally obligated to spend on the product over the duration of the offer.

Parameter
Name Description
var SingleProductOffer\AdditionalContractValue
Returns
Type Description
$this

getAmendedOffer

Returns
Type Description
string

getPrice

Returns
Type Description
string