public static final class PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder extends GeneratedMessage.Builder<PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder> implements PrivateOffer.SingleProductOffer.PriceModel.CommitmentOrBuilderThe price configurations for the commitment based subscriptions.
Protobuf type
google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.Commitment
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > PrivateOffer.SingleProductOffer.PriceModel.Commitment.BuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public PrivateOffer.SingleProductOffer.PriceModel.Commitment build()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment |
|
buildPartial()
public PrivateOffer.SingleProductOffer.PriceModel.Commitment buildPartial()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment |
|
clear()
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder clear()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
clearAdditionalCredit()
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder clearAdditionalCredit() Optional. Additional credit granted to the customer.
Additional credits are only supported for custom interval offers.
Equivalent behavior can be achieved for standard interval offers by
varying the commitment_amount and discount_percent.
Value cannot be negative. The currency must be "USD" and precision is limited to cents. The maximum allowed value is 1,000,000 USD.
.google.type.Money additional_credit = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
clearCommitmentAmount()
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder clearCommitmentAmount()Optional. The commitment balance that the customer will receive. Value cannot be negative. The currency must be "USD" and precision is limited to cents. Must be present to publish the offer, if the parent message is set. The maximum allowed value is 1,000,000,000 USD.
If the current offer amends a private offer where the term has not
ended, and if the field
single_product_offer.standard_interval_price.price_model.commitment.commitment_amount
is set on both the current offer and the amended private offer, then
the commitment amount must be equal or higher on the current offer,
compared to the amended private offer.
.google.type.Money commitment_amount = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
clearDiscardPreviousCreditBalance()
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder clearDiscardPreviousCreditBalance()Optional. Whether to discard the previous credit balance when the associated installment starts. If not set, the previous credit balance will be rolled over to the current installment.
If there are no previous installments, then the value of this field will not matter - since it has no effect when no credits exist.
bool discard_previous_credit_balance = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
This builder for chaining. |
clearDiscountPercent()
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder clearDiscountPercent() Optional. The discount percent on commitment_amount.
For example, 10 means a discount of 10%. If the original
commitment_amount is $100 then the discounted amount will be $90.
The customer is charged $90 and receives $100 in credits.
All reported usage will be charged at the standard price.
If this field is set, the price_model.usage must be unset. A
private offer can apply a discount to all usage or to a usage
commitment, but not both.
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
getAdditionalCredit()
public Money getAdditionalCredit() Optional. Additional credit granted to the customer.
Additional credits are only supported for custom interval offers.
Equivalent behavior can be achieved for standard interval offers by
varying the commitment_amount and discount_percent.
Value cannot be negative. The currency must be "USD" and precision is limited to cents. The maximum allowed value is 1,000,000 USD.
.google.type.Money additional_credit = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.Money |
The additionalCredit. |
getAdditionalCreditBuilder()
public Money.Builder getAdditionalCreditBuilder() Optional. Additional credit granted to the customer.
Additional credits are only supported for custom interval offers.
Equivalent behavior can be achieved for standard interval offers by
varying the commitment_amount and discount_percent.
Value cannot be negative. The currency must be "USD" and precision is limited to cents. The maximum allowed value is 1,000,000 USD.
.google.type.Money additional_credit = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.Money.Builder |
|
getAdditionalCreditOrBuilder()
public MoneyOrBuilder getAdditionalCreditOrBuilder() Optional. Additional credit granted to the customer.
Additional credits are only supported for custom interval offers.
Equivalent behavior can be achieved for standard interval offers by
varying the commitment_amount and discount_percent.
Value cannot be negative. The currency must be "USD" and precision is limited to cents. The maximum allowed value is 1,000,000 USD.
.google.type.Money additional_credit = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.MoneyOrBuilder |
|
getCommitmentAmount()
public Money getCommitmentAmount()Optional. The commitment balance that the customer will receive. Value cannot be negative. The currency must be "USD" and precision is limited to cents. Must be present to publish the offer, if the parent message is set. The maximum allowed value is 1,000,000,000 USD.
If the current offer amends a private offer where the term has not
ended, and if the field
single_product_offer.standard_interval_price.price_model.commitment.commitment_amount
is set on both the current offer and the amended private offer, then
the commitment amount must be equal or higher on the current offer,
compared to the amended private offer.
.google.type.Money commitment_amount = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.Money |
The commitmentAmount. |
getCommitmentAmountBuilder()
public Money.Builder getCommitmentAmountBuilder()Optional. The commitment balance that the customer will receive. Value cannot be negative. The currency must be "USD" and precision is limited to cents. Must be present to publish the offer, if the parent message is set. The maximum allowed value is 1,000,000,000 USD.
If the current offer amends a private offer where the term has not
ended, and if the field
single_product_offer.standard_interval_price.price_model.commitment.commitment_amount
is set on both the current offer and the amended private offer, then
the commitment amount must be equal or higher on the current offer,
compared to the amended private offer.
.google.type.Money commitment_amount = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.Money.Builder |
|
getCommitmentAmountOrBuilder()
public MoneyOrBuilder getCommitmentAmountOrBuilder()Optional. The commitment balance that the customer will receive. Value cannot be negative. The currency must be "USD" and precision is limited to cents. Must be present to publish the offer, if the parent message is set. The maximum allowed value is 1,000,000,000 USD.
If the current offer amends a private offer where the term has not
ended, and if the field
single_product_offer.standard_interval_price.price_model.commitment.commitment_amount
is set on both the current offer and the amended private offer, then
the commitment amount must be equal or higher on the current offer,
compared to the amended private offer.
.google.type.Money commitment_amount = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.MoneyOrBuilder |
|
getDefaultInstanceForType()
public PrivateOffer.SingleProductOffer.PriceModel.Commitment getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getDiscardPreviousCreditBalance()
public boolean getDiscardPreviousCreditBalance()Optional. Whether to discard the previous credit balance when the associated installment starts. If not set, the previous credit balance will be rolled over to the current installment.
If there are no previous installments, then the value of this field will not matter - since it has no effect when no credits exist.
bool discard_previous_credit_balance = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
The discardPreviousCreditBalance. |
getDiscountPercent()
public Decimal getDiscountPercent() Optional. The discount percent on commitment_amount.
For example, 10 means a discount of 10%. If the original
commitment_amount is $100 then the discounted amount will be $90.
The customer is charged $90 and receives $100 in credits.
All reported usage will be charged at the standard price.
If this field is set, the price_model.usage must be unset. A
private offer can apply a discount to all usage or to a usage
commitment, but not both.
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.Decimal |
The discountPercent. |
getDiscountPercentBuilder()
public Decimal.Builder getDiscountPercentBuilder() Optional. The discount percent on commitment_amount.
For example, 10 means a discount of 10%. If the original
commitment_amount is $100 then the discounted amount will be $90.
The customer is charged $90 and receives $100 in credits.
All reported usage will be charged at the standard price.
If this field is set, the price_model.usage must be unset. A
private offer can apply a discount to all usage or to a usage
commitment, but not both.
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.Decimal.Builder |
|
getDiscountPercentOrBuilder()
public DecimalOrBuilder getDiscountPercentOrBuilder() Optional. The discount percent on commitment_amount.
For example, 10 means a discount of 10%. If the original
commitment_amount is $100 then the discounted amount will be $90.
The customer is charged $90 and receives $100 in credits.
All reported usage will be charged at the standard price.
If this field is set, the price_model.usage must be unset. A
private offer can apply a discount to all usage or to a usage
commitment, but not both.
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.DecimalOrBuilder |
|
hasAdditionalCredit()
public boolean hasAdditionalCredit() Optional. Additional credit granted to the customer.
Additional credits are only supported for custom interval offers.
Equivalent behavior can be achieved for standard interval offers by
varying the commitment_amount and discount_percent.
Value cannot be negative. The currency must be "USD" and precision is limited to cents. The maximum allowed value is 1,000,000 USD.
.google.type.Money additional_credit = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the additionalCredit field is set. |
hasCommitmentAmount()
public boolean hasCommitmentAmount()Optional. The commitment balance that the customer will receive. Value cannot be negative. The currency must be "USD" and precision is limited to cents. Must be present to publish the offer, if the parent message is set. The maximum allowed value is 1,000,000,000 USD.
If the current offer amends a private offer where the term has not
ended, and if the field
single_product_offer.standard_interval_price.price_model.commitment.commitment_amount
is set on both the current offer and the amended private offer, then
the commitment amount must be equal or higher on the current offer,
compared to the amended private offer.
.google.type.Money commitment_amount = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the commitmentAmount field is set. |
hasDiscountPercent()
public boolean hasDiscountPercent() Optional. The discount percent on commitment_amount.
For example, 10 means a discount of 10%. If the original
commitment_amount is $100 then the discounted amount will be $90.
The customer is charged $90 and receives $100 in credits.
All reported usage will be charged at the standard price.
If this field is set, the price_model.usage must be unset. A
private offer can apply a discount to all usage or to a usage
commitment, but not both.
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the discountPercent field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeAdditionalCredit(Money value)
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder mergeAdditionalCredit(Money value) Optional. Additional credit granted to the customer.
Additional credits are only supported for custom interval offers.
Equivalent behavior can be achieved for standard interval offers by
varying the commitment_amount and discount_percent.
Value cannot be negative. The currency must be "USD" and precision is limited to cents. The maximum allowed value is 1,000,000 USD.
.google.type.Money additional_credit = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
com.google.type.Money |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
mergeCommitmentAmount(Money value)
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder mergeCommitmentAmount(Money value)Optional. The commitment balance that the customer will receive. Value cannot be negative. The currency must be "USD" and precision is limited to cents. Must be present to publish the offer, if the parent message is set. The maximum allowed value is 1,000,000,000 USD.
If the current offer amends a private offer where the term has not
ended, and if the field
single_product_offer.standard_interval_price.price_model.commitment.commitment_amount
is set on both the current offer and the amended private offer, then
the commitment amount must be equal or higher on the current offer,
compared to the amended private offer.
.google.type.Money commitment_amount = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
com.google.type.Money |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
mergeDiscountPercent(Decimal value)
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder mergeDiscountPercent(Decimal value) Optional. The discount percent on commitment_amount.
For example, 10 means a discount of 10%. If the original
commitment_amount is $100 then the discounted amount will be $90.
The customer is charged $90 and receives $100 in credits.
All reported usage will be charged at the standard price.
If this field is set, the price_model.usage must be unset. A
private offer can apply a discount to all usage or to a usage
commitment, but not both.
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
com.google.type.Decimal |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
mergeFrom(PrivateOffer.SingleProductOffer.PriceModel.Commitment other)
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder mergeFrom(PrivateOffer.SingleProductOffer.PriceModel.Commitment other)| Parameter | |
|---|---|
| Name | Description |
other |
PrivateOffer.SingleProductOffer.PriceModel.Commitment |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
setAdditionalCredit(Money value)
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder setAdditionalCredit(Money value) Optional. Additional credit granted to the customer.
Additional credits are only supported for custom interval offers.
Equivalent behavior can be achieved for standard interval offers by
varying the commitment_amount and discount_percent.
Value cannot be negative. The currency must be "USD" and precision is limited to cents. The maximum allowed value is 1,000,000 USD.
.google.type.Money additional_credit = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
com.google.type.Money |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
setAdditionalCredit(Money.Builder builderForValue)
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder setAdditionalCredit(Money.Builder builderForValue) Optional. Additional credit granted to the customer.
Additional credits are only supported for custom interval offers.
Equivalent behavior can be achieved for standard interval offers by
varying the commitment_amount and discount_percent.
Value cannot be negative. The currency must be "USD" and precision is limited to cents. The maximum allowed value is 1,000,000 USD.
.google.type.Money additional_credit = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
com.google.type.Money.Builder |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
setCommitmentAmount(Money value)
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder setCommitmentAmount(Money value)Optional. The commitment balance that the customer will receive. Value cannot be negative. The currency must be "USD" and precision is limited to cents. Must be present to publish the offer, if the parent message is set. The maximum allowed value is 1,000,000,000 USD.
If the current offer amends a private offer where the term has not
ended, and if the field
single_product_offer.standard_interval_price.price_model.commitment.commitment_amount
is set on both the current offer and the amended private offer, then
the commitment amount must be equal or higher on the current offer,
compared to the amended private offer.
.google.type.Money commitment_amount = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
com.google.type.Money |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
setCommitmentAmount(Money.Builder builderForValue)
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder setCommitmentAmount(Money.Builder builderForValue)Optional. The commitment balance that the customer will receive. Value cannot be negative. The currency must be "USD" and precision is limited to cents. Must be present to publish the offer, if the parent message is set. The maximum allowed value is 1,000,000,000 USD.
If the current offer amends a private offer where the term has not
ended, and if the field
single_product_offer.standard_interval_price.price_model.commitment.commitment_amount
is set on both the current offer and the amended private offer, then
the commitment amount must be equal or higher on the current offer,
compared to the amended private offer.
.google.type.Money commitment_amount = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
com.google.type.Money.Builder |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
setDiscardPreviousCreditBalance(boolean value)
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder setDiscardPreviousCreditBalance(boolean value)Optional. Whether to discard the previous credit balance when the associated installment starts. If not set, the previous credit balance will be rolled over to the current installment.
If there are no previous installments, then the value of this field will not matter - since it has no effect when no credits exist.
bool discard_previous_credit_balance = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
booleanThe discardPreviousCreditBalance to set. |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
This builder for chaining. |
setDiscountPercent(Decimal value)
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder setDiscountPercent(Decimal value) Optional. The discount percent on commitment_amount.
For example, 10 means a discount of 10%. If the original
commitment_amount is $100 then the discounted amount will be $90.
The customer is charged $90 and receives $100 in credits.
All reported usage will be charged at the standard price.
If this field is set, the price_model.usage must be unset. A
private offer can apply a discount to all usage or to a usage
commitment, but not both.
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
com.google.type.Decimal |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|
setDiscountPercent(Decimal.Builder builderForValue)
public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder setDiscountPercent(Decimal.Builder builderForValue) Optional. The discount percent on commitment_amount.
For example, 10 means a discount of 10%. If the original
commitment_amount is $100 then the discounted amount will be $90.
The customer is charged $90 and receives $100 in credits.
All reported usage will be charged at the standard price.
If this field is set, the price_model.usage must be unset. A
private offer can apply a discount to all usage or to a usage
commitment, but not both.
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
com.google.type.Decimal.Builder |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder |
|