Class PrivateOffer.Term.Builder (0.1.0)

public static final class PrivateOffer.Term.Builder extends GeneratedMessage.Builder<PrivateOffer.Term.Builder> implements PrivateOffer.TermOrBuilder

Configurations for the offer term and renewal options. Extending a private offer to a customer that covers a given term constitutes a guarantee to the customer that the product will remain available to them for the duration of the term.

Protobuf type google.cloud.commerceproducer.v1beta.PrivateOffer.Term

Static Methods

getDescriptor()

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

Methods

build()

public PrivateOffer.Term build()
Returns
Type Description
PrivateOffer.Term

buildPartial()

public PrivateOffer.Term buildPartial()
Returns
Type Description
PrivateOffer.Term

clear()

public PrivateOffer.Term.Builder clear()
Returns
Type Description
PrivateOffer.Term.Builder
Overrides

clearDurationMonths()

public PrivateOffer.Term.Builder clearDurationMonths()

Optional. Duration in months of the offer term. The offer will end on the same day of the month after this duration. If that date is not available, the offer will end on the last day of the month. For example, if the offer starts on 01/31/2024 and the duration is 13 months, the offer will end on 02/28/2025. Must be set to publish the offer if the end policy is AFTER_DURATION or MATCH_AMENDED_OFFER, and must be a positive value.

The maximum possible offer duration, including all renewal terms, cannot exceed 7 years. For example, if duration_months is 9 and term.max_renewal_count is 9, then the maximum possible offer duration is 90 months and exceeds the 7 year limit.

int32 duration_months = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PrivateOffer.Term.Builder

This builder for chaining.

clearEffectiveTermEndTime()

public PrivateOffer.Term.Builder clearEffectiveTermEndTime()

Output only. The expected end time of the current offer term.

At the end of each offer term, an offer associated with an active order will either renew or end. When an offer renews, a new term begins and this value changes to reflect the end time of the new term. When an offer ends this value is no longer set and instead end_time is set.

When the term of an offer ends and the offer does not renew, the associated order also ends if the base standard offer has a subscription price model. Otherwise, the associated order does not end and remains active.

Not included for PRIVATE_OFFER_VIEW_BASIC. Included for PRIVATE_OFFER_VIEW_FULL when the offer has not ended and either the offer has started or the value can be derived from other fields.

For offers that have not started, this field is set when one of the following conditions is true.

  • The offer sets term.scheduled_end_time.
  • The offer sets term.scheduled_start_time and term.duration_months, the offer's term.end_policy is not MATCH_AMENDED_OFFER, and the offer does not have standard_interval set to MONTHLY_POSTPAY.

.google.type.DateTime effective_term_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
PrivateOffer.Term.Builder

clearEndPolicy()

public PrivateOffer.Term.Builder clearEndPolicy()

Optional. Defines when an offer should end. Must be set when publishing the offer.

.google.cloud.commerceproducer.v1beta.PrivateOffer.Term.EndPolicy end_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PrivateOffer.Term.Builder

This builder for chaining.

clearEndPolicyData()

public PrivateOffer.Term.Builder clearEndPolicyData()
Returns
Type Description
PrivateOffer.Term.Builder

clearMaxRenewalCount()

public PrivateOffer.Term.Builder clearMaxRenewalCount()

Optional. The max number of renewals allowed, after the initial term ends. This field is only relevant to standard interval offers with interval of 'MONTHLY_PRORATED', 'MONTHLY_NOT_PRORATED', 'QUARTERLY_NOT_PRORATED' or 'YEARLY_NOT_PRORATED'. Other types of offers cannot be renewed.

For example, if the initial term is 1 year and the max renewals is 3, the customer can renew the offer for up to 3 additional years after the initial term ends. Customers control whether they renew the offer.

Allowing a customer to renew an offer does not constitute a guarantee to the customer that the offered product will still be available to be renewed at the renewal date.

An offer with a max renewal count of 0 cannot be renewed. Must be non-negative.

int32 max_renewal_count = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PrivateOffer.Term.Builder

This builder for chaining.

clearRenewal()

public PrivateOffer.Term.Builder clearRenewal()
Returns
Type Description
PrivateOffer.Term.Builder

clearScheduledEndTime()

public PrivateOffer.Term.Builder clearScheduledEndTime()

Optional. Specified end time of the offer. Must be set to publish the offer if the end policy is SCHEDULED_END_TIME. When set, the time must be in the future and at a day boundary in the America/Los_Angeles time zone, and must be after term.scheduled_start_time if applicable.

.google.type.DateTime scheduled_end_time = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PrivateOffer.Term.Builder

clearScheduledStartTime()

public PrivateOffer.Term.Builder clearScheduledStartTime()

Optional. The scheduled start time of the offer. Cannot exceed one year from the time of publish.

If the start policy is SCHEDULED_START_TIME, a future time at a day boundary in the America/Los_Angeles time zone must be provided when publishing the offer.

If the offer amends another private or standard offer, then the scheduled start time must be:

  • Before or equal to the amended offer's end time if the offer's end policy is not MATCH_AMENDED_OFFER. Otherwise, it has to be strictly before the amended offer's end time.
  • Before or equal to the start time of the next pending installment of the amended offer, if amending a private offer with custom installments. For example, if the amended offer has installments on 01/01, 02/01, 03/01, 04/01, and today is 02/15, then the new offer's scheduled_start_time must be at or before 03/01.

.google.type.DateTime scheduled_start_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PrivateOffer.Term.Builder

clearStartPolicy()

public PrivateOffer.Term.Builder clearStartPolicy()

Optional. Defines when the resulting order should start. Must be set when publishing the offer.

.google.cloud.commerceproducer.v1beta.PrivateOffer.Term.StartPolicy start_policy = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PrivateOffer.Term.Builder

This builder for chaining.

clearUnlimitedRenewal() (deprecated)

public PrivateOffer.Term.Builder clearUnlimitedRenewal()

Deprecated. google.cloud.commerceproducer.v1beta.PrivateOffer.Term.unlimited_renewal is deprecated. See google/cloud/commerceproducer/v1beta/private_offer.proto;l=246

Output only. Deprecated: This field can only be true on existing offers with standard interval of 'MONTHLY_POSTPAY'. As of May 2024, we no longer allow unlimited renewals.

bool unlimited_renewal = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
PrivateOffer.Term.Builder

This builder for chaining.

getDefaultInstanceForType()

public PrivateOffer.Term getDefaultInstanceForType()
Returns
Type Description
PrivateOffer.Term

getDescriptorForType()

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

getDurationMonths()

public int getDurationMonths()

Optional. Duration in months of the offer term. The offer will end on the same day of the month after this duration. If that date is not available, the offer will end on the last day of the month. For example, if the offer starts on 01/31/2024 and the duration is 13 months, the offer will end on 02/28/2025. Must be set to publish the offer if the end policy is AFTER_DURATION or MATCH_AMENDED_OFFER, and must be a positive value.

The maximum possible offer duration, including all renewal terms, cannot exceed 7 years. For example, if duration_months is 9 and term.max_renewal_count is 9, then the maximum possible offer duration is 90 months and exceeds the 7 year limit.

int32 duration_months = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The durationMonths.

getEffectiveTermEndTime()

public DateTime getEffectiveTermEndTime()

Output only. The expected end time of the current offer term.

At the end of each offer term, an offer associated with an active order will either renew or end. When an offer renews, a new term begins and this value changes to reflect the end time of the new term. When an offer ends this value is no longer set and instead end_time is set.

When the term of an offer ends and the offer does not renew, the associated order also ends if the base standard offer has a subscription price model. Otherwise, the associated order does not end and remains active.

Not included for PRIVATE_OFFER_VIEW_BASIC. Included for PRIVATE_OFFER_VIEW_FULL when the offer has not ended and either the offer has started or the value can be derived from other fields.

For offers that have not started, this field is set when one of the following conditions is true.

  • The offer sets term.scheduled_end_time.
  • The offer sets term.scheduled_start_time and term.duration_months, the offer's term.end_policy is not MATCH_AMENDED_OFFER, and the offer does not have standard_interval set to MONTHLY_POSTPAY.

.google.type.DateTime effective_term_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
com.google.type.DateTime

The effectiveTermEndTime.

getEffectiveTermEndTimeBuilder()

public DateTime.Builder getEffectiveTermEndTimeBuilder()

Output only. The expected end time of the current offer term.

At the end of each offer term, an offer associated with an active order will either renew or end. When an offer renews, a new term begins and this value changes to reflect the end time of the new term. When an offer ends this value is no longer set and instead end_time is set.

When the term of an offer ends and the offer does not renew, the associated order also ends if the base standard offer has a subscription price model. Otherwise, the associated order does not end and remains active.

Not included for PRIVATE_OFFER_VIEW_BASIC. Included for PRIVATE_OFFER_VIEW_FULL when the offer has not ended and either the offer has started or the value can be derived from other fields.

For offers that have not started, this field is set when one of the following conditions is true.

  • The offer sets term.scheduled_end_time.
  • The offer sets term.scheduled_start_time and term.duration_months, the offer's term.end_policy is not MATCH_AMENDED_OFFER, and the offer does not have standard_interval set to MONTHLY_POSTPAY.

.google.type.DateTime effective_term_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

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

getEffectiveTermEndTimeOrBuilder()

public DateTimeOrBuilder getEffectiveTermEndTimeOrBuilder()

Output only. The expected end time of the current offer term.

At the end of each offer term, an offer associated with an active order will either renew or end. When an offer renews, a new term begins and this value changes to reflect the end time of the new term. When an offer ends this value is no longer set and instead end_time is set.

When the term of an offer ends and the offer does not renew, the associated order also ends if the base standard offer has a subscription price model. Otherwise, the associated order does not end and remains active.

Not included for PRIVATE_OFFER_VIEW_BASIC. Included for PRIVATE_OFFER_VIEW_FULL when the offer has not ended and either the offer has started or the value can be derived from other fields.

For offers that have not started, this field is set when one of the following conditions is true.

  • The offer sets term.scheduled_end_time.
  • The offer sets term.scheduled_start_time and term.duration_months, the offer's term.end_policy is not MATCH_AMENDED_OFFER, and the offer does not have standard_interval set to MONTHLY_POSTPAY.

.google.type.DateTime effective_term_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
com.google.type.DateTimeOrBuilder

getEndPolicy()

public PrivateOffer.Term.EndPolicy getEndPolicy()

Optional. Defines when an offer should end. Must be set when publishing the offer.

.google.cloud.commerceproducer.v1beta.PrivateOffer.Term.EndPolicy end_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PrivateOffer.Term.EndPolicy

The endPolicy.

getEndPolicyDataCase()

public PrivateOffer.Term.EndPolicyDataCase getEndPolicyDataCase()
Returns
Type Description
PrivateOffer.Term.EndPolicyDataCase

getEndPolicyValue()

public int getEndPolicyValue()

Optional. Defines when an offer should end. Must be set when publishing the offer.

.google.cloud.commerceproducer.v1beta.PrivateOffer.Term.EndPolicy end_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for endPolicy.

getMaxRenewalCount()

public int getMaxRenewalCount()

Optional. The max number of renewals allowed, after the initial term ends. This field is only relevant to standard interval offers with interval of 'MONTHLY_PRORATED', 'MONTHLY_NOT_PRORATED', 'QUARTERLY_NOT_PRORATED' or 'YEARLY_NOT_PRORATED'. Other types of offers cannot be renewed.

For example, if the initial term is 1 year and the max renewals is 3, the customer can renew the offer for up to 3 additional years after the initial term ends. Customers control whether they renew the offer.

Allowing a customer to renew an offer does not constitute a guarantee to the customer that the offered product will still be available to be renewed at the renewal date.

An offer with a max renewal count of 0 cannot be renewed. Must be non-negative.

int32 max_renewal_count = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The maxRenewalCount.

getRenewalCase()

public PrivateOffer.Term.RenewalCase getRenewalCase()
Returns
Type Description
PrivateOffer.Term.RenewalCase

getScheduledEndTime()

public DateTime getScheduledEndTime()

Optional. Specified end time of the offer. Must be set to publish the offer if the end policy is SCHEDULED_END_TIME. When set, the time must be in the future and at a day boundary in the America/Los_Angeles time zone, and must be after term.scheduled_start_time if applicable.

.google.type.DateTime scheduled_end_time = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.type.DateTime

The scheduledEndTime.

getScheduledEndTimeBuilder()

public DateTime.Builder getScheduledEndTimeBuilder()

Optional. Specified end time of the offer. Must be set to publish the offer if the end policy is SCHEDULED_END_TIME. When set, the time must be in the future and at a day boundary in the America/Los_Angeles time zone, and must be after term.scheduled_start_time if applicable.

.google.type.DateTime scheduled_end_time = 5 [(.google.api.field_behavior) = OPTIONAL];

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

getScheduledEndTimeOrBuilder()

public DateTimeOrBuilder getScheduledEndTimeOrBuilder()

Optional. Specified end time of the offer. Must be set to publish the offer if the end policy is SCHEDULED_END_TIME. When set, the time must be in the future and at a day boundary in the America/Los_Angeles time zone, and must be after term.scheduled_start_time if applicable.

.google.type.DateTime scheduled_end_time = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.type.DateTimeOrBuilder

getScheduledStartTime()

public DateTime getScheduledStartTime()

Optional. The scheduled start time of the offer. Cannot exceed one year from the time of publish.

If the start policy is SCHEDULED_START_TIME, a future time at a day boundary in the America/Los_Angeles time zone must be provided when publishing the offer.

If the offer amends another private or standard offer, then the scheduled start time must be:

  • Before or equal to the amended offer's end time if the offer's end policy is not MATCH_AMENDED_OFFER. Otherwise, it has to be strictly before the amended offer's end time.
  • Before or equal to the start time of the next pending installment of the amended offer, if amending a private offer with custom installments. For example, if the amended offer has installments on 01/01, 02/01, 03/01, 04/01, and today is 02/15, then the new offer's scheduled_start_time must be at or before 03/01.

.google.type.DateTime scheduled_start_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.type.DateTime

The scheduledStartTime.

getScheduledStartTimeBuilder()

public DateTime.Builder getScheduledStartTimeBuilder()

Optional. The scheduled start time of the offer. Cannot exceed one year from the time of publish.

If the start policy is SCHEDULED_START_TIME, a future time at a day boundary in the America/Los_Angeles time zone must be provided when publishing the offer.

If the offer amends another private or standard offer, then the scheduled start time must be:

  • Before or equal to the amended offer's end time if the offer's end policy is not MATCH_AMENDED_OFFER. Otherwise, it has to be strictly before the amended offer's end time.
  • Before or equal to the start time of the next pending installment of the amended offer, if amending a private offer with custom installments. For example, if the amended offer has installments on 01/01, 02/01, 03/01, 04/01, and today is 02/15, then the new offer's scheduled_start_time must be at or before 03/01.

.google.type.DateTime scheduled_start_time = 2 [(.google.api.field_behavior) = OPTIONAL];

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

getScheduledStartTimeOrBuilder()

public DateTimeOrBuilder getScheduledStartTimeOrBuilder()

Optional. The scheduled start time of the offer. Cannot exceed one year from the time of publish.

If the start policy is SCHEDULED_START_TIME, a future time at a day boundary in the America/Los_Angeles time zone must be provided when publishing the offer.

If the offer amends another private or standard offer, then the scheduled start time must be:

  • Before or equal to the amended offer's end time if the offer's end policy is not MATCH_AMENDED_OFFER. Otherwise, it has to be strictly before the amended offer's end time.
  • Before or equal to the start time of the next pending installment of the amended offer, if amending a private offer with custom installments. For example, if the amended offer has installments on 01/01, 02/01, 03/01, 04/01, and today is 02/15, then the new offer's scheduled_start_time must be at or before 03/01.

.google.type.DateTime scheduled_start_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.type.DateTimeOrBuilder

getStartPolicy()

public PrivateOffer.Term.StartPolicy getStartPolicy()

Optional. Defines when the resulting order should start. Must be set when publishing the offer.

.google.cloud.commerceproducer.v1beta.PrivateOffer.Term.StartPolicy start_policy = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PrivateOffer.Term.StartPolicy

The startPolicy.

getStartPolicyValue()

public int getStartPolicyValue()

Optional. Defines when the resulting order should start. Must be set when publishing the offer.

.google.cloud.commerceproducer.v1beta.PrivateOffer.Term.StartPolicy start_policy = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for startPolicy.

getUnlimitedRenewal() (deprecated)

public boolean getUnlimitedRenewal()

Deprecated. google.cloud.commerceproducer.v1beta.PrivateOffer.Term.unlimited_renewal is deprecated. See google/cloud/commerceproducer/v1beta/private_offer.proto;l=246

Output only. Deprecated: This field can only be true on existing offers with standard interval of 'MONTHLY_POSTPAY'. As of May 2024, we no longer allow unlimited renewals.

bool unlimited_renewal = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The unlimitedRenewal.

hasDurationMonths()

public boolean hasDurationMonths()

Optional. Duration in months of the offer term. The offer will end on the same day of the month after this duration. If that date is not available, the offer will end on the last day of the month. For example, if the offer starts on 01/31/2024 and the duration is 13 months, the offer will end on 02/28/2025. Must be set to publish the offer if the end policy is AFTER_DURATION or MATCH_AMENDED_OFFER, and must be a positive value.

The maximum possible offer duration, including all renewal terms, cannot exceed 7 years. For example, if duration_months is 9 and term.max_renewal_count is 9, then the maximum possible offer duration is 90 months and exceeds the 7 year limit.

int32 duration_months = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the durationMonths field is set.

hasEffectiveTermEndTime()

public boolean hasEffectiveTermEndTime()

Output only. The expected end time of the current offer term.

At the end of each offer term, an offer associated with an active order will either renew or end. When an offer renews, a new term begins and this value changes to reflect the end time of the new term. When an offer ends this value is no longer set and instead end_time is set.

When the term of an offer ends and the offer does not renew, the associated order also ends if the base standard offer has a subscription price model. Otherwise, the associated order does not end and remains active.

Not included for PRIVATE_OFFER_VIEW_BASIC. Included for PRIVATE_OFFER_VIEW_FULL when the offer has not ended and either the offer has started or the value can be derived from other fields.

For offers that have not started, this field is set when one of the following conditions is true.

  • The offer sets term.scheduled_end_time.
  • The offer sets term.scheduled_start_time and term.duration_months, the offer's term.end_policy is not MATCH_AMENDED_OFFER, and the offer does not have standard_interval set to MONTHLY_POSTPAY.

.google.type.DateTime effective_term_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the effectiveTermEndTime field is set.

hasMaxRenewalCount()

public boolean hasMaxRenewalCount()

Optional. The max number of renewals allowed, after the initial term ends. This field is only relevant to standard interval offers with interval of 'MONTHLY_PRORATED', 'MONTHLY_NOT_PRORATED', 'QUARTERLY_NOT_PRORATED' or 'YEARLY_NOT_PRORATED'. Other types of offers cannot be renewed.

For example, if the initial term is 1 year and the max renewals is 3, the customer can renew the offer for up to 3 additional years after the initial term ends. Customers control whether they renew the offer.

Allowing a customer to renew an offer does not constitute a guarantee to the customer that the offered product will still be available to be renewed at the renewal date.

An offer with a max renewal count of 0 cannot be renewed. Must be non-negative.

int32 max_renewal_count = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the maxRenewalCount field is set.

hasScheduledEndTime()

public boolean hasScheduledEndTime()

Optional. Specified end time of the offer. Must be set to publish the offer if the end policy is SCHEDULED_END_TIME. When set, the time must be in the future and at a day boundary in the America/Los_Angeles time zone, and must be after term.scheduled_start_time if applicable.

.google.type.DateTime scheduled_end_time = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the scheduledEndTime field is set.

hasScheduledStartTime()

public boolean hasScheduledStartTime()

Optional. The scheduled start time of the offer. Cannot exceed one year from the time of publish.

If the start policy is SCHEDULED_START_TIME, a future time at a day boundary in the America/Los_Angeles time zone must be provided when publishing the offer.

If the offer amends another private or standard offer, then the scheduled start time must be:

  • Before or equal to the amended offer's end time if the offer's end policy is not MATCH_AMENDED_OFFER. Otherwise, it has to be strictly before the amended offer's end time.
  • Before or equal to the start time of the next pending installment of the amended offer, if amending a private offer with custom installments. For example, if the amended offer has installments on 01/01, 02/01, 03/01, 04/01, and today is 02/15, then the new offer's scheduled_start_time must be at or before 03/01.

.google.type.DateTime scheduled_start_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the scheduledStartTime field is set.

hasUnlimitedRenewal() (deprecated)

public boolean hasUnlimitedRenewal()

Deprecated. google.cloud.commerceproducer.v1beta.PrivateOffer.Term.unlimited_renewal is deprecated. See google/cloud/commerceproducer/v1beta/private_offer.proto;l=246

Output only. Deprecated: This field can only be true on existing offers with standard interval of 'MONTHLY_POSTPAY'. As of May 2024, we no longer allow unlimited renewals.

bool unlimited_renewal = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the unlimitedRenewal field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeEffectiveTermEndTime(DateTime value)

public PrivateOffer.Term.Builder mergeEffectiveTermEndTime(DateTime value)

Output only. The expected end time of the current offer term.

At the end of each offer term, an offer associated with an active order will either renew or end. When an offer renews, a new term begins and this value changes to reflect the end time of the new term. When an offer ends this value is no longer set and instead end_time is set.

When the term of an offer ends and the offer does not renew, the associated order also ends if the base standard offer has a subscription price model. Otherwise, the associated order does not end and remains active.

Not included for PRIVATE_OFFER_VIEW_BASIC. Included for PRIVATE_OFFER_VIEW_FULL when the offer has not ended and either the offer has started or the value can be derived from other fields.

For offers that have not started, this field is set when one of the following conditions is true.

  • The offer sets term.scheduled_end_time.
  • The offer sets term.scheduled_start_time and term.duration_months, the offer's term.end_policy is not MATCH_AMENDED_OFFER, and the offer does not have standard_interval set to MONTHLY_POSTPAY.

.google.type.DateTime effective_term_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value com.google.type.DateTime
Returns
Type Description
PrivateOffer.Term.Builder

mergeFrom(PrivateOffer.Term other)

public PrivateOffer.Term.Builder mergeFrom(PrivateOffer.Term other)
Parameter
Name Description
other PrivateOffer.Term
Returns
Type Description
PrivateOffer.Term.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PrivateOffer.Term.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PrivateOffer.Term.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public PrivateOffer.Term.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
PrivateOffer.Term.Builder
Overrides

mergeScheduledEndTime(DateTime value)

public PrivateOffer.Term.Builder mergeScheduledEndTime(DateTime value)

Optional. Specified end time of the offer. Must be set to publish the offer if the end policy is SCHEDULED_END_TIME. When set, the time must be in the future and at a day boundary in the America/Los_Angeles time zone, and must be after term.scheduled_start_time if applicable.

.google.type.DateTime scheduled_end_time = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.type.DateTime
Returns
Type Description
PrivateOffer.Term.Builder

mergeScheduledStartTime(DateTime value)

public PrivateOffer.Term.Builder mergeScheduledStartTime(DateTime value)

Optional. The scheduled start time of the offer. Cannot exceed one year from the time of publish.

If the start policy is SCHEDULED_START_TIME, a future time at a day boundary in the America/Los_Angeles time zone must be provided when publishing the offer.

If the offer amends another private or standard offer, then the scheduled start time must be:

  • Before or equal to the amended offer's end time if the offer's end policy is not MATCH_AMENDED_OFFER. Otherwise, it has to be strictly before the amended offer's end time.
  • Before or equal to the start time of the next pending installment of the amended offer, if amending a private offer with custom installments. For example, if the amended offer has installments on 01/01, 02/01, 03/01, 04/01, and today is 02/15, then the new offer's scheduled_start_time must be at or before 03/01.

.google.type.DateTime scheduled_start_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.type.DateTime
Returns
Type Description
PrivateOffer.Term.Builder

setDurationMonths(int value)

public PrivateOffer.Term.Builder setDurationMonths(int value)

Optional. Duration in months of the offer term. The offer will end on the same day of the month after this duration. If that date is not available, the offer will end on the last day of the month. For example, if the offer starts on 01/31/2024 and the duration is 13 months, the offer will end on 02/28/2025. Must be set to publish the offer if the end policy is AFTER_DURATION or MATCH_AMENDED_OFFER, and must be a positive value.

The maximum possible offer duration, including all renewal terms, cannot exceed 7 years. For example, if duration_months is 9 and term.max_renewal_count is 9, then the maximum possible offer duration is 90 months and exceeds the 7 year limit.

int32 duration_months = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The durationMonths to set.

Returns
Type Description
PrivateOffer.Term.Builder

This builder for chaining.

setEffectiveTermEndTime(DateTime value)

public PrivateOffer.Term.Builder setEffectiveTermEndTime(DateTime value)

Output only. The expected end time of the current offer term.

At the end of each offer term, an offer associated with an active order will either renew or end. When an offer renews, a new term begins and this value changes to reflect the end time of the new term. When an offer ends this value is no longer set and instead end_time is set.

When the term of an offer ends and the offer does not renew, the associated order also ends if the base standard offer has a subscription price model. Otherwise, the associated order does not end and remains active.

Not included for PRIVATE_OFFER_VIEW_BASIC. Included for PRIVATE_OFFER_VIEW_FULL when the offer has not ended and either the offer has started or the value can be derived from other fields.

For offers that have not started, this field is set when one of the following conditions is true.

  • The offer sets term.scheduled_end_time.
  • The offer sets term.scheduled_start_time and term.duration_months, the offer's term.end_policy is not MATCH_AMENDED_OFFER, and the offer does not have standard_interval set to MONTHLY_POSTPAY.

.google.type.DateTime effective_term_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value com.google.type.DateTime
Returns
Type Description
PrivateOffer.Term.Builder

setEffectiveTermEndTime(DateTime.Builder builderForValue)

public PrivateOffer.Term.Builder setEffectiveTermEndTime(DateTime.Builder builderForValue)

Output only. The expected end time of the current offer term.

At the end of each offer term, an offer associated with an active order will either renew or end. When an offer renews, a new term begins and this value changes to reflect the end time of the new term. When an offer ends this value is no longer set and instead end_time is set.

When the term of an offer ends and the offer does not renew, the associated order also ends if the base standard offer has a subscription price model. Otherwise, the associated order does not end and remains active.

Not included for PRIVATE_OFFER_VIEW_BASIC. Included for PRIVATE_OFFER_VIEW_FULL when the offer has not ended and either the offer has started or the value can be derived from other fields.

For offers that have not started, this field is set when one of the following conditions is true.

  • The offer sets term.scheduled_end_time.
  • The offer sets term.scheduled_start_time and term.duration_months, the offer's term.end_policy is not MATCH_AMENDED_OFFER, and the offer does not have standard_interval set to MONTHLY_POSTPAY.

.google.type.DateTime effective_term_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue com.google.type.DateTime.Builder
Returns
Type Description
PrivateOffer.Term.Builder

setEndPolicy(PrivateOffer.Term.EndPolicy value)

public PrivateOffer.Term.Builder setEndPolicy(PrivateOffer.Term.EndPolicy value)

Optional. Defines when an offer should end. Must be set when publishing the offer.

.google.cloud.commerceproducer.v1beta.PrivateOffer.Term.EndPolicy end_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value PrivateOffer.Term.EndPolicy

The endPolicy to set.

Returns
Type Description
PrivateOffer.Term.Builder

This builder for chaining.

setEndPolicyValue(int value)

public PrivateOffer.Term.Builder setEndPolicyValue(int value)

Optional. Defines when an offer should end. Must be set when publishing the offer.

.google.cloud.commerceproducer.v1beta.PrivateOffer.Term.EndPolicy end_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for endPolicy to set.

Returns
Type Description
PrivateOffer.Term.Builder

This builder for chaining.

setMaxRenewalCount(int value)

public PrivateOffer.Term.Builder setMaxRenewalCount(int value)

Optional. The max number of renewals allowed, after the initial term ends. This field is only relevant to standard interval offers with interval of 'MONTHLY_PRORATED', 'MONTHLY_NOT_PRORATED', 'QUARTERLY_NOT_PRORATED' or 'YEARLY_NOT_PRORATED'. Other types of offers cannot be renewed.

For example, if the initial term is 1 year and the max renewals is 3, the customer can renew the offer for up to 3 additional years after the initial term ends. Customers control whether they renew the offer.

Allowing a customer to renew an offer does not constitute a guarantee to the customer that the offered product will still be available to be renewed at the renewal date.

An offer with a max renewal count of 0 cannot be renewed. Must be non-negative.

int32 max_renewal_count = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The maxRenewalCount to set.

Returns
Type Description
PrivateOffer.Term.Builder

This builder for chaining.

setScheduledEndTime(DateTime value)

public PrivateOffer.Term.Builder setScheduledEndTime(DateTime value)

Optional. Specified end time of the offer. Must be set to publish the offer if the end policy is SCHEDULED_END_TIME. When set, the time must be in the future and at a day boundary in the America/Los_Angeles time zone, and must be after term.scheduled_start_time if applicable.

.google.type.DateTime scheduled_end_time = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.type.DateTime
Returns
Type Description
PrivateOffer.Term.Builder

setScheduledEndTime(DateTime.Builder builderForValue)

public PrivateOffer.Term.Builder setScheduledEndTime(DateTime.Builder builderForValue)

Optional. Specified end time of the offer. Must be set to publish the offer if the end policy is SCHEDULED_END_TIME. When set, the time must be in the future and at a day boundary in the America/Los_Angeles time zone, and must be after term.scheduled_start_time if applicable.

.google.type.DateTime scheduled_end_time = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue com.google.type.DateTime.Builder
Returns
Type Description
PrivateOffer.Term.Builder

setScheduledStartTime(DateTime value)

public PrivateOffer.Term.Builder setScheduledStartTime(DateTime value)

Optional. The scheduled start time of the offer. Cannot exceed one year from the time of publish.

If the start policy is SCHEDULED_START_TIME, a future time at a day boundary in the America/Los_Angeles time zone must be provided when publishing the offer.

If the offer amends another private or standard offer, then the scheduled start time must be:

  • Before or equal to the amended offer's end time if the offer's end policy is not MATCH_AMENDED_OFFER. Otherwise, it has to be strictly before the amended offer's end time.
  • Before or equal to the start time of the next pending installment of the amended offer, if amending a private offer with custom installments. For example, if the amended offer has installments on 01/01, 02/01, 03/01, 04/01, and today is 02/15, then the new offer's scheduled_start_time must be at or before 03/01.

.google.type.DateTime scheduled_start_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.type.DateTime
Returns
Type Description
PrivateOffer.Term.Builder

setScheduledStartTime(DateTime.Builder builderForValue)

public PrivateOffer.Term.Builder setScheduledStartTime(DateTime.Builder builderForValue)

Optional. The scheduled start time of the offer. Cannot exceed one year from the time of publish.

If the start policy is SCHEDULED_START_TIME, a future time at a day boundary in the America/Los_Angeles time zone must be provided when publishing the offer.

If the offer amends another private or standard offer, then the scheduled start time must be:

  • Before or equal to the amended offer's end time if the offer's end policy is not MATCH_AMENDED_OFFER. Otherwise, it has to be strictly before the amended offer's end time.
  • Before or equal to the start time of the next pending installment of the amended offer, if amending a private offer with custom installments. For example, if the amended offer has installments on 01/01, 02/01, 03/01, 04/01, and today is 02/15, then the new offer's scheduled_start_time must be at or before 03/01.

.google.type.DateTime scheduled_start_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue com.google.type.DateTime.Builder
Returns
Type Description
PrivateOffer.Term.Builder

setStartPolicy(PrivateOffer.Term.StartPolicy value)

public PrivateOffer.Term.Builder setStartPolicy(PrivateOffer.Term.StartPolicy value)

Optional. Defines when the resulting order should start. Must be set when publishing the offer.

.google.cloud.commerceproducer.v1beta.PrivateOffer.Term.StartPolicy start_policy = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value PrivateOffer.Term.StartPolicy

The startPolicy to set.

Returns
Type Description
PrivateOffer.Term.Builder

This builder for chaining.

setStartPolicyValue(int value)

public PrivateOffer.Term.Builder setStartPolicyValue(int value)

Optional. Defines when the resulting order should start. Must be set when publishing the offer.

.google.cloud.commerceproducer.v1beta.PrivateOffer.Term.StartPolicy start_policy = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for startPolicy to set.

Returns
Type Description
PrivateOffer.Term.Builder

This builder for chaining.

setUnlimitedRenewal(boolean value) (deprecated)

public PrivateOffer.Term.Builder setUnlimitedRenewal(boolean value)

Deprecated. google.cloud.commerceproducer.v1beta.PrivateOffer.Term.unlimited_renewal is deprecated. See google/cloud/commerceproducer/v1beta/private_offer.proto;l=246

Output only. Deprecated: This field can only be true on existing offers with standard interval of 'MONTHLY_POSTPAY'. As of May 2024, we no longer allow unlimited renewals.

bool unlimited_renewal = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The unlimitedRenewal to set.

Returns
Type Description
PrivateOffer.Term.Builder

This builder for chaining.