Google Cloud Billing V1 Client - Class PricingInfo (1.5.6)

Reference documentation and code samples for the Google Cloud Billing V1 Client class PricingInfo.

Represents the pricing information for a SKU at a single point of time.

Generated from protobuf message google.cloud.billing.v1.PricingInfo

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ effective_time Google\Protobuf\Timestamp

The timestamp from which this pricing was effective within the requested time range. This is guaranteed to be greater than or equal to the start_time field in the request and less than the end_time field in the request. If a time range was not specified in the request this field will be equivalent to a time within the last 12 hours, indicating the latest pricing info.

↳ summary string

An optional human readable summary of the pricing information, has a maximum length of 256 characters.

↳ pricing_expression Google\Cloud\Billing\V1\PricingExpression

Expresses the pricing formula. See PricingExpression for an example.

↳ aggregation_info Google\Cloud\Billing\V1\AggregationInfo

Aggregation Info. This can be left unspecified if the pricing expression doesn't require aggregation.

↳ currency_conversion_rate float

Conversion rate used for currency conversion, from USD to the currency specified in the request. This includes any surcharge collected for billing in non USD currency. If a currency is not specified in the request this defaults to 1.0. Example: USD * currency_conversion_rate = JPY

getEffectiveTime

The timestamp from which this pricing was effective within the requested time range. This is guaranteed to be greater than or equal to the start_time field in the request and less than the end_time field in the request. If a time range was not specified in the request this field will be equivalent to a time within the last 12 hours, indicating the latest pricing info.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasEffectiveTime

clearEffectiveTime

setEffectiveTime

The timestamp from which this pricing was effective within the requested time range. This is guaranteed to be greater than or equal to the start_time field in the request and less than the end_time field in the request. If a time range was not specified in the request this field will be equivalent to a time within the last 12 hours, indicating the latest pricing info.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getSummary

An optional human readable summary of the pricing information, has a maximum length of 256 characters.

Returns
TypeDescription
string

setSummary

An optional human readable summary of the pricing information, has a maximum length of 256 characters.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getPricingExpression

Expresses the pricing formula. See PricingExpression for an example.

Returns
TypeDescription
Google\Cloud\Billing\V1\PricingExpression|null

hasPricingExpression

clearPricingExpression

setPricingExpression

Expresses the pricing formula. See PricingExpression for an example.

Parameter
NameDescription
var Google\Cloud\Billing\V1\PricingExpression
Returns
TypeDescription
$this

getAggregationInfo

Aggregation Info. This can be left unspecified if the pricing expression doesn't require aggregation.

Returns
TypeDescription
Google\Cloud\Billing\V1\AggregationInfo|null

hasAggregationInfo

clearAggregationInfo

setAggregationInfo

Aggregation Info. This can be left unspecified if the pricing expression doesn't require aggregation.

Parameter
NameDescription
var Google\Cloud\Billing\V1\AggregationInfo
Returns
TypeDescription
$this

getCurrencyConversionRate

Conversion rate used for currency conversion, from USD to the currency specified in the request. This includes any surcharge collected for billing in non USD currency. If a currency is not specified in the request this defaults to 1.0.

Example: USD * currency_conversion_rate = JPY

Returns
TypeDescription
float

setCurrencyConversionRate

Conversion rate used for currency conversion, from USD to the currency specified in the request. This includes any surcharge collected for billing in non USD currency. If a currency is not specified in the request this defaults to 1.0.

Example: USD * currency_conversion_rate = JPY

Parameter
NameDescription
var float
Returns
TypeDescription
$this