Class Sku.SkuPrice.FlatSubscriptionFee.Builder (0.1.0)

public static final class Sku.SkuPrice.FlatSubscriptionFee.Builder extends GeneratedMessage.Builder<Sku.SkuPrice.FlatSubscriptionFee.Builder> implements Sku.SkuPrice.FlatSubscriptionFeeOrBuilder

Details about a SKU charging a flat subscription fee.

Protobuf type google.cloud.commerceproducer.v1beta.Sku.SkuPrice.FlatSubscriptionFee

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public Sku.SkuPrice.FlatSubscriptionFee build()
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee

buildPartial()

public Sku.SkuPrice.FlatSubscriptionFee buildPartial()
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee

clear()

public Sku.SkuPrice.FlatSubscriptionFee.Builder clear()
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder
Overrides

clearPricePerUnit()

public Sku.SkuPrice.FlatSubscriptionFee.Builder clearPricePerUnit()

Output only. The price per time unit the subscription is active.

.google.type.Money price_per_unit = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder

clearPriceStructure()

public Sku.SkuPrice.FlatSubscriptionFee.Builder clearPriceStructure()
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder

clearUnit()

public Sku.SkuPrice.FlatSubscriptionFee.Builder clearUnit()

Output only. The unit of the subscription SKU. See https://ucum.org/ucum.html for the format of the price unit. Since subscriptions are billed by duration, this will always be a time unit. The price unit of a subscription SKU is not necessarily the same as the subscription period of the corresponding StandardOffers.

Currently the unit is always months ('mo'). Additional time units may be supported in future.

The unit month ('mo') is a customary time unit and requires special handling to account for the variable duration of months. A price may be denominated in units of months, but the duration the subscription is active is measured in metric time and customers are billed on that basis. The exact hourly or per-second price can be calculated by dividing the monthly price by the number of hours or seconds in the desired month. A subscription active for N months is rarely billed exactly N times the monthly price. This is intended and is not a billing error.

string unit = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder

This builder for chaining.

getDefaultInstanceForType()

public Sku.SkuPrice.FlatSubscriptionFee getDefaultInstanceForType()
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getPricePerUnit()

public Money getPricePerUnit()

Output only. The price per time unit the subscription is active.

.google.type.Money price_per_unit = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
com.google.type.Money

The pricePerUnit.

getPricePerUnitBuilder()

public Money.Builder getPricePerUnitBuilder()

Output only. The price per time unit the subscription is active.

.google.type.Money price_per_unit = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
com.google.type.Money.Builder

getPricePerUnitOrBuilder()

public MoneyOrBuilder getPricePerUnitOrBuilder()

Output only. The price per time unit the subscription is active.

.google.type.Money price_per_unit = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
com.google.type.MoneyOrBuilder

getPriceStructureCase()

public Sku.SkuPrice.FlatSubscriptionFee.PriceStructureCase getPriceStructureCase()
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.PriceStructureCase

getUnit()

public String getUnit()

Output only. The unit of the subscription SKU. See https://ucum.org/ucum.html for the format of the price unit. Since subscriptions are billed by duration, this will always be a time unit. The price unit of a subscription SKU is not necessarily the same as the subscription period of the corresponding StandardOffers.

Currently the unit is always months ('mo'). Additional time units may be supported in future.

The unit month ('mo') is a customary time unit and requires special handling to account for the variable duration of months. A price may be denominated in units of months, but the duration the subscription is active is measured in metric time and customers are billed on that basis. The exact hourly or per-second price can be calculated by dividing the monthly price by the number of hours or seconds in the desired month. A subscription active for N months is rarely billed exactly N times the monthly price. This is intended and is not a billing error.

string unit = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The unit.

getUnitBytes()

public ByteString getUnitBytes()

Output only. The unit of the subscription SKU. See https://ucum.org/ucum.html for the format of the price unit. Since subscriptions are billed by duration, this will always be a time unit. The price unit of a subscription SKU is not necessarily the same as the subscription period of the corresponding StandardOffers.

Currently the unit is always months ('mo'). Additional time units may be supported in future.

The unit month ('mo') is a customary time unit and requires special handling to account for the variable duration of months. A price may be denominated in units of months, but the duration the subscription is active is measured in metric time and customers are billed on that basis. The exact hourly or per-second price can be calculated by dividing the monthly price by the number of hours or seconds in the desired month. A subscription active for N months is rarely billed exactly N times the monthly price. This is intended and is not a billing error.

string unit = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for unit.

hasPricePerUnit()

public boolean hasPricePerUnit()

Output only. The price per time unit the subscription is active.

.google.type.Money price_per_unit = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the pricePerUnit field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Sku.SkuPrice.FlatSubscriptionFee other)

public Sku.SkuPrice.FlatSubscriptionFee.Builder mergeFrom(Sku.SkuPrice.FlatSubscriptionFee other)
Parameter
Name Description
other Sku.SkuPrice.FlatSubscriptionFee
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Sku.SkuPrice.FlatSubscriptionFee.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Sku.SkuPrice.FlatSubscriptionFee.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder
Overrides

mergePricePerUnit(Money value)

public Sku.SkuPrice.FlatSubscriptionFee.Builder mergePricePerUnit(Money value)

Output only. The price per time unit the subscription is active.

.google.type.Money price_per_unit = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value com.google.type.Money
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder

setPricePerUnit(Money value)

public Sku.SkuPrice.FlatSubscriptionFee.Builder setPricePerUnit(Money value)

Output only. The price per time unit the subscription is active.

.google.type.Money price_per_unit = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value com.google.type.Money
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder

setPricePerUnit(Money.Builder builderForValue)

public Sku.SkuPrice.FlatSubscriptionFee.Builder setPricePerUnit(Money.Builder builderForValue)

Output only. The price per time unit the subscription is active.

.google.type.Money price_per_unit = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue com.google.type.Money.Builder
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder

setUnit(String value)

public Sku.SkuPrice.FlatSubscriptionFee.Builder setUnit(String value)

Output only. The unit of the subscription SKU. See https://ucum.org/ucum.html for the format of the price unit. Since subscriptions are billed by duration, this will always be a time unit. The price unit of a subscription SKU is not necessarily the same as the subscription period of the corresponding StandardOffers.

Currently the unit is always months ('mo'). Additional time units may be supported in future.

The unit month ('mo') is a customary time unit and requires special handling to account for the variable duration of months. A price may be denominated in units of months, but the duration the subscription is active is measured in metric time and customers are billed on that basis. The exact hourly or per-second price can be calculated by dividing the monthly price by the number of hours or seconds in the desired month. A subscription active for N months is rarely billed exactly N times the monthly price. This is intended and is not a billing error.

string unit = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The unit to set.

Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder

This builder for chaining.

setUnitBytes(ByteString value)

public Sku.SkuPrice.FlatSubscriptionFee.Builder setUnitBytes(ByteString value)

Output only. The unit of the subscription SKU. See https://ucum.org/ucum.html for the format of the price unit. Since subscriptions are billed by duration, this will always be a time unit. The price unit of a subscription SKU is not necessarily the same as the subscription period of the corresponding StandardOffers.

Currently the unit is always months ('mo'). Additional time units may be supported in future.

The unit month ('mo') is a customary time unit and requires special handling to account for the variable duration of months. A price may be denominated in units of months, but the duration the subscription is active is measured in metric time and customers are billed on that basis. The exact hourly or per-second price can be calculated by dividing the monthly price by the number of hours or seconds in the desired month. A subscription active for N months is rarely billed exactly N times the monthly price. This is intended and is not a billing error.

string unit = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for unit to set.

Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder

This builder for chaining.