google-apis-androidpublisher_v3 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,6 +22,52 @@ module Google
22
22
  module Apis
23
23
  module AndroidpublisherV3
24
24
 
25
+ # Represents a targeting rule of the form: User never had `scope` before.
26
+ class AcquisitionTargetingRule
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Defines the scope of subscriptions which a targeting rule can match to target
30
+ # offers to users based on past or current entitlement.
31
+ # Corresponds to the JSON property `scope`
32
+ # @return [Google::Apis::AndroidpublisherV3::TargetingRuleScope]
33
+ attr_accessor :scope
34
+
35
+ def initialize(**args)
36
+ update!(**args)
37
+ end
38
+
39
+ # Update properties of this object
40
+ def update!(**args)
41
+ @scope = args[:scope] if args.key?(:scope)
42
+ end
43
+ end
44
+
45
+ # Request message for ActivateBasePlan.
46
+ class ActivateBasePlanRequest
47
+ include Google::Apis::Core::Hashable
48
+
49
+ def initialize(**args)
50
+ update!(**args)
51
+ end
52
+
53
+ # Update properties of this object
54
+ def update!(**args)
55
+ end
56
+ end
57
+
58
+ # Request message for ActivateSubscriptionOffer.
59
+ class ActivateSubscriptionOfferRequest
60
+ include Google::Apis::Core::Hashable
61
+
62
+ def initialize(**args)
63
+ update!(**args)
64
+ end
65
+
66
+ # Update properties of this object
67
+ def update!(**args)
68
+ end
69
+ end
70
+
25
71
  # Information about an APK. The resource for ApksService.
26
72
  class Apk
27
73
  include Google::Apis::Core::Hashable
@@ -206,6 +252,159 @@ module Google
206
252
  end
207
253
  end
208
254
 
255
+ # Request message for ArchiveSubscription.
256
+ class ArchiveSubscriptionRequest
257
+ include Google::Apis::Core::Hashable
258
+
259
+ def initialize(**args)
260
+ update!(**args)
261
+ end
262
+
263
+ # Update properties of this object
264
+ def update!(**args)
265
+ end
266
+ end
267
+
268
+ # Represents a base plan that automatically renews at the end of its
269
+ # subscription period.
270
+ class AutoRenewingBasePlanType
271
+ include Google::Apis::Core::Hashable
272
+
273
+ # Required. Subscription period, specified in ISO 8601 format. For a list of
274
+ # acceptable billing periods, refer to the help center.
275
+ # Corresponds to the JSON property `billingPeriodDuration`
276
+ # @return [String]
277
+ attr_accessor :billing_period_duration
278
+
279
+ # Grace period of the subscription, specified in ISO 8601 format. Acceptable
280
+ # values are P0D (zero days), P3D (3 days), P7D (7 days), P14D (14 days), and
281
+ # P30D (30 days). If not specified, a default value will be used based on the
282
+ # recurring period duration.
283
+ # Corresponds to the JSON property `gracePeriodDuration`
284
+ # @return [String]
285
+ attr_accessor :grace_period_duration
286
+
287
+ # Whether the renewing base plan is compatible with legacy version of the Play
288
+ # Billing Library (prior to version 3) or not. Only one renewing base plan can
289
+ # be marked as legacy compatible for a given subscription.
290
+ # Corresponds to the JSON property `legacyCompatible`
291
+ # @return [Boolean]
292
+ attr_accessor :legacy_compatible
293
+ alias_method :legacy_compatible?, :legacy_compatible
294
+
295
+ # The proration mode for the base plan determines what happens when a user
296
+ # switches to this plan from another base plan. If unspecified, defaults to
297
+ # CHARGE_ON_NEXT_BILLING_DATE.
298
+ # Corresponds to the JSON property `prorationMode`
299
+ # @return [String]
300
+ attr_accessor :proration_mode
301
+
302
+ # Whether users should be able to resubscribe to this base plan in Google Play
303
+ # surfaces. Defaults to RESUBSCRIBE_STATE_ACTIVE if not specified.
304
+ # Corresponds to the JSON property `resubscribeState`
305
+ # @return [String]
306
+ attr_accessor :resubscribe_state
307
+
308
+ def initialize(**args)
309
+ update!(**args)
310
+ end
311
+
312
+ # Update properties of this object
313
+ def update!(**args)
314
+ @billing_period_duration = args[:billing_period_duration] if args.key?(:billing_period_duration)
315
+ @grace_period_duration = args[:grace_period_duration] if args.key?(:grace_period_duration)
316
+ @legacy_compatible = args[:legacy_compatible] if args.key?(:legacy_compatible)
317
+ @proration_mode = args[:proration_mode] if args.key?(:proration_mode)
318
+ @resubscribe_state = args[:resubscribe_state] if args.key?(:resubscribe_state)
319
+ end
320
+ end
321
+
322
+ # Information related to an auto renewing plan.
323
+ class AutoRenewingPlan
324
+ include Google::Apis::Core::Hashable
325
+
326
+ # If the subscription is currently set to auto-renew, e.g. the user has not
327
+ # canceled the subscription
328
+ # Corresponds to the JSON property `autoRenewEnabled`
329
+ # @return [Boolean]
330
+ attr_accessor :auto_renew_enabled
331
+ alias_method :auto_renew_enabled?, :auto_renew_enabled
332
+
333
+ def initialize(**args)
334
+ update!(**args)
335
+ end
336
+
337
+ # Update properties of this object
338
+ def update!(**args)
339
+ @auto_renew_enabled = args[:auto_renew_enabled] if args.key?(:auto_renew_enabled)
340
+ end
341
+ end
342
+
343
+ # A single base plan for a subscription.
344
+ class BasePlan
345
+ include Google::Apis::Core::Hashable
346
+
347
+ # Represents a base plan that automatically renews at the end of its
348
+ # subscription period.
349
+ # Corresponds to the JSON property `autoRenewingBasePlanType`
350
+ # @return [Google::Apis::AndroidpublisherV3::AutoRenewingBasePlanType]
351
+ attr_accessor :auto_renewing_base_plan_type
352
+
353
+ # Required. Immutable. The unique identifier of this base plan. Must be unique
354
+ # within the subscription, and conform with RFC-1034. That is, this ID can only
355
+ # contain lower-case letters (a-z), numbers (0-9), and hyphens (-), and be at
356
+ # most 63 characters.
357
+ # Corresponds to the JSON property `basePlanId`
358
+ # @return [String]
359
+ attr_accessor :base_plan_id
360
+
361
+ # List of up to 20 custom tags specified for this base plan, and returned to the
362
+ # app through the billing library. Subscription offers for this base plan will
363
+ # also receive these offer tags in the billing library.
364
+ # Corresponds to the JSON property `offerTags`
365
+ # @return [Array<Google::Apis::AndroidpublisherV3::OfferTag>]
366
+ attr_accessor :offer_tags
367
+
368
+ # Pricing information for any new locations Play may launch in.
369
+ # Corresponds to the JSON property `otherRegionsConfig`
370
+ # @return [Google::Apis::AndroidpublisherV3::OtherRegionsBasePlanConfig]
371
+ attr_accessor :other_regions_config
372
+
373
+ # Represents a base plan that does not automatically renew at the end of the
374
+ # base plan, and must be manually renewed by the user.
375
+ # Corresponds to the JSON property `prepaidBasePlanType`
376
+ # @return [Google::Apis::AndroidpublisherV3::PrepaidBasePlanType]
377
+ attr_accessor :prepaid_base_plan_type
378
+
379
+ # Region-specific information for this base plan.
380
+ # Corresponds to the JSON property `regionalConfigs`
381
+ # @return [Array<Google::Apis::AndroidpublisherV3::RegionalBasePlanConfig>]
382
+ attr_accessor :regional_configs
383
+
384
+ # Output only. The state of the base plan, i.e. whether it's active. Draft and
385
+ # inactive base plans can be activated or deleted. Active base plans can be made
386
+ # inactive. Inactive base plans can be canceled. This field cannot be changed by
387
+ # updating the resource. Use the dedicated endpoints instead.
388
+ # Corresponds to the JSON property `state`
389
+ # @return [String]
390
+ attr_accessor :state
391
+
392
+ def initialize(**args)
393
+ update!(**args)
394
+ end
395
+
396
+ # Update properties of this object
397
+ def update!(**args)
398
+ @auto_renewing_base_plan_type = args[:auto_renewing_base_plan_type] if args.key?(:auto_renewing_base_plan_type)
399
+ @base_plan_id = args[:base_plan_id] if args.key?(:base_plan_id)
400
+ @offer_tags = args[:offer_tags] if args.key?(:offer_tags)
401
+ @other_regions_config = args[:other_regions_config] if args.key?(:other_regions_config)
402
+ @prepaid_base_plan_type = args[:prepaid_base_plan_type] if args.key?(:prepaid_base_plan_type)
403
+ @regional_configs = args[:regional_configs] if args.key?(:regional_configs)
404
+ @state = args[:state] if args.key?(:state)
405
+ end
406
+ end
407
+
209
408
  # Information about an app bundle. The resource for BundlesService.
210
409
  class Bundle
211
410
  include Google::Apis::Core::Hashable
@@ -265,6 +464,69 @@ module Google
265
464
  end
266
465
  end
267
466
 
467
+ # Result of the cancel survey when the subscription was canceled by the user.
468
+ class CancelSurveyResult
469
+ include Google::Apis::Core::Hashable
470
+
471
+ # The reason the user selected in the cancel survey.
472
+ # Corresponds to the JSON property `reason`
473
+ # @return [String]
474
+ attr_accessor :reason
475
+
476
+ # Only set for CANCEL_SURVEY_REASON_OTHERS. This is the user's freeform response
477
+ # to the survey.
478
+ # Corresponds to the JSON property `reasonUserInput`
479
+ # @return [String]
480
+ attr_accessor :reason_user_input
481
+
482
+ def initialize(**args)
483
+ update!(**args)
484
+ end
485
+
486
+ # Update properties of this object
487
+ def update!(**args)
488
+ @reason = args[:reason] if args.key?(:reason)
489
+ @reason_user_input = args[:reason_user_input] if args.key?(:reason_user_input)
490
+ end
491
+ end
492
+
493
+ # Information specific to a subscription in canceled state.
494
+ class CanceledStateContext
495
+ include Google::Apis::Core::Hashable
496
+
497
+ # Information specific to cancellations initiated by developers.
498
+ # Corresponds to the JSON property `developerInitiatedCancellation`
499
+ # @return [Google::Apis::AndroidpublisherV3::DeveloperInitiatedCancellation]
500
+ attr_accessor :developer_initiated_cancellation
501
+
502
+ # Information specific to cancellations caused by subscription replacement.
503
+ # Corresponds to the JSON property `replacementCancellation`
504
+ # @return [Google::Apis::AndroidpublisherV3::ReplacementCancellation]
505
+ attr_accessor :replacement_cancellation
506
+
507
+ # Information specific to cancellations initiated by Google system.
508
+ # Corresponds to the JSON property `systemInitiatedCancellation`
509
+ # @return [Google::Apis::AndroidpublisherV3::SystemInitiatedCancellation]
510
+ attr_accessor :system_initiated_cancellation
511
+
512
+ # Information specific to cancellations initiated by users.
513
+ # Corresponds to the JSON property `userInitiatedCancellation`
514
+ # @return [Google::Apis::AndroidpublisherV3::UserInitiatedCancellation]
515
+ attr_accessor :user_initiated_cancellation
516
+
517
+ def initialize(**args)
518
+ update!(**args)
519
+ end
520
+
521
+ # Update properties of this object
522
+ def update!(**args)
523
+ @developer_initiated_cancellation = args[:developer_initiated_cancellation] if args.key?(:developer_initiated_cancellation)
524
+ @replacement_cancellation = args[:replacement_cancellation] if args.key?(:replacement_cancellation)
525
+ @system_initiated_cancellation = args[:system_initiated_cancellation] if args.key?(:system_initiated_cancellation)
526
+ @user_initiated_cancellation = args[:user_initiated_cancellation] if args.key?(:user_initiated_cancellation)
527
+ end
528
+ end
529
+
268
530
  # An entry of conversation between user and developer.
269
531
  class Comment
270
532
  include Google::Apis::Core::Hashable
@@ -417,6 +679,32 @@ module Google
417
679
  end
418
680
  end
419
681
 
682
+ # Request message for DeactivateBasePlan.
683
+ class DeactivateBasePlanRequest
684
+ include Google::Apis::Core::Hashable
685
+
686
+ def initialize(**args)
687
+ update!(**args)
688
+ end
689
+
690
+ # Update properties of this object
691
+ def update!(**args)
692
+ end
693
+ end
694
+
695
+ # Request message for DeactivateSubscriptionOffer.
696
+ class DeactivateSubscriptionOfferRequest
697
+ include Google::Apis::Core::Hashable
698
+
699
+ def initialize(**args)
700
+ update!(**args)
701
+ end
702
+
703
+ # Update properties of this object
704
+ def update!(**args)
705
+ end
706
+ end
707
+
420
708
  # Represents a deobfuscation file.
421
709
  class DeobfuscationFile
422
710
  include Google::Apis::Core::Hashable
@@ -483,6 +771,19 @@ module Google
483
771
  end
484
772
  end
485
773
 
774
+ # Information specific to cancellations initiated by developers.
775
+ class DeveloperInitiatedCancellation
776
+ include Google::Apis::Core::Hashable
777
+
778
+ def initialize(**args)
779
+ update!(**args)
780
+ end
781
+
782
+ # Update properties of this object
783
+ def update!(**args)
784
+ end
785
+ end
786
+
486
787
  # LINT.IfChange A group of devices. A group is defined by a set of device
487
788
  # selectors. A device belongs to the group if it matches any selector (logical
488
789
  # OR).
@@ -864,6 +1165,45 @@ module Google
864
1165
  end
865
1166
  end
866
1167
 
1168
+ # User account identifier in the third-party service.
1169
+ class ExternalAccountIdentifiers
1170
+ include Google::Apis::Core::Hashable
1171
+
1172
+ # User account identifier in the third-party service. Only present if account
1173
+ # linking happened as part of the subscription purchase flow.
1174
+ # Corresponds to the JSON property `externalAccountId`
1175
+ # @return [String]
1176
+ attr_accessor :external_account_id
1177
+
1178
+ # An obfuscated version of the id that is uniquely associated with the user's
1179
+ # account in your app. Present for the following purchases: * If account linking
1180
+ # happened as part of the subscription purchase flow. * It was specified using
1181
+ # https://developer.android.com/reference/com/android/billingclient/api/
1182
+ # BillingFlowParams.Builder#setobfuscatedaccountid when the purchase was made.
1183
+ # Corresponds to the JSON property `obfuscatedExternalAccountId`
1184
+ # @return [String]
1185
+ attr_accessor :obfuscated_external_account_id
1186
+
1187
+ # An obfuscated version of the id that is uniquely associated with the user's
1188
+ # profile in your app. Only present if specified using https://developer.android.
1189
+ # com/reference/com/android/billingclient/api/BillingFlowParams.Builder#
1190
+ # setobfuscatedprofileid when the purchase was made.
1191
+ # Corresponds to the JSON property `obfuscatedExternalProfileId`
1192
+ # @return [String]
1193
+ attr_accessor :obfuscated_external_profile_id
1194
+
1195
+ def initialize(**args)
1196
+ update!(**args)
1197
+ end
1198
+
1199
+ # Update properties of this object
1200
+ def update!(**args)
1201
+ @external_account_id = args[:external_account_id] if args.key?(:external_account_id)
1202
+ @obfuscated_external_account_id = args[:obfuscated_external_account_id] if args.key?(:obfuscated_external_account_id)
1203
+ @obfuscated_external_profile_id = args[:obfuscated_external_profile_id] if args.key?(:obfuscated_external_profile_id)
1204
+ end
1205
+ end
1206
+
867
1207
  # Defines an APK available for this application that is hosted externally and
868
1208
  # not uploaded to Google Play. This function is only available to organizations
869
1209
  # using Managed Play whose application is configured to restrict distribution to
@@ -1567,6 +1907,58 @@ module Google
1567
1907
  end
1568
1908
  end
1569
1909
 
1910
+ # Response message for ListSubscriptionOffers.
1911
+ class ListSubscriptionOffersResponse
1912
+ include Google::Apis::Core::Hashable
1913
+
1914
+ # A token, which can be sent as `page_token` to retrieve the next page. If this
1915
+ # field is omitted, there are no subsequent pages.
1916
+ # Corresponds to the JSON property `nextPageToken`
1917
+ # @return [String]
1918
+ attr_accessor :next_page_token
1919
+
1920
+ # The subscription offers from the specified subscription.
1921
+ # Corresponds to the JSON property `subscriptionOffers`
1922
+ # @return [Array<Google::Apis::AndroidpublisherV3::SubscriptionOffer>]
1923
+ attr_accessor :subscription_offers
1924
+
1925
+ def initialize(**args)
1926
+ update!(**args)
1927
+ end
1928
+
1929
+ # Update properties of this object
1930
+ def update!(**args)
1931
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1932
+ @subscription_offers = args[:subscription_offers] if args.key?(:subscription_offers)
1933
+ end
1934
+ end
1935
+
1936
+ # Response message for ListSubscriptions.
1937
+ class ListSubscriptionsResponse
1938
+ include Google::Apis::Core::Hashable
1939
+
1940
+ # A token, which can be sent as `page_token` to retrieve the next page. If this
1941
+ # field is omitted, there are no subsequent pages.
1942
+ # Corresponds to the JSON property `nextPageToken`
1943
+ # @return [String]
1944
+ attr_accessor :next_page_token
1945
+
1946
+ # The subscriptions from the specified app.
1947
+ # Corresponds to the JSON property `subscriptions`
1948
+ # @return [Array<Google::Apis::AndroidpublisherV3::Subscription>]
1949
+ attr_accessor :subscriptions
1950
+
1951
+ def initialize(**args)
1952
+ update!(**args)
1953
+ end
1954
+
1955
+ # Update properties of this object
1956
+ def update!(**args)
1957
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1958
+ @subscriptions = args[:subscriptions] if args.key?(:subscriptions)
1959
+ end
1960
+ end
1961
+
1570
1962
  # A response containing one or more users with access to an account.
1571
1963
  class ListUsersResponse
1572
1964
  include Google::Apis::Core::Hashable
@@ -1718,29 +2110,19 @@ module Google
1718
2110
  end
1719
2111
  end
1720
2112
 
1721
- # Represents an amount of money with its currency type.
1722
- class Money
2113
+ # Request message for MigrateBasePlanPrices.
2114
+ class MigrateBasePlanPricesRequest
1723
2115
  include Google::Apis::Core::Hashable
1724
2116
 
1725
- # The three-letter currency code defined in ISO 4217.
1726
- # Corresponds to the JSON property `currencyCode`
1727
- # @return [String]
1728
- attr_accessor :currency_code
1729
-
1730
- # Number of nano (10^-9) units of the amount. The value must be between -999,999,
1731
- # 999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be
1732
- # positive or zero. If `units` is zero, `nanos` can be positive, zero, or
1733
- # negative. If `units` is negative, `nanos` must be negative or zero. For
1734
- # example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
1735
- # Corresponds to the JSON property `nanos`
1736
- # @return [Fixnum]
1737
- attr_accessor :nanos
2117
+ # Required. The regional prices to update.
2118
+ # Corresponds to the JSON property `regionalPriceMigrations`
2119
+ # @return [Array<Google::Apis::AndroidpublisherV3::RegionalPriceMigrationConfig>]
2120
+ attr_accessor :regional_price_migrations
1738
2121
 
1739
- # The whole units of the amount. For example if `currencyCode` is `"USD"`, then
1740
- # 1 unit is one US dollar.
1741
- # Corresponds to the JSON property `units`
1742
- # @return [Fixnum]
1743
- attr_accessor :units
2122
+ # The version of the available regions being used for the specified resource.
2123
+ # Corresponds to the JSON property `regionsVersion`
2124
+ # @return [Google::Apis::AndroidpublisherV3::RegionsVersion]
2125
+ attr_accessor :regions_version
1744
2126
 
1745
2127
  def initialize(**args)
1746
2128
  update!(**args)
@@ -1748,9 +2130,197 @@ module Google
1748
2130
 
1749
2131
  # Update properties of this object
1750
2132
  def update!(**args)
1751
- @currency_code = args[:currency_code] if args.key?(:currency_code)
1752
- @nanos = args[:nanos] if args.key?(:nanos)
1753
- @units = args[:units] if args.key?(:units)
2133
+ @regional_price_migrations = args[:regional_price_migrations] if args.key?(:regional_price_migrations)
2134
+ @regions_version = args[:regions_version] if args.key?(:regions_version)
2135
+ end
2136
+ end
2137
+
2138
+ # Response message for MigrateBasePlanPrices.
2139
+ class MigrateBasePlanPricesResponse
2140
+ include Google::Apis::Core::Hashable
2141
+
2142
+ def initialize(**args)
2143
+ update!(**args)
2144
+ end
2145
+
2146
+ # Update properties of this object
2147
+ def update!(**args)
2148
+ end
2149
+ end
2150
+
2151
+ # Represents an amount of money with its currency type.
2152
+ class Money
2153
+ include Google::Apis::Core::Hashable
2154
+
2155
+ # The three-letter currency code defined in ISO 4217.
2156
+ # Corresponds to the JSON property `currencyCode`
2157
+ # @return [String]
2158
+ attr_accessor :currency_code
2159
+
2160
+ # Number of nano (10^-9) units of the amount. The value must be between -999,999,
2161
+ # 999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be
2162
+ # positive or zero. If `units` is zero, `nanos` can be positive, zero, or
2163
+ # negative. If `units` is negative, `nanos` must be negative or zero. For
2164
+ # example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
2165
+ # Corresponds to the JSON property `nanos`
2166
+ # @return [Fixnum]
2167
+ attr_accessor :nanos
2168
+
2169
+ # The whole units of the amount. For example if `currencyCode` is `"USD"`, then
2170
+ # 1 unit is one US dollar.
2171
+ # Corresponds to the JSON property `units`
2172
+ # @return [Fixnum]
2173
+ attr_accessor :units
2174
+
2175
+ def initialize(**args)
2176
+ update!(**args)
2177
+ end
2178
+
2179
+ # Update properties of this object
2180
+ def update!(**args)
2181
+ @currency_code = args[:currency_code] if args.key?(:currency_code)
2182
+ @nanos = args[:nanos] if args.key?(:nanos)
2183
+ @units = args[:units] if args.key?(:units)
2184
+ end
2185
+ end
2186
+
2187
+ # Represents a custom tag specified for base plans and subscription offers.
2188
+ class OfferTag
2189
+ include Google::Apis::Core::Hashable
2190
+
2191
+ # Must conform with RFC-1034. That is, this string can only contain lower-case
2192
+ # letters (a-z), numbers (0-9), and hyphens (-), and be at most 20 characters.
2193
+ # Corresponds to the JSON property `tag`
2194
+ # @return [String]
2195
+ attr_accessor :tag
2196
+
2197
+ def initialize(**args)
2198
+ update!(**args)
2199
+ end
2200
+
2201
+ # Update properties of this object
2202
+ def update!(**args)
2203
+ @tag = args[:tag] if args.key?(:tag)
2204
+ end
2205
+ end
2206
+
2207
+ # Pricing information for any new locations Play may launch in.
2208
+ class OtherRegionsBasePlanConfig
2209
+ include Google::Apis::Core::Hashable
2210
+
2211
+ # Represents an amount of money with its currency type.
2212
+ # Corresponds to the JSON property `eurPrice`
2213
+ # @return [Google::Apis::AndroidpublisherV3::Money]
2214
+ attr_accessor :eur_price
2215
+
2216
+ # Whether the base plan is available for new subscribers in any new locations
2217
+ # Play may launch in. If not specified, this will default to false.
2218
+ # Corresponds to the JSON property `newSubscriberAvailability`
2219
+ # @return [Boolean]
2220
+ attr_accessor :new_subscriber_availability
2221
+ alias_method :new_subscriber_availability?, :new_subscriber_availability
2222
+
2223
+ # Represents an amount of money with its currency type.
2224
+ # Corresponds to the JSON property `usdPrice`
2225
+ # @return [Google::Apis::AndroidpublisherV3::Money]
2226
+ attr_accessor :usd_price
2227
+
2228
+ def initialize(**args)
2229
+ update!(**args)
2230
+ end
2231
+
2232
+ # Update properties of this object
2233
+ def update!(**args)
2234
+ @eur_price = args[:eur_price] if args.key?(:eur_price)
2235
+ @new_subscriber_availability = args[:new_subscriber_availability] if args.key?(:new_subscriber_availability)
2236
+ @usd_price = args[:usd_price] if args.key?(:usd_price)
2237
+ end
2238
+ end
2239
+
2240
+ # Configuration for any new locations Play may launch in specified on a
2241
+ # subscription offer.
2242
+ class OtherRegionsSubscriptionOfferConfig
2243
+ include Google::Apis::Core::Hashable
2244
+
2245
+ # Whether the subscription offer in any new locations Play may launch in the
2246
+ # future. If not specified, this will default to false.
2247
+ # Corresponds to the JSON property `otherRegionsNewSubscriberAvailability`
2248
+ # @return [Boolean]
2249
+ attr_accessor :other_regions_new_subscriber_availability
2250
+ alias_method :other_regions_new_subscriber_availability?, :other_regions_new_subscriber_availability
2251
+
2252
+ def initialize(**args)
2253
+ update!(**args)
2254
+ end
2255
+
2256
+ # Update properties of this object
2257
+ def update!(**args)
2258
+ @other_regions_new_subscriber_availability = args[:other_regions_new_subscriber_availability] if args.key?(:other_regions_new_subscriber_availability)
2259
+ end
2260
+ end
2261
+
2262
+ # Configuration for any new locations Play may launch in for a single offer
2263
+ # phase.
2264
+ class OtherRegionsSubscriptionOfferPhaseConfig
2265
+ include Google::Apis::Core::Hashable
2266
+
2267
+ # Pricing information for any new locations Play may launch in.
2268
+ # Corresponds to the JSON property `absoluteDiscounts`
2269
+ # @return [Google::Apis::AndroidpublisherV3::OtherRegionsSubscriptionOfferPhasePrices]
2270
+ attr_accessor :absolute_discounts
2271
+
2272
+ # Pricing information for any new locations Play may launch in.
2273
+ # Corresponds to the JSON property `otherRegionsPrices`
2274
+ # @return [Google::Apis::AndroidpublisherV3::OtherRegionsSubscriptionOfferPhasePrices]
2275
+ attr_accessor :other_regions_prices
2276
+
2277
+ # The fraction of the base plan price prorated over the phase duration that the
2278
+ # user pays for this offer phase. For example, if the base plan price for this
2279
+ # region is $12 for a period of 1 year, then a 50% discount for a phase of a
2280
+ # duration of 3 months would correspond to a price of $1.50. The discount must
2281
+ # be specified as a fraction strictly larger than 0 and strictly smaller than 1.
2282
+ # The resulting price will be rounded to the nearest billable unit (e.g. cents
2283
+ # for USD). The relative discount is considered invalid if the discounted price
2284
+ # ends up being smaller than the minimum price allowed in any new locations Play
2285
+ # may launch in.
2286
+ # Corresponds to the JSON property `relativeDiscount`
2287
+ # @return [Float]
2288
+ attr_accessor :relative_discount
2289
+
2290
+ def initialize(**args)
2291
+ update!(**args)
2292
+ end
2293
+
2294
+ # Update properties of this object
2295
+ def update!(**args)
2296
+ @absolute_discounts = args[:absolute_discounts] if args.key?(:absolute_discounts)
2297
+ @other_regions_prices = args[:other_regions_prices] if args.key?(:other_regions_prices)
2298
+ @relative_discount = args[:relative_discount] if args.key?(:relative_discount)
2299
+ end
2300
+ end
2301
+
2302
+ # Pricing information for any new locations Play may launch in.
2303
+ class OtherRegionsSubscriptionOfferPhasePrices
2304
+ include Google::Apis::Core::Hashable
2305
+
2306
+ # Represents an amount of money with its currency type.
2307
+ # Corresponds to the JSON property `eurPrice`
2308
+ # @return [Google::Apis::AndroidpublisherV3::Money]
2309
+ attr_accessor :eur_price
2310
+
2311
+ # Represents an amount of money with its currency type.
2312
+ # Corresponds to the JSON property `usdPrice`
2313
+ # @return [Google::Apis::AndroidpublisherV3::Money]
2314
+ attr_accessor :usd_price
2315
+
2316
+ def initialize(**args)
2317
+ update!(**args)
2318
+ end
2319
+
2320
+ # Update properties of this object
2321
+ def update!(**args)
2322
+ @eur_price = args[:eur_price] if args.key?(:eur_price)
2323
+ @usd_price = args[:usd_price] if args.key?(:usd_price)
1754
2324
  end
1755
2325
  end
1756
2326
 
@@ -1789,6 +2359,73 @@ module Google
1789
2359
  end
1790
2360
  end
1791
2361
 
2362
+ # Information specific to a subscription in paused state.
2363
+ class PausedStateContext
2364
+ include Google::Apis::Core::Hashable
2365
+
2366
+ # Time at which the subscription will be automatically resumed.
2367
+ # Corresponds to the JSON property `autoResumeTime`
2368
+ # @return [String]
2369
+ attr_accessor :auto_resume_time
2370
+
2371
+ def initialize(**args)
2372
+ update!(**args)
2373
+ end
2374
+
2375
+ # Update properties of this object
2376
+ def update!(**args)
2377
+ @auto_resume_time = args[:auto_resume_time] if args.key?(:auto_resume_time)
2378
+ end
2379
+ end
2380
+
2381
+ # Represents a base plan that does not automatically renew at the end of the
2382
+ # base plan, and must be manually renewed by the user.
2383
+ class PrepaidBasePlanType
2384
+ include Google::Apis::Core::Hashable
2385
+
2386
+ # Required. Subscription period, specified in ISO 8601 format. For a list of
2387
+ # acceptable billing periods, refer to the help center.
2388
+ # Corresponds to the JSON property `billingPeriodDuration`
2389
+ # @return [String]
2390
+ attr_accessor :billing_period_duration
2391
+
2392
+ # Whether users should be able to extend this prepaid base plan in Google Play
2393
+ # surfaces. Defaults to TIME_EXTENSION_ACTIVE if not specified.
2394
+ # Corresponds to the JSON property `timeExtension`
2395
+ # @return [String]
2396
+ attr_accessor :time_extension
2397
+
2398
+ def initialize(**args)
2399
+ update!(**args)
2400
+ end
2401
+
2402
+ # Update properties of this object
2403
+ def update!(**args)
2404
+ @billing_period_duration = args[:billing_period_duration] if args.key?(:billing_period_duration)
2405
+ @time_extension = args[:time_extension] if args.key?(:time_extension)
2406
+ end
2407
+ end
2408
+
2409
+ # Information related to a prepaid plan.
2410
+ class PrepaidPlan
2411
+ include Google::Apis::Core::Hashable
2412
+
2413
+ # After this time, the subscription is allowed for a new top-up purchase. Not
2414
+ # present if the subscription is already extended by a top-up purchase.
2415
+ # Corresponds to the JSON property `allowExtendAfterTime`
2416
+ # @return [String]
2417
+ attr_accessor :allow_extend_after_time
2418
+
2419
+ def initialize(**args)
2420
+ update!(**args)
2421
+ end
2422
+
2423
+ # Update properties of this object
2424
+ def update!(**args)
2425
+ @allow_extend_after_time = args[:allow_extend_after_time] if args.key?(:allow_extend_after_time)
2426
+ end
2427
+ end
2428
+
1792
2429
  # Definition of a price, i.e. currency and units.
1793
2430
  class Price
1794
2431
  include Google::Apis::Core::Hashable
@@ -1949,6 +2586,145 @@ module Google
1949
2586
  end
1950
2587
  end
1951
2588
 
2589
+ # Configuration for a base plan specific to a region.
2590
+ class RegionalBasePlanConfig
2591
+ include Google::Apis::Core::Hashable
2592
+
2593
+ # Whether the base plan in the specified region is available for new subscribers.
2594
+ # Existing subscribers will not have their subscription canceled if this value
2595
+ # is set to false. If not specified, this will default to false.
2596
+ # Corresponds to the JSON property `newSubscriberAvailability`
2597
+ # @return [Boolean]
2598
+ attr_accessor :new_subscriber_availability
2599
+ alias_method :new_subscriber_availability?, :new_subscriber_availability
2600
+
2601
+ # Represents an amount of money with its currency type.
2602
+ # Corresponds to the JSON property `price`
2603
+ # @return [Google::Apis::AndroidpublisherV3::Money]
2604
+ attr_accessor :price
2605
+
2606
+ # Required. Region code this configuration applies to, as defined by ISO 3166-2,
2607
+ # e.g. "US".
2608
+ # Corresponds to the JSON property `regionCode`
2609
+ # @return [String]
2610
+ attr_accessor :region_code
2611
+
2612
+ def initialize(**args)
2613
+ update!(**args)
2614
+ end
2615
+
2616
+ # Update properties of this object
2617
+ def update!(**args)
2618
+ @new_subscriber_availability = args[:new_subscriber_availability] if args.key?(:new_subscriber_availability)
2619
+ @price = args[:price] if args.key?(:price)
2620
+ @region_code = args[:region_code] if args.key?(:region_code)
2621
+ end
2622
+ end
2623
+
2624
+ # Configuration for a price migration.
2625
+ class RegionalPriceMigrationConfig
2626
+ include Google::Apis::Core::Hashable
2627
+
2628
+ # Required. The cutoff time for historical prices that subscribers can remain
2629
+ # paying. Subscribers who are on a price that was created before this cutoff
2630
+ # time will be migrated to the currently-offered price. These subscribers will
2631
+ # receive a notification that they will be paying a different price. Subscribers
2632
+ # who do not agree to the new price will have their subscription ended at the
2633
+ # next renewal.
2634
+ # Corresponds to the JSON property `oldestAllowedPriceVersionTime`
2635
+ # @return [String]
2636
+ attr_accessor :oldest_allowed_price_version_time
2637
+
2638
+ # Required. Region code this configuration applies to, as defined by ISO 3166-2,
2639
+ # e.g. "US".
2640
+ # Corresponds to the JSON property `regionCode`
2641
+ # @return [String]
2642
+ attr_accessor :region_code
2643
+
2644
+ def initialize(**args)
2645
+ update!(**args)
2646
+ end
2647
+
2648
+ # Update properties of this object
2649
+ def update!(**args)
2650
+ @oldest_allowed_price_version_time = args[:oldest_allowed_price_version_time] if args.key?(:oldest_allowed_price_version_time)
2651
+ @region_code = args[:region_code] if args.key?(:region_code)
2652
+ end
2653
+ end
2654
+
2655
+ # Configuration for a subscription offer in a single region.
2656
+ class RegionalSubscriptionOfferConfig
2657
+ include Google::Apis::Core::Hashable
2658
+
2659
+ # Whether the subscription offer in the specified region is available for new
2660
+ # subscribers. Existing subscribers will not have their subscription cancelled
2661
+ # if this value is set to false. If not specified, this will default to false.
2662
+ # Corresponds to the JSON property `newSubscriberAvailability`
2663
+ # @return [Boolean]
2664
+ attr_accessor :new_subscriber_availability
2665
+ alias_method :new_subscriber_availability?, :new_subscriber_availability
2666
+
2667
+ # Required. Immutable. Region code this configuration applies to, as defined by
2668
+ # ISO 3166-2, e.g. "US".
2669
+ # Corresponds to the JSON property `regionCode`
2670
+ # @return [String]
2671
+ attr_accessor :region_code
2672
+
2673
+ def initialize(**args)
2674
+ update!(**args)
2675
+ end
2676
+
2677
+ # Update properties of this object
2678
+ def update!(**args)
2679
+ @new_subscriber_availability = args[:new_subscriber_availability] if args.key?(:new_subscriber_availability)
2680
+ @region_code = args[:region_code] if args.key?(:region_code)
2681
+ end
2682
+ end
2683
+
2684
+ # Configuration for a single phase of a subscription offer in a single region.
2685
+ class RegionalSubscriptionOfferPhaseConfig
2686
+ include Google::Apis::Core::Hashable
2687
+
2688
+ # Represents an amount of money with its currency type.
2689
+ # Corresponds to the JSON property `absoluteDiscount`
2690
+ # @return [Google::Apis::AndroidpublisherV3::Money]
2691
+ attr_accessor :absolute_discount
2692
+
2693
+ # Represents an amount of money with its currency type.
2694
+ # Corresponds to the JSON property `price`
2695
+ # @return [Google::Apis::AndroidpublisherV3::Money]
2696
+ attr_accessor :price
2697
+
2698
+ # Required. Immutable. The region to which this config applies.
2699
+ # Corresponds to the JSON property `regionCode`
2700
+ # @return [String]
2701
+ attr_accessor :region_code
2702
+
2703
+ # The fraction of the base plan price prorated over the phase duration that the
2704
+ # user pays for this offer phase. For example, if the base plan price for this
2705
+ # region is $12 for a period of 1 year, then a 50% discount for a phase of a
2706
+ # duration of 3 months would correspond to a price of $1.50. The discount must
2707
+ # be specified as a fraction strictly larger than 0 and strictly smaller than 1.
2708
+ # The resulting price will be rounded to the nearest billable unit (e.g. cents
2709
+ # for USD). The relative discount is considered invalid if the discounted price
2710
+ # ends up being smaller than the minimum price allowed in this region.
2711
+ # Corresponds to the JSON property `relativeDiscount`
2712
+ # @return [Float]
2713
+ attr_accessor :relative_discount
2714
+
2715
+ def initialize(**args)
2716
+ update!(**args)
2717
+ end
2718
+
2719
+ # Update properties of this object
2720
+ def update!(**args)
2721
+ @absolute_discount = args[:absolute_discount] if args.key?(:absolute_discount)
2722
+ @price = args[:price] if args.key?(:price)
2723
+ @region_code = args[:region_code] if args.key?(:region_code)
2724
+ @relative_discount = args[:relative_discount] if args.key?(:relative_discount)
2725
+ end
2726
+ end
2727
+
1952
2728
  # Specified details about taxation in a given geographical region.
1953
2729
  class RegionalTaxRateInfo
1954
2730
  include Google::Apis::Core::Hashable
@@ -1979,6 +2755,39 @@ module Google
1979
2755
  end
1980
2756
  end
1981
2757
 
2758
+ # The version of the available regions being used for the specified resource.
2759
+ class RegionsVersion
2760
+ include Google::Apis::Core::Hashable
2761
+
2762
+ # Required. A string representing version of the available regions being used
2763
+ # for the specified resource.
2764
+ # Corresponds to the JSON property `version`
2765
+ # @return [String]
2766
+ attr_accessor :version
2767
+
2768
+ def initialize(**args)
2769
+ update!(**args)
2770
+ end
2771
+
2772
+ # Update properties of this object
2773
+ def update!(**args)
2774
+ @version = args[:version] if args.key?(:version)
2775
+ end
2776
+ end
2777
+
2778
+ # Information specific to cancellations caused by subscription replacement.
2779
+ class ReplacementCancellation
2780
+ include Google::Apis::Core::Hashable
2781
+
2782
+ def initialize(**args)
2783
+ update!(**args)
2784
+ end
2785
+
2786
+ # Update properties of this object
2787
+ def update!(**args)
2788
+ end
2789
+ end
2790
+
1982
2791
  # An Android app review.
1983
2792
  class Review
1984
2793
  include Google::Apis::Core::Hashable
@@ -2098,14 +2907,110 @@ module Google
2098
2907
  end
2099
2908
  end
2100
2909
 
2101
- # Response on status of replying to a review.
2102
- class ReviewsReplyResponse
2910
+ # Response on status of replying to a review.
2911
+ class ReviewsReplyResponse
2912
+ include Google::Apis::Core::Hashable
2913
+
2914
+ # The result of replying/updating a reply to review.
2915
+ # Corresponds to the JSON property `result`
2916
+ # @return [Google::Apis::AndroidpublisherV3::ReviewReplyResult]
2917
+ attr_accessor :result
2918
+
2919
+ def initialize(**args)
2920
+ update!(**args)
2921
+ end
2922
+
2923
+ # Update properties of this object
2924
+ def update!(**args)
2925
+ @result = args[:result] if args.key?(:result)
2926
+ end
2927
+ end
2928
+
2929
+ # Information associated with purchases made with 'Subscribe with Google'.
2930
+ class SubscribeWithGoogleInfo
2931
+ include Google::Apis::Core::Hashable
2932
+
2933
+ # The email address of the user when the subscription was purchased.
2934
+ # Corresponds to the JSON property `emailAddress`
2935
+ # @return [String]
2936
+ attr_accessor :email_address
2937
+
2938
+ # The family name of the user when the subscription was purchased.
2939
+ # Corresponds to the JSON property `familyName`
2940
+ # @return [String]
2941
+ attr_accessor :family_name
2942
+
2943
+ # The given name of the user when the subscription was purchased.
2944
+ # Corresponds to the JSON property `givenName`
2945
+ # @return [String]
2946
+ attr_accessor :given_name
2947
+
2948
+ # The Google profile id of the user when the subscription was purchased.
2949
+ # Corresponds to the JSON property `profileId`
2950
+ # @return [String]
2951
+ attr_accessor :profile_id
2952
+
2953
+ # The profile name of the user when the subscription was purchased.
2954
+ # Corresponds to the JSON property `profileName`
2955
+ # @return [String]
2956
+ attr_accessor :profile_name
2957
+
2958
+ def initialize(**args)
2959
+ update!(**args)
2960
+ end
2961
+
2962
+ # Update properties of this object
2963
+ def update!(**args)
2964
+ @email_address = args[:email_address] if args.key?(:email_address)
2965
+ @family_name = args[:family_name] if args.key?(:family_name)
2966
+ @given_name = args[:given_name] if args.key?(:given_name)
2967
+ @profile_id = args[:profile_id] if args.key?(:profile_id)
2968
+ @profile_name = args[:profile_name] if args.key?(:profile_name)
2969
+ end
2970
+ end
2971
+
2972
+ # A single subscription for an app.
2973
+ class Subscription
2103
2974
  include Google::Apis::Core::Hashable
2104
2975
 
2105
- # The result of replying/updating a reply to review.
2106
- # Corresponds to the JSON property `result`
2107
- # @return [Google::Apis::AndroidpublisherV3::ReviewReplyResult]
2108
- attr_accessor :result
2976
+ # Output only. Whether this subscription is archived. Archived subscriptions are
2977
+ # not available to any subscriber any longer, cannot be updated, and are not
2978
+ # returned in list requests unless the show archived flag is passed in.
2979
+ # Corresponds to the JSON property `archived`
2980
+ # @return [Boolean]
2981
+ attr_accessor :archived
2982
+ alias_method :archived?, :archived
2983
+
2984
+ # The set of base plans for this subscription. Represents the prices and
2985
+ # duration of the subscription if no other offers apply.
2986
+ # Corresponds to the JSON property `basePlans`
2987
+ # @return [Array<Google::Apis::AndroidpublisherV3::BasePlan>]
2988
+ attr_accessor :base_plans
2989
+
2990
+ # Required. List of localized listings for this subscription. Must contain at
2991
+ # least an entry for the default language of the parent app.
2992
+ # Corresponds to the JSON property `listings`
2993
+ # @return [Array<Google::Apis::AndroidpublisherV3::SubscriptionListing>]
2994
+ attr_accessor :listings
2995
+
2996
+ # Immutable. Package name of the parent app.
2997
+ # Corresponds to the JSON property `packageName`
2998
+ # @return [String]
2999
+ attr_accessor :package_name
3000
+
3001
+ # Immutable. Unique product ID of the product. Unique within the parent app.
3002
+ # Product IDs must be composed of lower-case letters (a-z), numbers (0-9),
3003
+ # underscores (_) and dots (.). It must start with a lower-case letter or number,
3004
+ # and be between 1 and 40 (inclusive) characters in length.
3005
+ # Corresponds to the JSON property `productId`
3006
+ # @return [String]
3007
+ attr_accessor :product_id
3008
+
3009
+ # Details about taxation, Google Play policy and legal compliance for
3010
+ # subscription products.
3011
+ # Corresponds to the JSON property `taxAndComplianceSettings`
3012
+ # @return [Google::Apis::AndroidpublisherV3::SubscriptionTaxAndComplianceSettings]
3013
+ attr_accessor :tax_and_compliance_settings
2109
3014
 
2110
3015
  def initialize(**args)
2111
3016
  update!(**args)
@@ -2113,7 +3018,12 @@ module Google
2113
3018
 
2114
3019
  # Update properties of this object
2115
3020
  def update!(**args)
2116
- @result = args[:result] if args.key?(:result)
3021
+ @archived = args[:archived] if args.key?(:archived)
3022
+ @base_plans = args[:base_plans] if args.key?(:base_plans)
3023
+ @listings = args[:listings] if args.key?(:listings)
3024
+ @package_name = args[:package_name] if args.key?(:package_name)
3025
+ @product_id = args[:product_id] if args.key?(:product_id)
3026
+ @tax_and_compliance_settings = args[:tax_and_compliance_settings] if args.key?(:tax_and_compliance_settings)
2117
3027
  end
2118
3028
  end
2119
3029
 
@@ -2175,6 +3085,199 @@ module Google
2175
3085
  end
2176
3086
  end
2177
3087
 
3088
+ # The consumer-visible metadata of a subscription.
3089
+ class SubscriptionListing
3090
+ include Google::Apis::Core::Hashable
3091
+
3092
+ # A list of benefits shown to the user on platforms such as the Play Store and
3093
+ # in restoration flows in the language of this listing. Plain text. Ordered list
3094
+ # of at most four benefits.
3095
+ # Corresponds to the JSON property `benefits`
3096
+ # @return [Array<String>]
3097
+ attr_accessor :benefits
3098
+
3099
+ # The description of this subscription in the language of this listing. Maximum
3100
+ # length - 80 characters. Plain text.
3101
+ # Corresponds to the JSON property `description`
3102
+ # @return [String]
3103
+ attr_accessor :description
3104
+
3105
+ # Required. The language of this listing, as defined by BCP-47, e.g. "en-US".
3106
+ # Corresponds to the JSON property `languageCode`
3107
+ # @return [String]
3108
+ attr_accessor :language_code
3109
+
3110
+ # Required. The title of this subscription in the language of this listing.
3111
+ # Plain text.
3112
+ # Corresponds to the JSON property `title`
3113
+ # @return [String]
3114
+ attr_accessor :title
3115
+
3116
+ def initialize(**args)
3117
+ update!(**args)
3118
+ end
3119
+
3120
+ # Update properties of this object
3121
+ def update!(**args)
3122
+ @benefits = args[:benefits] if args.key?(:benefits)
3123
+ @description = args[:description] if args.key?(:description)
3124
+ @language_code = args[:language_code] if args.key?(:language_code)
3125
+ @title = args[:title] if args.key?(:title)
3126
+ end
3127
+ end
3128
+
3129
+ # A single, temporary offer
3130
+ class SubscriptionOffer
3131
+ include Google::Apis::Core::Hashable
3132
+
3133
+ # Required. Immutable. The ID of the base plan to which this offer is an
3134
+ # extension.
3135
+ # Corresponds to the JSON property `basePlanId`
3136
+ # @return [String]
3137
+ attr_accessor :base_plan_id
3138
+
3139
+ # Required. Immutable. Unique ID of this subscription offer. Must be unique
3140
+ # within the base plan.
3141
+ # Corresponds to the JSON property `offerId`
3142
+ # @return [String]
3143
+ attr_accessor :offer_id
3144
+
3145
+ # List of up to 20 custom tags specified for this offer, and returned to the app
3146
+ # through the billing library.
3147
+ # Corresponds to the JSON property `offerTags`
3148
+ # @return [Array<Google::Apis::AndroidpublisherV3::OfferTag>]
3149
+ attr_accessor :offer_tags
3150
+
3151
+ # Configuration for any new locations Play may launch in specified on a
3152
+ # subscription offer.
3153
+ # Corresponds to the JSON property `otherRegionsConfig`
3154
+ # @return [Google::Apis::AndroidpublisherV3::OtherRegionsSubscriptionOfferConfig]
3155
+ attr_accessor :other_regions_config
3156
+
3157
+ # Required. Immutable. The package name of the app the parent subscription
3158
+ # belongs to.
3159
+ # Corresponds to the JSON property `packageName`
3160
+ # @return [String]
3161
+ attr_accessor :package_name
3162
+
3163
+ # Required. The phases of this subscription offer. Must contain at least one
3164
+ # entry, and may contain at most five. Users will always receive all these
3165
+ # phases in the specified order. Phases may not be added, removed, or reordered
3166
+ # after initial creation.
3167
+ # Corresponds to the JSON property `phases`
3168
+ # @return [Array<Google::Apis::AndroidpublisherV3::SubscriptionOfferPhase>]
3169
+ attr_accessor :phases
3170
+
3171
+ # Required. Immutable. The ID of the parent subscription this offer belongs to.
3172
+ # Corresponds to the JSON property `productId`
3173
+ # @return [String]
3174
+ attr_accessor :product_id
3175
+
3176
+ # Required. The region-specific configuration of this offer. Must contain at
3177
+ # least one entry.
3178
+ # Corresponds to the JSON property `regionalConfigs`
3179
+ # @return [Array<Google::Apis::AndroidpublisherV3::RegionalSubscriptionOfferConfig>]
3180
+ attr_accessor :regional_configs
3181
+
3182
+ # Output only. The current state of this offer. Can be changed using Activate
3183
+ # and Deactivate actions. NB: the base plan state supersedes this state, so an
3184
+ # active offer may not be available if the base plan is not active.
3185
+ # Corresponds to the JSON property `state`
3186
+ # @return [String]
3187
+ attr_accessor :state
3188
+
3189
+ # Defines the rule a user needs to satisfy to receive this offer.
3190
+ # Corresponds to the JSON property `targeting`
3191
+ # @return [Google::Apis::AndroidpublisherV3::SubscriptionOfferTargeting]
3192
+ attr_accessor :targeting
3193
+
3194
+ def initialize(**args)
3195
+ update!(**args)
3196
+ end
3197
+
3198
+ # Update properties of this object
3199
+ def update!(**args)
3200
+ @base_plan_id = args[:base_plan_id] if args.key?(:base_plan_id)
3201
+ @offer_id = args[:offer_id] if args.key?(:offer_id)
3202
+ @offer_tags = args[:offer_tags] if args.key?(:offer_tags)
3203
+ @other_regions_config = args[:other_regions_config] if args.key?(:other_regions_config)
3204
+ @package_name = args[:package_name] if args.key?(:package_name)
3205
+ @phases = args[:phases] if args.key?(:phases)
3206
+ @product_id = args[:product_id] if args.key?(:product_id)
3207
+ @regional_configs = args[:regional_configs] if args.key?(:regional_configs)
3208
+ @state = args[:state] if args.key?(:state)
3209
+ @targeting = args[:targeting] if args.key?(:targeting)
3210
+ end
3211
+ end
3212
+
3213
+ # A single phase of a subscription offer.
3214
+ class SubscriptionOfferPhase
3215
+ include Google::Apis::Core::Hashable
3216
+
3217
+ # Required. The duration of a single recurrence of this phase. Specified in ISO
3218
+ # 8601 format.
3219
+ # Corresponds to the JSON property `duration`
3220
+ # @return [String]
3221
+ attr_accessor :duration
3222
+
3223
+ # Configuration for any new locations Play may launch in for a single offer
3224
+ # phase.
3225
+ # Corresponds to the JSON property `otherRegionsConfig`
3226
+ # @return [Google::Apis::AndroidpublisherV3::OtherRegionsSubscriptionOfferPhaseConfig]
3227
+ attr_accessor :other_regions_config
3228
+
3229
+ # Required. The number of times this phase repeats. If this offer phase is not
3230
+ # free, each recurrence charges the user the price of this offer phase.
3231
+ # Corresponds to the JSON property `recurrenceCount`
3232
+ # @return [Fixnum]
3233
+ attr_accessor :recurrence_count
3234
+
3235
+ # Required. The region-specific configuration of this offer phase. This list
3236
+ # must contain exactly one entry for each region for which the subscription
3237
+ # offer has a regional config.
3238
+ # Corresponds to the JSON property `regionalConfigs`
3239
+ # @return [Array<Google::Apis::AndroidpublisherV3::RegionalSubscriptionOfferPhaseConfig>]
3240
+ attr_accessor :regional_configs
3241
+
3242
+ def initialize(**args)
3243
+ update!(**args)
3244
+ end
3245
+
3246
+ # Update properties of this object
3247
+ def update!(**args)
3248
+ @duration = args[:duration] if args.key?(:duration)
3249
+ @other_regions_config = args[:other_regions_config] if args.key?(:other_regions_config)
3250
+ @recurrence_count = args[:recurrence_count] if args.key?(:recurrence_count)
3251
+ @regional_configs = args[:regional_configs] if args.key?(:regional_configs)
3252
+ end
3253
+ end
3254
+
3255
+ # Defines the rule a user needs to satisfy to receive this offer.
3256
+ class SubscriptionOfferTargeting
3257
+ include Google::Apis::Core::Hashable
3258
+
3259
+ # Represents a targeting rule of the form: User never had `scope` before.
3260
+ # Corresponds to the JSON property `acquisitionRule`
3261
+ # @return [Google::Apis::AndroidpublisherV3::AcquisitionTargetingRule]
3262
+ attr_accessor :acquisition_rule
3263
+
3264
+ # Represents a targeting rule of the form: User currently has `scope` [with
3265
+ # billing period `billing_period`].
3266
+ # Corresponds to the JSON property `upgradeRule`
3267
+ # @return [Google::Apis::AndroidpublisherV3::UpgradeTargetingRule]
3268
+ attr_accessor :upgrade_rule
3269
+
3270
+ def initialize(**args)
3271
+ update!(**args)
3272
+ end
3273
+
3274
+ # Update properties of this object
3275
+ def update!(**args)
3276
+ @acquisition_rule = args[:acquisition_rule] if args.key?(:acquisition_rule)
3277
+ @upgrade_rule = args[:upgrade_rule] if args.key?(:upgrade_rule)
3278
+ end
3279
+ end
3280
+
2178
3281
  # Contains the price change information for a subscription that can be used to
2179
3282
  # control the user journey for the price change in the app. This can be in the
2180
3283
  # form of seeking confirmation from the user or tailoring the experience for a
@@ -2450,6 +3553,147 @@ module Google
2450
3553
  end
2451
3554
  end
2452
3555
 
3556
+ # Item-level info for a subscription purchase.
3557
+ class SubscriptionPurchaseLineItem
3558
+ include Google::Apis::Core::Hashable
3559
+
3560
+ # Information related to an auto renewing plan.
3561
+ # Corresponds to the JSON property `autoRenewingPlan`
3562
+ # @return [Google::Apis::AndroidpublisherV3::AutoRenewingPlan]
3563
+ attr_accessor :auto_renewing_plan
3564
+
3565
+ # Time at which the subscription expired or will expire unless the access is
3566
+ # extended (ex. renews).
3567
+ # Corresponds to the JSON property `expiryTime`
3568
+ # @return [String]
3569
+ attr_accessor :expiry_time
3570
+
3571
+ # Information related to a prepaid plan.
3572
+ # Corresponds to the JSON property `prepaidPlan`
3573
+ # @return [Google::Apis::AndroidpublisherV3::PrepaidPlan]
3574
+ attr_accessor :prepaid_plan
3575
+
3576
+ # The purchased product ID (for example, 'monthly001').
3577
+ # Corresponds to the JSON property `productId`
3578
+ # @return [String]
3579
+ attr_accessor :product_id
3580
+
3581
+ def initialize(**args)
3582
+ update!(**args)
3583
+ end
3584
+
3585
+ # Update properties of this object
3586
+ def update!(**args)
3587
+ @auto_renewing_plan = args[:auto_renewing_plan] if args.key?(:auto_renewing_plan)
3588
+ @expiry_time = args[:expiry_time] if args.key?(:expiry_time)
3589
+ @prepaid_plan = args[:prepaid_plan] if args.key?(:prepaid_plan)
3590
+ @product_id = args[:product_id] if args.key?(:product_id)
3591
+ end
3592
+ end
3593
+
3594
+ # Indicates the status of a user's subscription purchase.
3595
+ class SubscriptionPurchaseV2
3596
+ include Google::Apis::Core::Hashable
3597
+
3598
+ # The acknowledgement state of the subscription.
3599
+ # Corresponds to the JSON property `acknowledgementState`
3600
+ # @return [String]
3601
+ attr_accessor :acknowledgement_state
3602
+
3603
+ # Information specific to a subscription in canceled state.
3604
+ # Corresponds to the JSON property `canceledStateContext`
3605
+ # @return [Google::Apis::AndroidpublisherV3::CanceledStateContext]
3606
+ attr_accessor :canceled_state_context
3607
+
3608
+ # User account identifier in the third-party service.
3609
+ # Corresponds to the JSON property `externalAccountIdentifiers`
3610
+ # @return [Google::Apis::AndroidpublisherV3::ExternalAccountIdentifiers]
3611
+ attr_accessor :external_account_identifiers
3612
+
3613
+ # This kind represents a SubscriptionPurchaseV2 object in the androidpublisher
3614
+ # service.
3615
+ # Corresponds to the JSON property `kind`
3616
+ # @return [String]
3617
+ attr_accessor :kind
3618
+
3619
+ # The order id of the latest order associated with the purchase of the
3620
+ # subscription. For autoRenewing subscription, this is the order id of signup
3621
+ # order if it is not renewed yet, or the last recurring order id (success,
3622
+ # pending, or declined order). For prepaid subscription, this is the order id
3623
+ # associated with the queried purchase token.
3624
+ # Corresponds to the JSON property `latestOrderId`
3625
+ # @return [String]
3626
+ attr_accessor :latest_order_id
3627
+
3628
+ # Item-level info for a subscription purchase. The items in the same purchase
3629
+ # should be either all with AutoRenewingPlan or all with PrepaidPlan.
3630
+ # Corresponds to the JSON property `lineItems`
3631
+ # @return [Array<Google::Apis::AndroidpublisherV3::SubscriptionPurchaseLineItem>]
3632
+ attr_accessor :line_items
3633
+
3634
+ # The purchase token of the old subscription if this subscription is one of the
3635
+ # following: * Re-signup of a canceled but non-lapsed subscription * Upgrade/
3636
+ # downgrade from a previous subscription. * Convert from prepaid to auto
3637
+ # renewing subscription. * Convert from an auto renewing subscription to prepaid.
3638
+ # * Topup a prepaid subscription.
3639
+ # Corresponds to the JSON property `linkedPurchaseToken`
3640
+ # @return [String]
3641
+ attr_accessor :linked_purchase_token
3642
+
3643
+ # Information specific to a subscription in paused state.
3644
+ # Corresponds to the JSON property `pausedStateContext`
3645
+ # @return [Google::Apis::AndroidpublisherV3::PausedStateContext]
3646
+ attr_accessor :paused_state_context
3647
+
3648
+ # ISO 3166-1 alpha-2 billing country/region code of the user at the time the
3649
+ # subscription was granted.
3650
+ # Corresponds to the JSON property `regionCode`
3651
+ # @return [String]
3652
+ attr_accessor :region_code
3653
+
3654
+ # Time at which the subscription was granted. Not set for pending subscriptions (
3655
+ # subscription was created but awaiting payment during signup).
3656
+ # Corresponds to the JSON property `startTime`
3657
+ # @return [String]
3658
+ attr_accessor :start_time
3659
+
3660
+ # Information associated with purchases made with 'Subscribe with Google'.
3661
+ # Corresponds to the JSON property `subscribeWithGoogleInfo`
3662
+ # @return [Google::Apis::AndroidpublisherV3::SubscribeWithGoogleInfo]
3663
+ attr_accessor :subscribe_with_google_info
3664
+
3665
+ # The current state of the subscription.
3666
+ # Corresponds to the JSON property `subscriptionState`
3667
+ # @return [String]
3668
+ attr_accessor :subscription_state
3669
+
3670
+ # Whether this subscription purchase is a test purchase.
3671
+ # Corresponds to the JSON property `testPurchase`
3672
+ # @return [Google::Apis::AndroidpublisherV3::TestPurchase]
3673
+ attr_accessor :test_purchase
3674
+
3675
+ def initialize(**args)
3676
+ update!(**args)
3677
+ end
3678
+
3679
+ # Update properties of this object
3680
+ def update!(**args)
3681
+ @acknowledgement_state = args[:acknowledgement_state] if args.key?(:acknowledgement_state)
3682
+ @canceled_state_context = args[:canceled_state_context] if args.key?(:canceled_state_context)
3683
+ @external_account_identifiers = args[:external_account_identifiers] if args.key?(:external_account_identifiers)
3684
+ @kind = args[:kind] if args.key?(:kind)
3685
+ @latest_order_id = args[:latest_order_id] if args.key?(:latest_order_id)
3686
+ @line_items = args[:line_items] if args.key?(:line_items)
3687
+ @linked_purchase_token = args[:linked_purchase_token] if args.key?(:linked_purchase_token)
3688
+ @paused_state_context = args[:paused_state_context] if args.key?(:paused_state_context)
3689
+ @region_code = args[:region_code] if args.key?(:region_code)
3690
+ @start_time = args[:start_time] if args.key?(:start_time)
3691
+ @subscribe_with_google_info = args[:subscribe_with_google_info] if args.key?(:subscribe_with_google_info)
3692
+ @subscription_state = args[:subscription_state] if args.key?(:subscription_state)
3693
+ @test_purchase = args[:test_purchase] if args.key?(:test_purchase)
3694
+ end
3695
+ end
3696
+
2453
3697
  # Request for the purchases.subscriptions.acknowledge API.
2454
3698
  class SubscriptionPurchasesAcknowledgeRequest
2455
3699
  include Google::Apis::Core::Hashable
@@ -2577,6 +3821,53 @@ module Google
2577
3821
  end
2578
3822
  end
2579
3823
 
3824
+ # Information specific to cancellations initiated by Google system.
3825
+ class SystemInitiatedCancellation
3826
+ include Google::Apis::Core::Hashable
3827
+
3828
+ def initialize(**args)
3829
+ update!(**args)
3830
+ end
3831
+
3832
+ # Update properties of this object
3833
+ def update!(**args)
3834
+ end
3835
+ end
3836
+
3837
+ # Defines the scope of subscriptions which a targeting rule can match to target
3838
+ # offers to users based on past or current entitlement.
3839
+ class TargetingRuleScope
3840
+ include Google::Apis::Core::Hashable
3841
+
3842
+ # The scope of the current targeting rule is the subscription with the specified
3843
+ # subscription ID. Must be a subscription within the same parent app.
3844
+ # Corresponds to the JSON property `specificSubscriptionInApp`
3845
+ # @return [String]
3846
+ attr_accessor :specific_subscription_in_app
3847
+
3848
+ def initialize(**args)
3849
+ update!(**args)
3850
+ end
3851
+
3852
+ # Update properties of this object
3853
+ def update!(**args)
3854
+ @specific_subscription_in_app = args[:specific_subscription_in_app] if args.key?(:specific_subscription_in_app)
3855
+ end
3856
+ end
3857
+
3858
+ # Whether this subscription purchase is a test purchase.
3859
+ class TestPurchase
3860
+ include Google::Apis::Core::Hashable
3861
+
3862
+ def initialize(**args)
3863
+ update!(**args)
3864
+ end
3865
+
3866
+ # Update properties of this object
3867
+ def update!(**args)
3868
+ end
3869
+ end
3870
+
2580
3871
  # The testers of an app. The resource for TestersService. Note: while it is
2581
3872
  # possible in the Play Console UI to add testers via email lists, email lists
2582
3873
  # are not supported by this resource.
@@ -2832,6 +4123,43 @@ module Google
2832
4123
  end
2833
4124
  end
2834
4125
 
4126
+ # Represents a targeting rule of the form: User currently has `scope` [with
4127
+ # billing period `billing_period`].
4128
+ class UpgradeTargetingRule
4129
+ include Google::Apis::Core::Hashable
4130
+
4131
+ # The specific billing period duration, specified in ISO 8601 format, that a
4132
+ # user must be currently subscribed to to be eligible for this rule. If not
4133
+ # specified, users subscribed to any billing period are matched.
4134
+ # Corresponds to the JSON property `billingPeriodDuration`
4135
+ # @return [String]
4136
+ attr_accessor :billing_period_duration
4137
+
4138
+ # Limit this offer to only once per user. If set to true, a user can never be
4139
+ # eligible for this offer again if they ever subscribed to this offer.
4140
+ # Corresponds to the JSON property `oncePerUser`
4141
+ # @return [Boolean]
4142
+ attr_accessor :once_per_user
4143
+ alias_method :once_per_user?, :once_per_user
4144
+
4145
+ # Defines the scope of subscriptions which a targeting rule can match to target
4146
+ # offers to users based on past or current entitlement.
4147
+ # Corresponds to the JSON property `scope`
4148
+ # @return [Google::Apis::AndroidpublisherV3::TargetingRuleScope]
4149
+ attr_accessor :scope
4150
+
4151
+ def initialize(**args)
4152
+ update!(**args)
4153
+ end
4154
+
4155
+ # Update properties of this object
4156
+ def update!(**args)
4157
+ @billing_period_duration = args[:billing_period_duration] if args.key?(:billing_period_duration)
4158
+ @once_per_user = args[:once_per_user] if args.key?(:once_per_user)
4159
+ @scope = args[:scope] if args.key?(:scope)
4160
+ end
4161
+ end
4162
+
2835
4163
  # A user resource.
2836
4164
  class User
2837
4165
  include Google::Apis::Core::Hashable
@@ -2991,6 +4319,33 @@ module Google
2991
4319
  end
2992
4320
  end
2993
4321
 
4322
+ # Information specific to cancellations initiated by users.
4323
+ class UserInitiatedCancellation
4324
+ include Google::Apis::Core::Hashable
4325
+
4326
+ # Result of the cancel survey when the subscription was canceled by the user.
4327
+ # Corresponds to the JSON property `cancelSurveyResult`
4328
+ # @return [Google::Apis::AndroidpublisherV3::CancelSurveyResult]
4329
+ attr_accessor :cancel_survey_result
4330
+
4331
+ # The time at which the subscription was canceled by the user. The user might
4332
+ # still have access to the subscription after this time. Use line_items.
4333
+ # expiry_time to determine if a user still has access.
4334
+ # Corresponds to the JSON property `cancelTime`
4335
+ # @return [String]
4336
+ attr_accessor :cancel_time
4337
+
4338
+ def initialize(**args)
4339
+ update!(**args)
4340
+ end
4341
+
4342
+ # Update properties of this object
4343
+ def update!(**args)
4344
+ @cancel_survey_result = args[:cancel_survey_result] if args.key?(:cancel_survey_result)
4345
+ @cancel_time = args[:cancel_time] if args.key?(:cancel_time)
4346
+ end
4347
+ end
4348
+
2994
4349
  # A permission used by this APK.
2995
4350
  class UsesPermission
2996
4351
  include Google::Apis::Core::Hashable