- Resource: OneTimeProductOffer
- State
- OneTimeProductPreOrderOffer
- PreOrderPriceChangeBehavior
- OneTimeProductDiscountedOffer
- RegionalPricingAndAvailabilityConfig
- OneTimeProductOfferNoPriceOverrideOptions
- Availability
- Methods
Resource: OneTimeProductOffer
A single offer for a one-time product.
JSON representation |
---|
{ "packageName": string, "productId": string, "purchaseOptionId": string, "offerId": string, "state": enum ( |
Fields | |
---|---|
packageName |
Required. Immutable. The package name of the app the parent product belongs to. |
productId |
Required. Immutable. The ID of the parent product this offer belongs to. |
purchaseOptionId |
Required. Immutable. The ID of the purchase option to which this offer is an extension. |
offerId |
Required. Immutable. The ID of this product offer. Must be unique within the purchase option. It must start with a number or lower-case letter, and can only contain lower-case letters (a-z), numbers (0-9), and hyphens (-). The maximum length is 63 characters. |
state |
Output only. The current state of this offer. This field cannot be changed by updating the resource. Use the dedicated endpoints instead. |
regionalPricingAndAvailabilityConfigs[] |
Set of regional pricing and availability information for this offer. Must not have duplicate entries with the same regionCode. |
offerTags[] |
Optional. List of up to 20 custom tags specified for this offer, and returned to the app through the billing library. |
regionsVersion |
Output only. The version of the regions configuration that was used to generate the one-time product offer. |
Union field offer_type . The type of this offer. Exactly one must be set. offer_type can be only one of the following: |
|
preOrderOffer |
A pre-order offer. |
discountedOffer |
A discounted offer. |
State
The current state of the offer.
Enums | |
---|---|
STATE_UNSPECIFIED |
Default value, should never be used. |
DRAFT |
The offer is not and has never been available to users. |
ACTIVE |
The offer is available to users, as long as its conditions are met. |
CANCELLED |
This state is specific to pre-orders. The offer is cancelled and not available to users. All pending orders related to this offer were cancelled. |
INACTIVE |
This state is specific to discounted offers. The offer is no longer available to users. |
OneTimeProductPreOrderOffer
Configuration specific to pre-order offers.
JSON representation |
---|
{
"startTime": string,
"endTime": string,
"releaseTime": string,
"priceChangeBehavior": enum ( |
Fields | |
---|---|
startTime |
Required. Time when the pre-order will start being available. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
endTime |
Required. Time when the pre-order will stop being available. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
releaseTime |
Required. Time on which the product associated with the pre-order will be released and the pre-order orders fulfilled. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
priceChangeBehavior |
Required. Immutable. Specifies how price changes affect pre-existing pre-orders. |
PreOrderPriceChangeBehavior
Specifies how price changes affect pre-existing pre-orders.
Enums | |
---|---|
PRE_ORDER_PRICE_CHANGE_BEHAVIOR_UNSPECIFIED |
Unspecified price change behavior. Must not be used. |
PRE_ORDER_PRICE_CHANGE_BEHAVIOR_TWO_POINT_LOWEST |
The buyer gets charged the minimum between the initial price at the time of pre-order and the final offer price on the release date. |
PRE_ORDER_PRICE_CHANGE_BEHAVIOR_NEW_ORDERS_ONLY |
The buyer gets the same price as the one they pre-ordered, regardless of any price changes that may have happened after the pre-order. |
OneTimeProductDiscountedOffer
Configuration specific to discounted offers.
JSON representation |
---|
{ "startTime": string, "endTime": string, "redemptionLimit": string } |
Fields | |
---|---|
startTime |
Time when the offer will start being available. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
endTime |
Time when the offer will stop being available. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
redemptionLimit |
Optional. The number of times this offer can be redeemed. If unset or set to 0, allows for unlimited offer redemptions. Otherwise must be a number between 1 and 50 inclusive. |
RegionalPricingAndAvailabilityConfig
Regional pricing and availability configuration for a one-time product offer.
JSON representation |
---|
{ "regionCode": string, "availability": enum ( |
Fields | |
---|---|
regionCode |
Required. Region code this configuration applies to, as defined by ISO 3166-2, e.g., "US". |
availability |
Required. The availability for this region. |
Union field price_override . The price override of this offer. Exactly one must be set. price_override can be only one of the following: |
|
noOverride |
The price defined in the purchase option for this region will be used. |
relativeDiscount |
The fraction of the purchase option price that the user pays for this offer. For example, if the purchase option price for this region is $12, then a 50% discount would correspond to a price of $6. The discount must be specified as a fraction strictly larger than 0 and strictly smaller than 1. The resulting price will be rounded to the nearest billable unit (e.g. cents for USD). The relative discount is considered invalid if the discounted price ends up being smaller than the minimum price allowed in this region. |
absoluteDiscount |
The absolute value of the discount that is subtracted from the purchase option price. It should be between 0 and the purchase option price. |
OneTimeProductOfferNoPriceOverrideOptions
This type has no fields.
Options for one-time product offers without a regional price override.
Availability
The availability of the offer.
Enums | |
---|---|
AVAILABILITY_UNSPECIFIED |
Unspecified availability. Must not be used. |
AVAILABLE |
The offer is available to users. |
NO_LONGER_AVAILABLE |
The offer is no longer available to users. This value can only be used if the availability was previously set as AVAILABLE. |
Methods |
|
---|---|
|
Activates a one-time product offer. |
|
Deletes one or more one-time product offers. |
|
Reads one or more one-time product offers. |
|
Creates or updates one or more one-time product offers. |
|
Updates a batch of one-time product offer states. |
|
Cancels a one-time product offer. |
|
Deactivates a one-time product offer. |
|
Lists all offers under a given app, product, or purchase option. |