Class Sku.SkuPrice.FlatSubscriptionFee (0.1.0)

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

Details about a SKU charging a flat subscription fee.

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

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessage > Sku.SkuPrice.FlatSubscriptionFee

Static Fields

PRICE_PER_UNIT_FIELD_NUMBER

public static final int PRICE_PER_UNIT_FIELD_NUMBER
Field Value
Type Description
int

UNIT_FIELD_NUMBER

public static final int UNIT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Sku.SkuPrice.FlatSubscriptionFee getDefaultInstance()
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee

getDescriptor()

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

newBuilder()

public static Sku.SkuPrice.FlatSubscriptionFee.Builder newBuilder()
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder

newBuilder(Sku.SkuPrice.FlatSubscriptionFee prototype)

public static Sku.SkuPrice.FlatSubscriptionFee.Builder newBuilder(Sku.SkuPrice.FlatSubscriptionFee prototype)
Parameter
Name Description
prototype Sku.SkuPrice.FlatSubscriptionFee
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder

parseDelimitedFrom(InputStream input)

public static Sku.SkuPrice.FlatSubscriptionFee parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Sku.SkuPrice.FlatSubscriptionFee parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Sku.SkuPrice.FlatSubscriptionFee parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Sku.SkuPrice.FlatSubscriptionFee parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Sku.SkuPrice.FlatSubscriptionFee parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Sku.SkuPrice.FlatSubscriptionFee parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Sku.SkuPrice.FlatSubscriptionFee parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Sku.SkuPrice.FlatSubscriptionFee parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Sku.SkuPrice.FlatSubscriptionFee parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Sku.SkuPrice.FlatSubscriptionFee parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Sku.SkuPrice.FlatSubscriptionFee parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Sku.SkuPrice.FlatSubscriptionFee parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Sku.SkuPrice.FlatSubscriptionFee> parser()
Returns
Type Description
Parser<FlatSubscriptionFee>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

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

getParserForType()

public Parser<Sku.SkuPrice.FlatSubscriptionFee> getParserForType()
Returns
Type Description
Parser<FlatSubscriptionFee>
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.

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(AbstractMessage.BuilderParent parent)

protected Sku.SkuPrice.FlatSubscriptionFee.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Sku.SkuPrice.FlatSubscriptionFee.Builder
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException