activate(packageName, productId, basePlanId, offerId, body=None, x__xgafv=None)
Activates a subscription offer. Once activated, subscription offers will be available to new subscribers.
batchGet(packageName, productId, basePlanId, body=None, x__xgafv=None)
Reads one or more subscription offers.
batchUpdate(packageName, productId, basePlanId, body=None, x__xgafv=None)
Updates a batch of subscription offers. Set the latencyTolerance field on nested requests to PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT to achieve maximum update throughput.
batchUpdateStates(packageName, productId, basePlanId, body=None, x__xgafv=None)
Updates a batch of subscription offer states. Set the latencyTolerance field on nested requests to PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT to achieve maximum update throughput.
Close httplib2 connections.
Creates a new subscription offer. Only auto-renewing base plans can have subscription offers. The offer state will be DRAFT until it is activated.
deactivate(packageName, productId, basePlanId, offerId, body=None, x__xgafv=None)
Deactivates a subscription offer. Once deactivated, existing subscribers will maintain their subscription, but the offer will become unavailable to new subscribers.
delete(packageName, productId, basePlanId, offerId, x__xgafv=None)
Deletes a subscription offer. Can only be done for draft offers. This action is irreversible.
get(packageName, productId, basePlanId, offerId, x__xgafv=None)
Reads a single offer
list(packageName, productId, basePlanId, pageSize=None, pageToken=None, x__xgafv=None)
Lists all offers under a given subscription.
Retrieves the next page of results.
Updates an existing subscription offer.
activate(packageName, productId, basePlanId, offerId, body=None, x__xgafv=None)
Activates a subscription offer. Once activated, subscription offers will be available to new subscribers. Args: packageName: string, Required. The parent app (package name) of the offer to activate. (required) productId: string, Required. The parent subscription (ID) of the offer to activate. (required) basePlanId: string, Required. The parent base plan (ID) of the offer to activate. (required) offerId: string, Required. The unique offer ID of the offer to activate. (required) body: object, The request body. The object takes the form of: { # Request message for ActivateSubscriptionOffer. "basePlanId": "A String", # Required. The parent base plan (ID) of the offer to activate. "latencyTolerance": "A String", # Optional. The latency tolerance for the propagation of this product update. Defaults to latency-sensitive. "offerId": "A String", # Required. The unique offer ID of the offer to activate. "packageName": "A String", # Required. The parent app (package name) of the offer to activate. "productId": "A String", # Required. The parent subscription (ID) of the offer to activate. } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A single, temporary offer "basePlanId": "A String", # Required. Immutable. The ID of the base plan to which this offer is an extension. "offerId": "A String", # Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. "offerTags": [ # List of up to 20 custom tags specified for this offer, and returned to the app through the billing library. { # Represents a custom tag specified for base plans and subscription offers. "tag": "A String", # Must conform with RFC-1034. That is, this string can only contain lower-case letters (a-z), numbers (0-9), and hyphens (-), and be at most 20 characters. }, ], "otherRegionsConfig": { # Configuration for any new locations Play may launch in specified on a subscription offer. # The configuration for any new locations Play may launch in the future. "otherRegionsNewSubscriberAvailability": True or False, # Whether the subscription offer in any new locations Play may launch in the future. If not specified, this will default to false. }, "packageName": "A String", # Required. Immutable. The package name of the app the parent subscription belongs to. "phases": [ # Required. The phases of this subscription offer. Must contain at least one and at most two entries. Users will always receive all these phases in the specified order. { # A single phase of a subscription offer. "duration": "A String", # Required. The duration of a single recurrence of this phase. Specified in ISO 8601 format. "otherRegionsConfig": { # Configuration for any new locations Play may launch in for a single offer phase. # Pricing information for any new locations Play may launch in. "absoluteDiscounts": { # Pricing information for any new locations Play may launch in. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "free": { # Represents the free price override configuration for any new locations Play may launch for a single offer phase. # Set to specify this offer is free to obtain. }, "otherRegionsPrices": { # Pricing information for any new locations Play may launch in. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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 any new locations Play may launch in. }, "recurrenceCount": 42, # Required. The number of times this phase repeats. If this offer phase is not free, each recurrence charges the user the price of this offer phase. "regionalConfigs": [ # Required. The region-specific configuration of this offer phase. This list must contain exactly one entry for each region for which the subscription offer has a regional config. { # Configuration for a single phase of a subscription offer in a single region. "absoluteDiscount": { # Represents an amount of money with its currency type. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "free": { # Represents the free price override configuration for a single phase of a subscription offer # Set to specify this offer is free to obtain. }, "price": { # Represents an amount of money with its currency type. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "regionCode": "A String", # Required. Immutable. The region to which this config applies. "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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. }, ], }, ], "productId": "A String", # Required. Immutable. The ID of the parent subscription this offer belongs to. "regionalConfigs": [ # Required. The region-specific configuration of this offer. Must contain at least one entry. { # Configuration for a subscription offer in a single region. "newSubscriberAvailability": True or False, # Whether the subscription offer in the specified region is available for new subscribers. Existing subscribers will not have their subscription cancelled if this value is set to false. If not specified, this will default to false. "regionCode": "A String", # Required. Immutable. Region code this configuration applies to, as defined by ISO 3166-2, e.g. "US". }, ], "state": "A String", # Output only. The current state of this offer. Can be changed using Activate and Deactivate actions. NB: the base plan state supersedes this state, so an active offer may not be available if the base plan is not active. "targeting": { # Defines the rule a user needs to satisfy to receive this offer. # The requirements that users need to fulfil to be eligible for this offer. Represents the requirements that Play will evaluate to decide whether an offer should be returned. Developers may further filter these offers themselves. "acquisitionRule": { # Represents a targeting rule of the form: User never had {scope} before. # Offer targeting rule for new user acquisition. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "any subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, "upgradeRule": { # Represents a targeting rule of the form: User currently has {scope} [with billing period {billing_period}]. # Offer targeting rule for upgrading users' existing plans. "billingPeriodDuration": "A String", # The specific billing period duration, specified in ISO 8601 format, that a user must be currently subscribed to to be eligible for this rule. If not specified, users subscribed to any billing period are matched. "oncePerUser": True or False, # Limit this offer to only once per user. If set to true, a user can never be eligible for this offer again if they ever subscribed to this offer. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "specific subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, }, }
batchGet(packageName, productId, basePlanId, body=None, x__xgafv=None)
Reads one or more subscription offers. Args: packageName: string, Required. The parent app (package name) for which the subscriptions should be created or updated. Must be equal to the package_name field on all the requests. (required) productId: string, Required. The product ID of the parent subscription, if all updated offers belong to the same subscription. If this request spans multiple subscriptions, set this field to "-". Must be set. (required) basePlanId: string, Required. The parent base plan (ID) for which the offers should be read. May be specified as '-' to read offers from multiple base plans. (required) body: object, The request body. The object takes the form of: { # Request message for BatchGetSubscriptionOffers endpoint. "requests": [ # Required. A list of update requests of up to 100 elements. All requests must update different subscriptions. { # Request message for GetSubscriptionOffer. "basePlanId": "A String", # Required. The parent base plan (ID) of the offer to get. "offerId": "A String", # Required. The unique offer ID of the offer to get. "packageName": "A String", # Required. The parent app (package name) of the offer to get. "productId": "A String", # Required. The parent subscription (ID) of the offer to get. }, ], } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Response message for BatchGetSubscriptionOffers endpoint. "subscriptionOffers": [ { # A single, temporary offer "basePlanId": "A String", # Required. Immutable. The ID of the base plan to which this offer is an extension. "offerId": "A String", # Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. "offerTags": [ # List of up to 20 custom tags specified for this offer, and returned to the app through the billing library. { # Represents a custom tag specified for base plans and subscription offers. "tag": "A String", # Must conform with RFC-1034. That is, this string can only contain lower-case letters (a-z), numbers (0-9), and hyphens (-), and be at most 20 characters. }, ], "otherRegionsConfig": { # Configuration for any new locations Play may launch in specified on a subscription offer. # The configuration for any new locations Play may launch in the future. "otherRegionsNewSubscriberAvailability": True or False, # Whether the subscription offer in any new locations Play may launch in the future. If not specified, this will default to false. }, "packageName": "A String", # Required. Immutable. The package name of the app the parent subscription belongs to. "phases": [ # Required. The phases of this subscription offer. Must contain at least one and at most two entries. Users will always receive all these phases in the specified order. { # A single phase of a subscription offer. "duration": "A String", # Required. The duration of a single recurrence of this phase. Specified in ISO 8601 format. "otherRegionsConfig": { # Configuration for any new locations Play may launch in for a single offer phase. # Pricing information for any new locations Play may launch in. "absoluteDiscounts": { # Pricing information for any new locations Play may launch in. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "free": { # Represents the free price override configuration for any new locations Play may launch for a single offer phase. # Set to specify this offer is free to obtain. }, "otherRegionsPrices": { # Pricing information for any new locations Play may launch in. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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 any new locations Play may launch in. }, "recurrenceCount": 42, # Required. The number of times this phase repeats. If this offer phase is not free, each recurrence charges the user the price of this offer phase. "regionalConfigs": [ # Required. The region-specific configuration of this offer phase. This list must contain exactly one entry for each region for which the subscription offer has a regional config. { # Configuration for a single phase of a subscription offer in a single region. "absoluteDiscount": { # Represents an amount of money with its currency type. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "free": { # Represents the free price override configuration for a single phase of a subscription offer # Set to specify this offer is free to obtain. }, "price": { # Represents an amount of money with its currency type. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "regionCode": "A String", # Required. Immutable. The region to which this config applies. "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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. }, ], }, ], "productId": "A String", # Required. Immutable. The ID of the parent subscription this offer belongs to. "regionalConfigs": [ # Required. The region-specific configuration of this offer. Must contain at least one entry. { # Configuration for a subscription offer in a single region. "newSubscriberAvailability": True or False, # Whether the subscription offer in the specified region is available for new subscribers. Existing subscribers will not have their subscription cancelled if this value is set to false. If not specified, this will default to false. "regionCode": "A String", # Required. Immutable. Region code this configuration applies to, as defined by ISO 3166-2, e.g. "US". }, ], "state": "A String", # Output only. The current state of this offer. Can be changed using Activate and Deactivate actions. NB: the base plan state supersedes this state, so an active offer may not be available if the base plan is not active. "targeting": { # Defines the rule a user needs to satisfy to receive this offer. # The requirements that users need to fulfil to be eligible for this offer. Represents the requirements that Play will evaluate to decide whether an offer should be returned. Developers may further filter these offers themselves. "acquisitionRule": { # Represents a targeting rule of the form: User never had {scope} before. # Offer targeting rule for new user acquisition. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "any subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, "upgradeRule": { # Represents a targeting rule of the form: User currently has {scope} [with billing period {billing_period}]. # Offer targeting rule for upgrading users' existing plans. "billingPeriodDuration": "A String", # The specific billing period duration, specified in ISO 8601 format, that a user must be currently subscribed to to be eligible for this rule. If not specified, users subscribed to any billing period are matched. "oncePerUser": True or False, # Limit this offer to only once per user. If set to true, a user can never be eligible for this offer again if they ever subscribed to this offer. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "specific subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, }, }, ], }
batchUpdate(packageName, productId, basePlanId, body=None, x__xgafv=None)
Updates a batch of subscription offers. Set the latencyTolerance field on nested requests to PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT to achieve maximum update throughput. Args: packageName: string, Required. The parent app (package name) of the updated subscription offers. Must be equal to the package_name field on all the updated SubscriptionOffer resources. (required) productId: string, Required. The product ID of the parent subscription, if all updated offers belong to the same subscription. If this request spans multiple subscriptions, set this field to "-". Must be set. (required) basePlanId: string, Required. The parent base plan (ID) for which the offers should be updated. May be specified as '-' to update offers from multiple base plans. (required) body: object, The request body. The object takes the form of: { # Request message for BatchUpdateSubscriptionOffers. "requests": [ # Required. A list of update requests of up to 100 elements. All requests must update different subscription offers. { # Request message for UpdateSubscriptionOffer. "allowMissing": True or False, # Optional. If set to true, and the subscription offer with the given package_name, product_id, base_plan_id and offer_id doesn't exist, an offer will be created. If a new offer is created, update_mask is ignored. "latencyTolerance": "A String", # Optional. The latency tolerance for the propagation of this product update. Defaults to latency-sensitive. "regionsVersion": { # The version of the available regions being used for the specified resource. # Required. The version of the available regions being used for the subscription_offer. "version": "A String", # Required. A string representing the version of available regions being used for the specified resource. Regional prices for the resource have to be specified according to the information published in [this article](https://support.google.com/googleplay/android-developer/answer/10532353). Each time the supported locations substantially change, the version will be incremented. Using this field will ensure that creating and updating the resource with an older region's version and set of regional prices and currencies will succeed even though a new version is available. The latest version is 2022/02. }, "subscriptionOffer": { # A single, temporary offer # Required. The subscription offer to update. "basePlanId": "A String", # Required. Immutable. The ID of the base plan to which this offer is an extension. "offerId": "A String", # Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. "offerTags": [ # List of up to 20 custom tags specified for this offer, and returned to the app through the billing library. { # Represents a custom tag specified for base plans and subscription offers. "tag": "A String", # Must conform with RFC-1034. That is, this string can only contain lower-case letters (a-z), numbers (0-9), and hyphens (-), and be at most 20 characters. }, ], "otherRegionsConfig": { # Configuration for any new locations Play may launch in specified on a subscription offer. # The configuration for any new locations Play may launch in the future. "otherRegionsNewSubscriberAvailability": True or False, # Whether the subscription offer in any new locations Play may launch in the future. If not specified, this will default to false. }, "packageName": "A String", # Required. Immutable. The package name of the app the parent subscription belongs to. "phases": [ # Required. The phases of this subscription offer. Must contain at least one and at most two entries. Users will always receive all these phases in the specified order. { # A single phase of a subscription offer. "duration": "A String", # Required. The duration of a single recurrence of this phase. Specified in ISO 8601 format. "otherRegionsConfig": { # Configuration for any new locations Play may launch in for a single offer phase. # Pricing information for any new locations Play may launch in. "absoluteDiscounts": { # Pricing information for any new locations Play may launch in. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "free": { # Represents the free price override configuration for any new locations Play may launch for a single offer phase. # Set to specify this offer is free to obtain. }, "otherRegionsPrices": { # Pricing information for any new locations Play may launch in. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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 any new locations Play may launch in. }, "recurrenceCount": 42, # Required. The number of times this phase repeats. If this offer phase is not free, each recurrence charges the user the price of this offer phase. "regionalConfigs": [ # Required. The region-specific configuration of this offer phase. This list must contain exactly one entry for each region for which the subscription offer has a regional config. { # Configuration for a single phase of a subscription offer in a single region. "absoluteDiscount": { # Represents an amount of money with its currency type. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "free": { # Represents the free price override configuration for a single phase of a subscription offer # Set to specify this offer is free to obtain. }, "price": { # Represents an amount of money with its currency type. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "regionCode": "A String", # Required. Immutable. The region to which this config applies. "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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. }, ], }, ], "productId": "A String", # Required. Immutable. The ID of the parent subscription this offer belongs to. "regionalConfigs": [ # Required. The region-specific configuration of this offer. Must contain at least one entry. { # Configuration for a subscription offer in a single region. "newSubscriberAvailability": True or False, # Whether the subscription offer in the specified region is available for new subscribers. Existing subscribers will not have their subscription cancelled if this value is set to false. If not specified, this will default to false. "regionCode": "A String", # Required. Immutable. Region code this configuration applies to, as defined by ISO 3166-2, e.g. "US". }, ], "state": "A String", # Output only. The current state of this offer. Can be changed using Activate and Deactivate actions. NB: the base plan state supersedes this state, so an active offer may not be available if the base plan is not active. "targeting": { # Defines the rule a user needs to satisfy to receive this offer. # The requirements that users need to fulfil to be eligible for this offer. Represents the requirements that Play will evaluate to decide whether an offer should be returned. Developers may further filter these offers themselves. "acquisitionRule": { # Represents a targeting rule of the form: User never had {scope} before. # Offer targeting rule for new user acquisition. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "any subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, "upgradeRule": { # Represents a targeting rule of the form: User currently has {scope} [with billing period {billing_period}]. # Offer targeting rule for upgrading users' existing plans. "billingPeriodDuration": "A String", # The specific billing period duration, specified in ISO 8601 format, that a user must be currently subscribed to to be eligible for this rule. If not specified, users subscribed to any billing period are matched. "oncePerUser": True or False, # Limit this offer to only once per user. If set to true, a user can never be eligible for this offer again if they ever subscribed to this offer. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "specific subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, }, }, "updateMask": "A String", # Required. The list of fields to be updated. }, ], } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Response message for BatchUpdateSubscriptionOffers. "subscriptionOffers": [ # The updated subscription offers list. { # A single, temporary offer "basePlanId": "A String", # Required. Immutable. The ID of the base plan to which this offer is an extension. "offerId": "A String", # Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. "offerTags": [ # List of up to 20 custom tags specified for this offer, and returned to the app through the billing library. { # Represents a custom tag specified for base plans and subscription offers. "tag": "A String", # Must conform with RFC-1034. That is, this string can only contain lower-case letters (a-z), numbers (0-9), and hyphens (-), and be at most 20 characters. }, ], "otherRegionsConfig": { # Configuration for any new locations Play may launch in specified on a subscription offer. # The configuration for any new locations Play may launch in the future. "otherRegionsNewSubscriberAvailability": True or False, # Whether the subscription offer in any new locations Play may launch in the future. If not specified, this will default to false. }, "packageName": "A String", # Required. Immutable. The package name of the app the parent subscription belongs to. "phases": [ # Required. The phases of this subscription offer. Must contain at least one and at most two entries. Users will always receive all these phases in the specified order. { # A single phase of a subscription offer. "duration": "A String", # Required. The duration of a single recurrence of this phase. Specified in ISO 8601 format. "otherRegionsConfig": { # Configuration for any new locations Play may launch in for a single offer phase. # Pricing information for any new locations Play may launch in. "absoluteDiscounts": { # Pricing information for any new locations Play may launch in. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "free": { # Represents the free price override configuration for any new locations Play may launch for a single offer phase. # Set to specify this offer is free to obtain. }, "otherRegionsPrices": { # Pricing information for any new locations Play may launch in. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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 any new locations Play may launch in. }, "recurrenceCount": 42, # Required. The number of times this phase repeats. If this offer phase is not free, each recurrence charges the user the price of this offer phase. "regionalConfigs": [ # Required. The region-specific configuration of this offer phase. This list must contain exactly one entry for each region for which the subscription offer has a regional config. { # Configuration for a single phase of a subscription offer in a single region. "absoluteDiscount": { # Represents an amount of money with its currency type. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "free": { # Represents the free price override configuration for a single phase of a subscription offer # Set to specify this offer is free to obtain. }, "price": { # Represents an amount of money with its currency type. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "regionCode": "A String", # Required. Immutable. The region to which this config applies. "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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. }, ], }, ], "productId": "A String", # Required. Immutable. The ID of the parent subscription this offer belongs to. "regionalConfigs": [ # Required. The region-specific configuration of this offer. Must contain at least one entry. { # Configuration for a subscription offer in a single region. "newSubscriberAvailability": True or False, # Whether the subscription offer in the specified region is available for new subscribers. Existing subscribers will not have their subscription cancelled if this value is set to false. If not specified, this will default to false. "regionCode": "A String", # Required. Immutable. Region code this configuration applies to, as defined by ISO 3166-2, e.g. "US". }, ], "state": "A String", # Output only. The current state of this offer. Can be changed using Activate and Deactivate actions. NB: the base plan state supersedes this state, so an active offer may not be available if the base plan is not active. "targeting": { # Defines the rule a user needs to satisfy to receive this offer. # The requirements that users need to fulfil to be eligible for this offer. Represents the requirements that Play will evaluate to decide whether an offer should be returned. Developers may further filter these offers themselves. "acquisitionRule": { # Represents a targeting rule of the form: User never had {scope} before. # Offer targeting rule for new user acquisition. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "any subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, "upgradeRule": { # Represents a targeting rule of the form: User currently has {scope} [with billing period {billing_period}]. # Offer targeting rule for upgrading users' existing plans. "billingPeriodDuration": "A String", # The specific billing period duration, specified in ISO 8601 format, that a user must be currently subscribed to to be eligible for this rule. If not specified, users subscribed to any billing period are matched. "oncePerUser": True or False, # Limit this offer to only once per user. If set to true, a user can never be eligible for this offer again if they ever subscribed to this offer. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "specific subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, }, }, ], }
batchUpdateStates(packageName, productId, basePlanId, body=None, x__xgafv=None)
Updates a batch of subscription offer states. Set the latencyTolerance field on nested requests to PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT to achieve maximum update throughput. Args: packageName: string, Required. The parent app (package name) of the updated subscription offers. Must be equal to the package_name field on all the updated SubscriptionOffer resources. (required) productId: string, Required. The product ID of the parent subscription, if all updated offers belong to the same subscription. If this request spans multiple subscriptions, set this field to "-". Must be set. (required) basePlanId: string, Required. The parent base plan (ID) for which the offers should be updated. May be specified as '-' to update offers from multiple base plans. (required) body: object, The request body. The object takes the form of: { # Request message for BatchUpdateSubscriptionOfferStates. "requests": [ # Required. The update request list of up to 100 elements. All requests must update different offers. { # Request message to update the state of a subscription offer. "activateSubscriptionOfferRequest": { # Request message for ActivateSubscriptionOffer. # Activates an offer. Once activated, the offer will be available to new subscribers. "basePlanId": "A String", # Required. The parent base plan (ID) of the offer to activate. "latencyTolerance": "A String", # Optional. The latency tolerance for the propagation of this product update. Defaults to latency-sensitive. "offerId": "A String", # Required. The unique offer ID of the offer to activate. "packageName": "A String", # Required. The parent app (package name) of the offer to activate. "productId": "A String", # Required. The parent subscription (ID) of the offer to activate. }, "deactivateSubscriptionOfferRequest": { # Request message for DeactivateSubscriptionOffer. # Deactivates an offer. Once deactivated, the offer will become unavailable to new subscribers, but existing subscribers will maintain their subscription "basePlanId": "A String", # Required. The parent base plan (ID) of the offer to deactivate. "latencyTolerance": "A String", # Optional. The latency tolerance for the propagation of this product update. Defaults to latency-sensitive. "offerId": "A String", # Required. The unique offer ID of the offer to deactivate. "packageName": "A String", # Required. The parent app (package name) of the offer to deactivate. "productId": "A String", # Required. The parent subscription (ID) of the offer to deactivate. }, }, ], } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Response message for BatchUpdateSubscriptionOfferStates. "subscriptionOffers": [ # The updated subscription offers list. { # A single, temporary offer "basePlanId": "A String", # Required. Immutable. The ID of the base plan to which this offer is an extension. "offerId": "A String", # Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. "offerTags": [ # List of up to 20 custom tags specified for this offer, and returned to the app through the billing library. { # Represents a custom tag specified for base plans and subscription offers. "tag": "A String", # Must conform with RFC-1034. That is, this string can only contain lower-case letters (a-z), numbers (0-9), and hyphens (-), and be at most 20 characters. }, ], "otherRegionsConfig": { # Configuration for any new locations Play may launch in specified on a subscription offer. # The configuration for any new locations Play may launch in the future. "otherRegionsNewSubscriberAvailability": True or False, # Whether the subscription offer in any new locations Play may launch in the future. If not specified, this will default to false. }, "packageName": "A String", # Required. Immutable. The package name of the app the parent subscription belongs to. "phases": [ # Required. The phases of this subscription offer. Must contain at least one and at most two entries. Users will always receive all these phases in the specified order. { # A single phase of a subscription offer. "duration": "A String", # Required. The duration of a single recurrence of this phase. Specified in ISO 8601 format. "otherRegionsConfig": { # Configuration for any new locations Play may launch in for a single offer phase. # Pricing information for any new locations Play may launch in. "absoluteDiscounts": { # Pricing information for any new locations Play may launch in. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "free": { # Represents the free price override configuration for any new locations Play may launch for a single offer phase. # Set to specify this offer is free to obtain. }, "otherRegionsPrices": { # Pricing information for any new locations Play may launch in. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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 any new locations Play may launch in. }, "recurrenceCount": 42, # Required. The number of times this phase repeats. If this offer phase is not free, each recurrence charges the user the price of this offer phase. "regionalConfigs": [ # Required. The region-specific configuration of this offer phase. This list must contain exactly one entry for each region for which the subscription offer has a regional config. { # Configuration for a single phase of a subscription offer in a single region. "absoluteDiscount": { # Represents an amount of money with its currency type. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "free": { # Represents the free price override configuration for a single phase of a subscription offer # Set to specify this offer is free to obtain. }, "price": { # Represents an amount of money with its currency type. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "regionCode": "A String", # Required. Immutable. The region to which this config applies. "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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. }, ], }, ], "productId": "A String", # Required. Immutable. The ID of the parent subscription this offer belongs to. "regionalConfigs": [ # Required. The region-specific configuration of this offer. Must contain at least one entry. { # Configuration for a subscription offer in a single region. "newSubscriberAvailability": True or False, # Whether the subscription offer in the specified region is available for new subscribers. Existing subscribers will not have their subscription cancelled if this value is set to false. If not specified, this will default to false. "regionCode": "A String", # Required. Immutable. Region code this configuration applies to, as defined by ISO 3166-2, e.g. "US". }, ], "state": "A String", # Output only. The current state of this offer. Can be changed using Activate and Deactivate actions. NB: the base plan state supersedes this state, so an active offer may not be available if the base plan is not active. "targeting": { # Defines the rule a user needs to satisfy to receive this offer. # The requirements that users need to fulfil to be eligible for this offer. Represents the requirements that Play will evaluate to decide whether an offer should be returned. Developers may further filter these offers themselves. "acquisitionRule": { # Represents a targeting rule of the form: User never had {scope} before. # Offer targeting rule for new user acquisition. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "any subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, "upgradeRule": { # Represents a targeting rule of the form: User currently has {scope} [with billing period {billing_period}]. # Offer targeting rule for upgrading users' existing plans. "billingPeriodDuration": "A String", # The specific billing period duration, specified in ISO 8601 format, that a user must be currently subscribed to to be eligible for this rule. If not specified, users subscribed to any billing period are matched. "oncePerUser": True or False, # Limit this offer to only once per user. If set to true, a user can never be eligible for this offer again if they ever subscribed to this offer. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "specific subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, }, }, ], }
close()
Close httplib2 connections.
create(packageName, productId, basePlanId, body=None, offerId=None, regionsVersion_version=None, x__xgafv=None)
Creates a new subscription offer. Only auto-renewing base plans can have subscription offers. The offer state will be DRAFT until it is activated. Args: packageName: string, Required. The parent app (package name) for which the offer should be created. Must be equal to the package_name field on the Subscription resource. (required) productId: string, Required. The parent subscription (ID) for which the offer should be created. Must be equal to the product_id field on the SubscriptionOffer resource. (required) basePlanId: string, Required. The parent base plan (ID) for which the offer should be created. Must be equal to the base_plan_id field on the SubscriptionOffer resource. (required) body: object, The request body. The object takes the form of: { # A single, temporary offer "basePlanId": "A String", # Required. Immutable. The ID of the base plan to which this offer is an extension. "offerId": "A String", # Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. "offerTags": [ # List of up to 20 custom tags specified for this offer, and returned to the app through the billing library. { # Represents a custom tag specified for base plans and subscription offers. "tag": "A String", # Must conform with RFC-1034. That is, this string can only contain lower-case letters (a-z), numbers (0-9), and hyphens (-), and be at most 20 characters. }, ], "otherRegionsConfig": { # Configuration for any new locations Play may launch in specified on a subscription offer. # The configuration for any new locations Play may launch in the future. "otherRegionsNewSubscriberAvailability": True or False, # Whether the subscription offer in any new locations Play may launch in the future. If not specified, this will default to false. }, "packageName": "A String", # Required. Immutable. The package name of the app the parent subscription belongs to. "phases": [ # Required. The phases of this subscription offer. Must contain at least one and at most two entries. Users will always receive all these phases in the specified order. { # A single phase of a subscription offer. "duration": "A String", # Required. The duration of a single recurrence of this phase. Specified in ISO 8601 format. "otherRegionsConfig": { # Configuration for any new locations Play may launch in for a single offer phase. # Pricing information for any new locations Play may launch in. "absoluteDiscounts": { # Pricing information for any new locations Play may launch in. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "free": { # Represents the free price override configuration for any new locations Play may launch for a single offer phase. # Set to specify this offer is free to obtain. }, "otherRegionsPrices": { # Pricing information for any new locations Play may launch in. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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 any new locations Play may launch in. }, "recurrenceCount": 42, # Required. The number of times this phase repeats. If this offer phase is not free, each recurrence charges the user the price of this offer phase. "regionalConfigs": [ # Required. The region-specific configuration of this offer phase. This list must contain exactly one entry for each region for which the subscription offer has a regional config. { # Configuration for a single phase of a subscription offer in a single region. "absoluteDiscount": { # Represents an amount of money with its currency type. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "free": { # Represents the free price override configuration for a single phase of a subscription offer # Set to specify this offer is free to obtain. }, "price": { # Represents an amount of money with its currency type. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "regionCode": "A String", # Required. Immutable. The region to which this config applies. "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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. }, ], }, ], "productId": "A String", # Required. Immutable. The ID of the parent subscription this offer belongs to. "regionalConfigs": [ # Required. The region-specific configuration of this offer. Must contain at least one entry. { # Configuration for a subscription offer in a single region. "newSubscriberAvailability": True or False, # Whether the subscription offer in the specified region is available for new subscribers. Existing subscribers will not have their subscription cancelled if this value is set to false. If not specified, this will default to false. "regionCode": "A String", # Required. Immutable. Region code this configuration applies to, as defined by ISO 3166-2, e.g. "US". }, ], "state": "A String", # Output only. The current state of this offer. Can be changed using Activate and Deactivate actions. NB: the base plan state supersedes this state, so an active offer may not be available if the base plan is not active. "targeting": { # Defines the rule a user needs to satisfy to receive this offer. # The requirements that users need to fulfil to be eligible for this offer. Represents the requirements that Play will evaluate to decide whether an offer should be returned. Developers may further filter these offers themselves. "acquisitionRule": { # Represents a targeting rule of the form: User never had {scope} before. # Offer targeting rule for new user acquisition. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "any subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, "upgradeRule": { # Represents a targeting rule of the form: User currently has {scope} [with billing period {billing_period}]. # Offer targeting rule for upgrading users' existing plans. "billingPeriodDuration": "A String", # The specific billing period duration, specified in ISO 8601 format, that a user must be currently subscribed to to be eligible for this rule. If not specified, users subscribed to any billing period are matched. "oncePerUser": True or False, # Limit this offer to only once per user. If set to true, a user can never be eligible for this offer again if they ever subscribed to this offer. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "specific subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, }, } offerId: string, Required. The ID to use for the offer. For the requirements on this format, see the documentation of the offer_id field on the SubscriptionOffer resource. regionsVersion_version: string, Required. A string representing the version of available regions being used for the specified resource. Regional prices for the resource have to be specified according to the information published in [this article](https://support.google.com/googleplay/android-developer/answer/10532353). Each time the supported locations substantially change, the version will be incremented. Using this field will ensure that creating and updating the resource with an older region's version and set of regional prices and currencies will succeed even though a new version is available. The latest version is 2022/02. x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A single, temporary offer "basePlanId": "A String", # Required. Immutable. The ID of the base plan to which this offer is an extension. "offerId": "A String", # Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. "offerTags": [ # List of up to 20 custom tags specified for this offer, and returned to the app through the billing library. { # Represents a custom tag specified for base plans and subscription offers. "tag": "A String", # Must conform with RFC-1034. That is, this string can only contain lower-case letters (a-z), numbers (0-9), and hyphens (-), and be at most 20 characters. }, ], "otherRegionsConfig": { # Configuration for any new locations Play may launch in specified on a subscription offer. # The configuration for any new locations Play may launch in the future. "otherRegionsNewSubscriberAvailability": True or False, # Whether the subscription offer in any new locations Play may launch in the future. If not specified, this will default to false. }, "packageName": "A String", # Required. Immutable. The package name of the app the parent subscription belongs to. "phases": [ # Required. The phases of this subscription offer. Must contain at least one and at most two entries. Users will always receive all these phases in the specified order. { # A single phase of a subscription offer. "duration": "A String", # Required. The duration of a single recurrence of this phase. Specified in ISO 8601 format. "otherRegionsConfig": { # Configuration for any new locations Play may launch in for a single offer phase. # Pricing information for any new locations Play may launch in. "absoluteDiscounts": { # Pricing information for any new locations Play may launch in. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "free": { # Represents the free price override configuration for any new locations Play may launch for a single offer phase. # Set to specify this offer is free to obtain. }, "otherRegionsPrices": { # Pricing information for any new locations Play may launch in. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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 any new locations Play may launch in. }, "recurrenceCount": 42, # Required. The number of times this phase repeats. If this offer phase is not free, each recurrence charges the user the price of this offer phase. "regionalConfigs": [ # Required. The region-specific configuration of this offer phase. This list must contain exactly one entry for each region for which the subscription offer has a regional config. { # Configuration for a single phase of a subscription offer in a single region. "absoluteDiscount": { # Represents an amount of money with its currency type. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "free": { # Represents the free price override configuration for a single phase of a subscription offer # Set to specify this offer is free to obtain. }, "price": { # Represents an amount of money with its currency type. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "regionCode": "A String", # Required. Immutable. The region to which this config applies. "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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. }, ], }, ], "productId": "A String", # Required. Immutable. The ID of the parent subscription this offer belongs to. "regionalConfigs": [ # Required. The region-specific configuration of this offer. Must contain at least one entry. { # Configuration for a subscription offer in a single region. "newSubscriberAvailability": True or False, # Whether the subscription offer in the specified region is available for new subscribers. Existing subscribers will not have their subscription cancelled if this value is set to false. If not specified, this will default to false. "regionCode": "A String", # Required. Immutable. Region code this configuration applies to, as defined by ISO 3166-2, e.g. "US". }, ], "state": "A String", # Output only. The current state of this offer. Can be changed using Activate and Deactivate actions. NB: the base plan state supersedes this state, so an active offer may not be available if the base plan is not active. "targeting": { # Defines the rule a user needs to satisfy to receive this offer. # The requirements that users need to fulfil to be eligible for this offer. Represents the requirements that Play will evaluate to decide whether an offer should be returned. Developers may further filter these offers themselves. "acquisitionRule": { # Represents a targeting rule of the form: User never had {scope} before. # Offer targeting rule for new user acquisition. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "any subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, "upgradeRule": { # Represents a targeting rule of the form: User currently has {scope} [with billing period {billing_period}]. # Offer targeting rule for upgrading users' existing plans. "billingPeriodDuration": "A String", # The specific billing period duration, specified in ISO 8601 format, that a user must be currently subscribed to to be eligible for this rule. If not specified, users subscribed to any billing period are matched. "oncePerUser": True or False, # Limit this offer to only once per user. If set to true, a user can never be eligible for this offer again if they ever subscribed to this offer. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "specific subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, }, }
deactivate(packageName, productId, basePlanId, offerId, body=None, x__xgafv=None)
Deactivates a subscription offer. Once deactivated, existing subscribers will maintain their subscription, but the offer will become unavailable to new subscribers. Args: packageName: string, Required. The parent app (package name) of the offer to deactivate. (required) productId: string, Required. The parent subscription (ID) of the offer to deactivate. (required) basePlanId: string, Required. The parent base plan (ID) of the offer to deactivate. (required) offerId: string, Required. The unique offer ID of the offer to deactivate. (required) body: object, The request body. The object takes the form of: { # Request message for DeactivateSubscriptionOffer. "basePlanId": "A String", # Required. The parent base plan (ID) of the offer to deactivate. "latencyTolerance": "A String", # Optional. The latency tolerance for the propagation of this product update. Defaults to latency-sensitive. "offerId": "A String", # Required. The unique offer ID of the offer to deactivate. "packageName": "A String", # Required. The parent app (package name) of the offer to deactivate. "productId": "A String", # Required. The parent subscription (ID) of the offer to deactivate. } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A single, temporary offer "basePlanId": "A String", # Required. Immutable. The ID of the base plan to which this offer is an extension. "offerId": "A String", # Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. "offerTags": [ # List of up to 20 custom tags specified for this offer, and returned to the app through the billing library. { # Represents a custom tag specified for base plans and subscription offers. "tag": "A String", # Must conform with RFC-1034. That is, this string can only contain lower-case letters (a-z), numbers (0-9), and hyphens (-), and be at most 20 characters. }, ], "otherRegionsConfig": { # Configuration for any new locations Play may launch in specified on a subscription offer. # The configuration for any new locations Play may launch in the future. "otherRegionsNewSubscriberAvailability": True or False, # Whether the subscription offer in any new locations Play may launch in the future. If not specified, this will default to false. }, "packageName": "A String", # Required. Immutable. The package name of the app the parent subscription belongs to. "phases": [ # Required. The phases of this subscription offer. Must contain at least one and at most two entries. Users will always receive all these phases in the specified order. { # A single phase of a subscription offer. "duration": "A String", # Required. The duration of a single recurrence of this phase. Specified in ISO 8601 format. "otherRegionsConfig": { # Configuration for any new locations Play may launch in for a single offer phase. # Pricing information for any new locations Play may launch in. "absoluteDiscounts": { # Pricing information for any new locations Play may launch in. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "free": { # Represents the free price override configuration for any new locations Play may launch for a single offer phase. # Set to specify this offer is free to obtain. }, "otherRegionsPrices": { # Pricing information for any new locations Play may launch in. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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 any new locations Play may launch in. }, "recurrenceCount": 42, # Required. The number of times this phase repeats. If this offer phase is not free, each recurrence charges the user the price of this offer phase. "regionalConfigs": [ # Required. The region-specific configuration of this offer phase. This list must contain exactly one entry for each region for which the subscription offer has a regional config. { # Configuration for a single phase of a subscription offer in a single region. "absoluteDiscount": { # Represents an amount of money with its currency type. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "free": { # Represents the free price override configuration for a single phase of a subscription offer # Set to specify this offer is free to obtain. }, "price": { # Represents an amount of money with its currency type. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "regionCode": "A String", # Required. Immutable. The region to which this config applies. "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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. }, ], }, ], "productId": "A String", # Required. Immutable. The ID of the parent subscription this offer belongs to. "regionalConfigs": [ # Required. The region-specific configuration of this offer. Must contain at least one entry. { # Configuration for a subscription offer in a single region. "newSubscriberAvailability": True or False, # Whether the subscription offer in the specified region is available for new subscribers. Existing subscribers will not have their subscription cancelled if this value is set to false. If not specified, this will default to false. "regionCode": "A String", # Required. Immutable. Region code this configuration applies to, as defined by ISO 3166-2, e.g. "US". }, ], "state": "A String", # Output only. The current state of this offer. Can be changed using Activate and Deactivate actions. NB: the base plan state supersedes this state, so an active offer may not be available if the base plan is not active. "targeting": { # Defines the rule a user needs to satisfy to receive this offer. # The requirements that users need to fulfil to be eligible for this offer. Represents the requirements that Play will evaluate to decide whether an offer should be returned. Developers may further filter these offers themselves. "acquisitionRule": { # Represents a targeting rule of the form: User never had {scope} before. # Offer targeting rule for new user acquisition. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "any subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, "upgradeRule": { # Represents a targeting rule of the form: User currently has {scope} [with billing period {billing_period}]. # Offer targeting rule for upgrading users' existing plans. "billingPeriodDuration": "A String", # The specific billing period duration, specified in ISO 8601 format, that a user must be currently subscribed to to be eligible for this rule. If not specified, users subscribed to any billing period are matched. "oncePerUser": True or False, # Limit this offer to only once per user. If set to true, a user can never be eligible for this offer again if they ever subscribed to this offer. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "specific subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, }, }
delete(packageName, productId, basePlanId, offerId, x__xgafv=None)
Deletes a subscription offer. Can only be done for draft offers. This action is irreversible. Args: packageName: string, Required. The parent app (package name) of the offer to delete. (required) productId: string, Required. The parent subscription (ID) of the offer to delete. (required) basePlanId: string, Required. The parent base plan (ID) of the offer to delete. (required) offerId: string, Required. The unique offer ID of the offer to delete. (required) x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format
get(packageName, productId, basePlanId, offerId, x__xgafv=None)
Reads a single offer Args: packageName: string, Required. The parent app (package name) of the offer to get. (required) productId: string, Required. The parent subscription (ID) of the offer to get. (required) basePlanId: string, Required. The parent base plan (ID) of the offer to get. (required) offerId: string, Required. The unique offer ID of the offer to get. (required) x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A single, temporary offer "basePlanId": "A String", # Required. Immutable. The ID of the base plan to which this offer is an extension. "offerId": "A String", # Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. "offerTags": [ # List of up to 20 custom tags specified for this offer, and returned to the app through the billing library. { # Represents a custom tag specified for base plans and subscription offers. "tag": "A String", # Must conform with RFC-1034. That is, this string can only contain lower-case letters (a-z), numbers (0-9), and hyphens (-), and be at most 20 characters. }, ], "otherRegionsConfig": { # Configuration for any new locations Play may launch in specified on a subscription offer. # The configuration for any new locations Play may launch in the future. "otherRegionsNewSubscriberAvailability": True or False, # Whether the subscription offer in any new locations Play may launch in the future. If not specified, this will default to false. }, "packageName": "A String", # Required. Immutable. The package name of the app the parent subscription belongs to. "phases": [ # Required. The phases of this subscription offer. Must contain at least one and at most two entries. Users will always receive all these phases in the specified order. { # A single phase of a subscription offer. "duration": "A String", # Required. The duration of a single recurrence of this phase. Specified in ISO 8601 format. "otherRegionsConfig": { # Configuration for any new locations Play may launch in for a single offer phase. # Pricing information for any new locations Play may launch in. "absoluteDiscounts": { # Pricing information for any new locations Play may launch in. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "free": { # Represents the free price override configuration for any new locations Play may launch for a single offer phase. # Set to specify this offer is free to obtain. }, "otherRegionsPrices": { # Pricing information for any new locations Play may launch in. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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 any new locations Play may launch in. }, "recurrenceCount": 42, # Required. The number of times this phase repeats. If this offer phase is not free, each recurrence charges the user the price of this offer phase. "regionalConfigs": [ # Required. The region-specific configuration of this offer phase. This list must contain exactly one entry for each region for which the subscription offer has a regional config. { # Configuration for a single phase of a subscription offer in a single region. "absoluteDiscount": { # Represents an amount of money with its currency type. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "free": { # Represents the free price override configuration for a single phase of a subscription offer # Set to specify this offer is free to obtain. }, "price": { # Represents an amount of money with its currency type. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "regionCode": "A String", # Required. Immutable. The region to which this config applies. "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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. }, ], }, ], "productId": "A String", # Required. Immutable. The ID of the parent subscription this offer belongs to. "regionalConfigs": [ # Required. The region-specific configuration of this offer. Must contain at least one entry. { # Configuration for a subscription offer in a single region. "newSubscriberAvailability": True or False, # Whether the subscription offer in the specified region is available for new subscribers. Existing subscribers will not have their subscription cancelled if this value is set to false. If not specified, this will default to false. "regionCode": "A String", # Required. Immutable. Region code this configuration applies to, as defined by ISO 3166-2, e.g. "US". }, ], "state": "A String", # Output only. The current state of this offer. Can be changed using Activate and Deactivate actions. NB: the base plan state supersedes this state, so an active offer may not be available if the base plan is not active. "targeting": { # Defines the rule a user needs to satisfy to receive this offer. # The requirements that users need to fulfil to be eligible for this offer. Represents the requirements that Play will evaluate to decide whether an offer should be returned. Developers may further filter these offers themselves. "acquisitionRule": { # Represents a targeting rule of the form: User never had {scope} before. # Offer targeting rule for new user acquisition. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "any subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, "upgradeRule": { # Represents a targeting rule of the form: User currently has {scope} [with billing period {billing_period}]. # Offer targeting rule for upgrading users' existing plans. "billingPeriodDuration": "A String", # The specific billing period duration, specified in ISO 8601 format, that a user must be currently subscribed to to be eligible for this rule. If not specified, users subscribed to any billing period are matched. "oncePerUser": True or False, # Limit this offer to only once per user. If set to true, a user can never be eligible for this offer again if they ever subscribed to this offer. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "specific subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, }, }
list(packageName, productId, basePlanId, pageSize=None, pageToken=None, x__xgafv=None)
Lists all offers under a given subscription. Args: packageName: string, Required. The parent app (package name) for which the subscriptions should be read. (required) productId: string, Required. The parent subscription (ID) for which the offers should be read. May be specified as '-' to read all offers under an app. (required) basePlanId: string, Required. The parent base plan (ID) for which the offers should be read. May be specified as '-' to read all offers under a subscription or an app. Must be specified as '-' if product_id is specified as '-'. (required) pageSize: integer, The maximum number of subscriptions to return. The service may return fewer than this value. If unspecified, at most 50 subscriptions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. pageToken: string, A page token, received from a previous `ListSubscriptionsOffers` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubscriptionOffers` must match the call that provided the page token. x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Response message for ListSubscriptionOffers. "nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. "subscriptionOffers": [ # The subscription offers from the specified subscription. { # A single, temporary offer "basePlanId": "A String", # Required. Immutable. The ID of the base plan to which this offer is an extension. "offerId": "A String", # Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. "offerTags": [ # List of up to 20 custom tags specified for this offer, and returned to the app through the billing library. { # Represents a custom tag specified for base plans and subscription offers. "tag": "A String", # Must conform with RFC-1034. That is, this string can only contain lower-case letters (a-z), numbers (0-9), and hyphens (-), and be at most 20 characters. }, ], "otherRegionsConfig": { # Configuration for any new locations Play may launch in specified on a subscription offer. # The configuration for any new locations Play may launch in the future. "otherRegionsNewSubscriberAvailability": True or False, # Whether the subscription offer in any new locations Play may launch in the future. If not specified, this will default to false. }, "packageName": "A String", # Required. Immutable. The package name of the app the parent subscription belongs to. "phases": [ # Required. The phases of this subscription offer. Must contain at least one and at most two entries. Users will always receive all these phases in the specified order. { # A single phase of a subscription offer. "duration": "A String", # Required. The duration of a single recurrence of this phase. Specified in ISO 8601 format. "otherRegionsConfig": { # Configuration for any new locations Play may launch in for a single offer phase. # Pricing information for any new locations Play may launch in. "absoluteDiscounts": { # Pricing information for any new locations Play may launch in. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "free": { # Represents the free price override configuration for any new locations Play may launch for a single offer phase. # Set to specify this offer is free to obtain. }, "otherRegionsPrices": { # Pricing information for any new locations Play may launch in. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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 any new locations Play may launch in. }, "recurrenceCount": 42, # Required. The number of times this phase repeats. If this offer phase is not free, each recurrence charges the user the price of this offer phase. "regionalConfigs": [ # Required. The region-specific configuration of this offer phase. This list must contain exactly one entry for each region for which the subscription offer has a regional config. { # Configuration for a single phase of a subscription offer in a single region. "absoluteDiscount": { # Represents an amount of money with its currency type. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "free": { # Represents the free price override configuration for a single phase of a subscription offer # Set to specify this offer is free to obtain. }, "price": { # Represents an amount of money with its currency type. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "regionCode": "A String", # Required. Immutable. The region to which this config applies. "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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. }, ], }, ], "productId": "A String", # Required. Immutable. The ID of the parent subscription this offer belongs to. "regionalConfigs": [ # Required. The region-specific configuration of this offer. Must contain at least one entry. { # Configuration for a subscription offer in a single region. "newSubscriberAvailability": True or False, # Whether the subscription offer in the specified region is available for new subscribers. Existing subscribers will not have their subscription cancelled if this value is set to false. If not specified, this will default to false. "regionCode": "A String", # Required. Immutable. Region code this configuration applies to, as defined by ISO 3166-2, e.g. "US". }, ], "state": "A String", # Output only. The current state of this offer. Can be changed using Activate and Deactivate actions. NB: the base plan state supersedes this state, so an active offer may not be available if the base plan is not active. "targeting": { # Defines the rule a user needs to satisfy to receive this offer. # The requirements that users need to fulfil to be eligible for this offer. Represents the requirements that Play will evaluate to decide whether an offer should be returned. Developers may further filter these offers themselves. "acquisitionRule": { # Represents a targeting rule of the form: User never had {scope} before. # Offer targeting rule for new user acquisition. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "any subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, "upgradeRule": { # Represents a targeting rule of the form: User currently has {scope} [with billing period {billing_period}]. # Offer targeting rule for upgrading users' existing plans. "billingPeriodDuration": "A String", # The specific billing period duration, specified in ISO 8601 format, that a user must be currently subscribed to to be eligible for this rule. If not specified, users subscribed to any billing period are matched. "oncePerUser": True or False, # Limit this offer to only once per user. If set to true, a user can never be eligible for this offer again if they ever subscribed to this offer. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "specific subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, }, }, ], }
list_next()
Retrieves the next page of results. Args: previous_request: The request for the previous page. (required) previous_response: The response from the request for the previous page. (required) Returns: A request object that you can call 'execute()' on to request the next page. Returns None if there are no more items in the collection.
patch(packageName, productId, basePlanId, offerId, allowMissing=None, body=None, latencyTolerance=None, regionsVersion_version=None, updateMask=None, x__xgafv=None)
Updates an existing subscription offer. Args: packageName: string, Required. Immutable. The package name of the app the parent subscription belongs to. (required) productId: string, Required. Immutable. The ID of the parent subscription this offer belongs to. (required) basePlanId: string, Required. Immutable. The ID of the base plan to which this offer is an extension. (required) offerId: string, Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. (required) body: object, The request body. The object takes the form of: { # A single, temporary offer "basePlanId": "A String", # Required. Immutable. The ID of the base plan to which this offer is an extension. "offerId": "A String", # Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. "offerTags": [ # List of up to 20 custom tags specified for this offer, and returned to the app through the billing library. { # Represents a custom tag specified for base plans and subscription offers. "tag": "A String", # Must conform with RFC-1034. That is, this string can only contain lower-case letters (a-z), numbers (0-9), and hyphens (-), and be at most 20 characters. }, ], "otherRegionsConfig": { # Configuration for any new locations Play may launch in specified on a subscription offer. # The configuration for any new locations Play may launch in the future. "otherRegionsNewSubscriberAvailability": True or False, # Whether the subscription offer in any new locations Play may launch in the future. If not specified, this will default to false. }, "packageName": "A String", # Required. Immutable. The package name of the app the parent subscription belongs to. "phases": [ # Required. The phases of this subscription offer. Must contain at least one and at most two entries. Users will always receive all these phases in the specified order. { # A single phase of a subscription offer. "duration": "A String", # Required. The duration of a single recurrence of this phase. Specified in ISO 8601 format. "otherRegionsConfig": { # Configuration for any new locations Play may launch in for a single offer phase. # Pricing information for any new locations Play may launch in. "absoluteDiscounts": { # Pricing information for any new locations Play may launch in. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "free": { # Represents the free price override configuration for any new locations Play may launch for a single offer phase. # Set to specify this offer is free to obtain. }, "otherRegionsPrices": { # Pricing information for any new locations Play may launch in. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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 any new locations Play may launch in. }, "recurrenceCount": 42, # Required. The number of times this phase repeats. If this offer phase is not free, each recurrence charges the user the price of this offer phase. "regionalConfigs": [ # Required. The region-specific configuration of this offer phase. This list must contain exactly one entry for each region for which the subscription offer has a regional config. { # Configuration for a single phase of a subscription offer in a single region. "absoluteDiscount": { # Represents an amount of money with its currency type. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "free": { # Represents the free price override configuration for a single phase of a subscription offer # Set to specify this offer is free to obtain. }, "price": { # Represents an amount of money with its currency type. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "regionCode": "A String", # Required. Immutable. The region to which this config applies. "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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. }, ], }, ], "productId": "A String", # Required. Immutable. The ID of the parent subscription this offer belongs to. "regionalConfigs": [ # Required. The region-specific configuration of this offer. Must contain at least one entry. { # Configuration for a subscription offer in a single region. "newSubscriberAvailability": True or False, # Whether the subscription offer in the specified region is available for new subscribers. Existing subscribers will not have their subscription cancelled if this value is set to false. If not specified, this will default to false. "regionCode": "A String", # Required. Immutable. Region code this configuration applies to, as defined by ISO 3166-2, e.g. "US". }, ], "state": "A String", # Output only. The current state of this offer. Can be changed using Activate and Deactivate actions. NB: the base plan state supersedes this state, so an active offer may not be available if the base plan is not active. "targeting": { # Defines the rule a user needs to satisfy to receive this offer. # The requirements that users need to fulfil to be eligible for this offer. Represents the requirements that Play will evaluate to decide whether an offer should be returned. Developers may further filter these offers themselves. "acquisitionRule": { # Represents a targeting rule of the form: User never had {scope} before. # Offer targeting rule for new user acquisition. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "any subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, "upgradeRule": { # Represents a targeting rule of the form: User currently has {scope} [with billing period {billing_period}]. # Offer targeting rule for upgrading users' existing plans. "billingPeriodDuration": "A String", # The specific billing period duration, specified in ISO 8601 format, that a user must be currently subscribed to to be eligible for this rule. If not specified, users subscribed to any billing period are matched. "oncePerUser": True or False, # Limit this offer to only once per user. If set to true, a user can never be eligible for this offer again if they ever subscribed to this offer. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "specific subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, }, } allowMissing: boolean, Optional. If set to true, and the subscription offer with the given package_name, product_id, base_plan_id and offer_id doesn't exist, an offer will be created. If a new offer is created, update_mask is ignored. latencyTolerance: string, Optional. The latency tolerance for the propagation of this product update. Defaults to latency-sensitive. Allowed values PRODUCT_UPDATE_LATENCY_TOLERANCE_UNSPECIFIED - Defaults to PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_SENSITIVE. PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_SENSITIVE - The update will propagate to clients within several minutes on average and up to a few hours in rare cases. Throughput is limited to 7,200 updates per app per hour. PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT - The update will propagate to clients within 24 hours. Supports high throughput of up to 720,000 updates per app per hour using batch modification methods. regionsVersion_version: string, Required. A string representing the version of available regions being used for the specified resource. Regional prices for the resource have to be specified according to the information published in [this article](https://support.google.com/googleplay/android-developer/answer/10532353). Each time the supported locations substantially change, the version will be incremented. Using this field will ensure that creating and updating the resource with an older region's version and set of regional prices and currencies will succeed even though a new version is available. The latest version is 2022/02. updateMask: string, Required. The list of fields to be updated. x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A single, temporary offer "basePlanId": "A String", # Required. Immutable. The ID of the base plan to which this offer is an extension. "offerId": "A String", # Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. "offerTags": [ # List of up to 20 custom tags specified for this offer, and returned to the app through the billing library. { # Represents a custom tag specified for base plans and subscription offers. "tag": "A String", # Must conform with RFC-1034. That is, this string can only contain lower-case letters (a-z), numbers (0-9), and hyphens (-), and be at most 20 characters. }, ], "otherRegionsConfig": { # Configuration for any new locations Play may launch in specified on a subscription offer. # The configuration for any new locations Play may launch in the future. "otherRegionsNewSubscriberAvailability": True or False, # Whether the subscription offer in any new locations Play may launch in the future. If not specified, this will default to false. }, "packageName": "A String", # Required. Immutable. The package name of the app the parent subscription belongs to. "phases": [ # Required. The phases of this subscription offer. Must contain at least one and at most two entries. Users will always receive all these phases in the specified order. { # A single phase of a subscription offer. "duration": "A String", # Required. The duration of a single recurrence of this phase. Specified in ISO 8601 format. "otherRegionsConfig": { # Configuration for any new locations Play may launch in for a single offer phase. # Pricing information for any new locations Play may launch in. "absoluteDiscounts": { # Pricing information for any new locations Play may launch in. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "free": { # Represents the free price override configuration for any new locations Play may launch for a single offer phase. # Set to specify this offer is free to obtain. }, "otherRegionsPrices": { # Pricing information for any new locations Play may launch in. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for any new locations Play may launch in. "eurPrice": { # Represents an amount of money with its currency type. # Required. Price in EUR to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "usdPrice": { # Represents an amount of money with its currency type. # Required. Price in USD to use for any new locations Play may launch in. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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 any new locations Play may launch in. }, "recurrenceCount": 42, # Required. The number of times this phase repeats. If this offer phase is not free, each recurrence charges the user the price of this offer phase. "regionalConfigs": [ # Required. The region-specific configuration of this offer phase. This list must contain exactly one entry for each region for which the subscription offer has a regional config. { # Configuration for a single phase of a subscription offer in a single region. "absoluteDiscount": { # Represents an amount of money with its currency type. # The absolute amount of money subtracted from the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a $1 absolute discount for a phase of a duration of 3 months would correspond to a price of $2. The resulting price may not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "free": { # Represents the free price override configuration for a single phase of a subscription offer # Set to specify this offer is free to obtain. }, "price": { # Represents an amount of money with its currency type. # The absolute price the user pays for this offer phase. The price must not be smaller than the minimum price allowed for this region. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "regionCode": "A String", # Required. Immutable. The region to which this config applies. "relativeDiscount": 3.14, # The fraction of the base plan price prorated over the phase duration that the user pays for this offer phase. For example, if the base plan price for this region is $12 for a period of 1 year, then a 50% discount for a phase of a duration of 3 months would correspond to a price of $1.50. 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. }, ], }, ], "productId": "A String", # Required. Immutable. The ID of the parent subscription this offer belongs to. "regionalConfigs": [ # Required. The region-specific configuration of this offer. Must contain at least one entry. { # Configuration for a subscription offer in a single region. "newSubscriberAvailability": True or False, # Whether the subscription offer in the specified region is available for new subscribers. Existing subscribers will not have their subscription cancelled if this value is set to false. If not specified, this will default to false. "regionCode": "A String", # Required. Immutable. Region code this configuration applies to, as defined by ISO 3166-2, e.g. "US". }, ], "state": "A String", # Output only. The current state of this offer. Can be changed using Activate and Deactivate actions. NB: the base plan state supersedes this state, so an active offer may not be available if the base plan is not active. "targeting": { # Defines the rule a user needs to satisfy to receive this offer. # The requirements that users need to fulfil to be eligible for this offer. Represents the requirements that Play will evaluate to decide whether an offer should be returned. Developers may further filter these offers themselves. "acquisitionRule": { # Represents a targeting rule of the form: User never had {scope} before. # Offer targeting rule for new user acquisition. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "any subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, "upgradeRule": { # Represents a targeting rule of the form: User currently has {scope} [with billing period {billing_period}]. # Offer targeting rule for upgrading users' existing plans. "billingPeriodDuration": "A String", # The specific billing period duration, specified in ISO 8601 format, that a user must be currently subscribed to to be eligible for this rule. If not specified, users subscribed to any billing period are matched. "oncePerUser": True or False, # Limit this offer to only once per user. If set to true, a user can never be eligible for this offer again if they ever subscribed to this offer. "scope": { # Defines the scope of subscriptions which a targeting rule can match to target offers to users based on past or current entitlement. # Required. The scope of subscriptions this rule considers. Only allows "this subscription" and "specific subscription in app". "anySubscriptionInApp": { # Represents the targeting rule scope corresponding to any subscription in the parent app. # The scope of the current targeting rule is any subscription in the parent app. }, "specificSubscriptionInApp": "A String", # The scope of the current targeting rule is the subscription with the specified subscription ID. Must be a subscription within the same parent app. "thisSubscription": { # Represents the targeting rule scope corresponding to the subscriptions in which this offer is defined. # The scope of the current targeting rule is the subscription in which this offer is defined. }, }, }, }, }