Reference documentation and code samples for the Billing V1 API class Google::Cloud::Billing::V1::PricingExpression.
Expresses a mathematical pricing formula. For Example:-
usage_unit: GBy
tiered_rates:
[start_usage_amount: 20, unit_price: $10]
[start_usage_amount: 100, unit_price: $5]
The above expresses a pricing formula where the first 20GB is free, the next 80GB is priced at $10 per GB followed by $5 per GB for additional usage.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#base_unit
def base_unit() -> ::String
- (::String) — The base unit for the SKU which is the unit used in usage exports. Example: "By"
#base_unit=
def base_unit=(value) -> ::String
- value (::String) — The base unit for the SKU which is the unit used in usage exports. Example: "By"
- (::String) — The base unit for the SKU which is the unit used in usage exports. Example: "By"
#base_unit_conversion_factor
def base_unit_conversion_factor() -> ::Float
- (::Float) — Conversion factor for converting from price per usage_unit to price per base_unit, and start_usage_amount to start_usage_amount in base_unit. unit_price / base_unit_conversion_factor = price per base_unit. start_usage_amount * base_unit_conversion_factor = start_usage_amount in base_unit.
#base_unit_conversion_factor=
def base_unit_conversion_factor=(value) -> ::Float
- value (::Float) — Conversion factor for converting from price per usage_unit to price per base_unit, and start_usage_amount to start_usage_amount in base_unit. unit_price / base_unit_conversion_factor = price per base_unit. start_usage_amount * base_unit_conversion_factor = start_usage_amount in base_unit.
- (::Float) — Conversion factor for converting from price per usage_unit to price per base_unit, and start_usage_amount to start_usage_amount in base_unit. unit_price / base_unit_conversion_factor = price per base_unit. start_usage_amount * base_unit_conversion_factor = start_usage_amount in base_unit.
#base_unit_description
def base_unit_description() -> ::String
- (::String) — The base unit in human readable form. Example: "byte".
#base_unit_description=
def base_unit_description=(value) -> ::String
- value (::String) — The base unit in human readable form. Example: "byte".
- (::String) — The base unit in human readable form. Example: "byte".
#display_quantity
def display_quantity() -> ::Float
- (::Float) — The recommended quantity of units for displaying pricing info. When displaying pricing info it is recommended to display: (unit_price * display_quantity) per display_quantity usage_unit. This field does not affect the pricing formula and is for display purposes only. Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and the display_quantity is "1000" then the recommended way of displaying the pricing info is "0.10 USD per 1000 GB"
#display_quantity=
def display_quantity=(value) -> ::Float
- value (::Float) — The recommended quantity of units for displaying pricing info. When displaying pricing info it is recommended to display: (unit_price * display_quantity) per display_quantity usage_unit. This field does not affect the pricing formula and is for display purposes only. Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and the display_quantity is "1000" then the recommended way of displaying the pricing info is "0.10 USD per 1000 GB"
- (::Float) — The recommended quantity of units for displaying pricing info. When displaying pricing info it is recommended to display: (unit_price * display_quantity) per display_quantity usage_unit. This field does not affect the pricing formula and is for display purposes only. Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and the display_quantity is "1000" then the recommended way of displaying the pricing info is "0.10 USD per 1000 GB"
#tiered_rates
def tiered_rates() -> ::Array<::Google::Cloud::Billing::V1::PricingExpression::TierRate>
- (::Array<::Google::Cloud::Billing::V1::PricingExpression::TierRate>) — The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
#tiered_rates=
def tiered_rates=(value) -> ::Array<::Google::Cloud::Billing::V1::PricingExpression::TierRate>
- value (::Array<::Google::Cloud::Billing::V1::PricingExpression::TierRate>) — The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
- (::Array<::Google::Cloud::Billing::V1::PricingExpression::TierRate>) — The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
#usage_unit
def usage_unit() -> ::String
- (::String) — The short hand for unit of usage this pricing is specified in. Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte".
#usage_unit=
def usage_unit=(value) -> ::String
- value (::String) — The short hand for unit of usage this pricing is specified in. Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte".
- (::String) — The short hand for unit of usage this pricing is specified in. Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte".
#usage_unit_description
def usage_unit_description() -> ::String
- (::String) — The unit of usage in human readable form. Example: "gibi byte".
#usage_unit_description=
def usage_unit_description=(value) -> ::String
- value (::String) — The unit of usage in human readable form. Example: "gibi byte".
- (::String) — The unit of usage in human readable form. Example: "gibi byte".