Reference documentation and code samples for the Google Cloud Commerce Producer V1beta Client class TieredPrice.
Price structure for a SKU charging a tiered price.
Generated from protobuf message google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPrice
Namespace
Google \ Cloud \ CommerceProducer \ V1beta \ Sku \ SkuPriceMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ unit |
string
Output only. Usage unit used for defining price tiers and for scaling with the price_unit_count to form the composite price unit. See https://ucum.org/ucum.html for the format of the price unit. A unitless dimension, such as a count, is represented as |
↳ unit_description |
string
Output only. The display description of the unit, supplied at time of onboarding. This value is recommended to be set at least for dimensionless metrics, but may be empty if no description was provided at time of onboarding. |
↳ price_unit_count |
Google\Type\Decimal
Output only. Scaling the |
↳ price_tiers |
array<TieredPrice\PriceTier>
Output only. The list of price tiers for the SKU, ordered by the start_amount. The tiers are non-overlapping and are collectively bounded below by zero and unbounded above to cover the entire range of possible metric usage. Each tier is bounded below inclusively by its start_amount and bounded above exclusively by the start_amount of the next tier, or else unbounded above if there is no next tier. Usage of the metric is aggregated by customer billing account on a monthly basis and billed in a graduated manner according to the price tiers, with each marginal unit of usage priced accoring to the tier in which it falls. |
getUnit
Output only. Usage unit used for defining price tiers and for scaling with the price_unit_count to form the composite price unit.
See https://ucum.org/ucum.html for the format of the price unit.
A unitless dimension, such as a count, is represented as 1.
| Returns | |
|---|---|
| Type | Description |
string |
|
setUnit
Output only. Usage unit used for defining price tiers and for scaling with the price_unit_count to form the composite price unit.
See https://ucum.org/ucum.html for the format of the price unit.
A unitless dimension, such as a count, is represented as 1.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getUnitDescription
Output only. The display description of the unit, supplied at time of onboarding. This value is recommended to be set at least for dimensionless metrics, but may be empty if no description was provided at time of onboarding.
| Returns | |
|---|---|
| Type | Description |
string |
|
setUnitDescription
Output only. The display description of the unit, supplied at time of onboarding. This value is recommended to be set at least for dimensionless metrics, but may be empty if no description was provided at time of onboarding.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getPriceUnitCount
Output only. Scaling the unit by the price_unit_count forms the
composite "price unit" which is priced by the price tiers.
This scaling factor is in addition to any numerical prefix symbol on
the unit, so the same composite "price unit" can be represented in
several ways, differing only in their presentation to users.
Examples:
- $1 per 1 bytes : unit = By, price_unit_count = 1
- $1000 per 1 kilobytes : unit = kBy, price_unit_count = 1
- $5000 per 5 kilobytes : unit = kBy, price_unit_count = 5
| Returns | |
|---|---|
| Type | Description |
Google\Type\Decimal|null |
|
hasPriceUnitCount
clearPriceUnitCount
setPriceUnitCount
Output only. Scaling the unit by the price_unit_count forms the
composite "price unit" which is priced by the price tiers.
This scaling factor is in addition to any numerical prefix symbol on
the unit, so the same composite "price unit" can be represented in
several ways, differing only in their presentation to users.
Examples:
- $1 per 1 bytes : unit = By, price_unit_count = 1
- $1000 per 1 kilobytes : unit = kBy, price_unit_count = 1
- $5000 per 5 kilobytes : unit = kBy, price_unit_count = 5
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Type\Decimal
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getPriceTiers
Output only. The list of price tiers for the SKU, ordered by the start_amount.
The tiers are non-overlapping and are collectively bounded below by zero and unbounded above to cover the entire range of possible metric usage. Each tier is bounded below inclusively by its start_amount and bounded above exclusively by the start_amount of the next tier, or else unbounded above if there is no next tier. Usage of the metric is aggregated by customer billing account on a monthly basis and billed in a graduated manner according to the price tiers, with each marginal unit of usage priced accoring to the tier in which it falls.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<TieredPrice\PriceTier> |
|
setPriceTiers
Output only. The list of price tiers for the SKU, ordered by the start_amount.
The tiers are non-overlapping and are collectively bounded below by zero and unbounded above to cover the entire range of possible metric usage. Each tier is bounded below inclusively by its start_amount and bounded above exclusively by the start_amount of the next tier, or else unbounded above if there is no next tier. Usage of the metric is aggregated by customer billing account on a monthly basis and billed in a graduated manner according to the price tiers, with each marginal unit of usage priced accoring to the tier in which it falls.
| Parameter | |
|---|---|
| Name | Description |
var |
array<TieredPrice\PriceTier>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|