activate(packageName, productId, basePlanId, offerId, body=None, x__xgafv=None)
Activates a subscription offer. Once activated, subscription offers will be available to new subscribers.
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. } 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 entry, and may contain at most five. Users will always receive all these phases in the specified order. Phases may not be added, removed, or reordered after initial creation. { # 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. }, }, "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. }, "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". "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. }, }, "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". "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. }, }, }, }
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 entry, and may contain at most five. Users will always receive all these phases in the specified order. Phases may not be added, removed, or reordered after initial creation. { # 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. }, }, "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. }, "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". "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. }, }, "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". "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. }, }, }, } 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. 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 entry, and may contain at most five. Users will always receive all these phases in the specified order. Phases may not be added, removed, or reordered after initial creation. { # 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. }, }, "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. }, "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". "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. }, }, "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". "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. }, }, }, }
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. } 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 entry, and may contain at most five. Users will always receive all these phases in the specified order. Phases may not be added, removed, or reordered after initial creation. { # 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. }, }, "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. }, "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". "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. }, }, "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". "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. }, }, }, }
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 entry, and may contain at most five. Users will always receive all these phases in the specified order. Phases may not be added, removed, or reordered after initial creation. { # 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. }, }, "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. }, "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". "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. }, }, "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". "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. }, }, }, }
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 entry, and may contain at most five. Users will always receive all these phases in the specified order. Phases may not be added, removed, or reordered after initial creation. { # 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. }, }, "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. }, "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". "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. }, }, "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". "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. }, }, }, }, ], }
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, body=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 entry, and may contain at most five. Users will always receive all these phases in the specified order. Phases may not be added, removed, or reordered after initial creation. { # 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. }, }, "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. }, "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". "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. }, }, "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". "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. }, }, }, } regionsVersion_version: string, Required. 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 entry, and may contain at most five. Users will always receive all these phases in the specified order. Phases may not be added, removed, or reordered after initial creation. { # 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. }, }, "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. }, "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". "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. }, }, "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". "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. }, }, }, }