google-apis-androidpublisher_v3 0.8.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.
@@ -49,6 +49,117 @@ module Google
49
49
  @batch_path = 'batch'
50
50
  end
51
51
 
52
+ # Creates a new device tier config for an app.
53
+ # @param [String] package_name
54
+ # Package name of the app.
55
+ # @param [Google::Apis::AndroidpublisherV3::DeviceTierConfig] device_tier_config_object
56
+ # @param [Boolean] allow_unknown_devices
57
+ # Whether the service should accept device IDs that are unknown to Play's device
58
+ # catalog.
59
+ # @param [String] fields
60
+ # Selector specifying which fields to include in a partial response.
61
+ # @param [String] quota_user
62
+ # Available to use for quota purposes for server-side applications. Can be any
63
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
64
+ # @param [Google::Apis::RequestOptions] options
65
+ # Request-specific options
66
+ #
67
+ # @yield [result, err] Result & error if block supplied
68
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::DeviceTierConfig] parsed result object
69
+ # @yieldparam err [StandardError] error object if request failed
70
+ #
71
+ # @return [Google::Apis::AndroidpublisherV3::DeviceTierConfig]
72
+ #
73
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
74
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
75
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
76
+ def create_application_device_tier_config(package_name, device_tier_config_object = nil, allow_unknown_devices: nil, fields: nil, quota_user: nil, options: nil, &block)
77
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/deviceTierConfigs', options)
78
+ command.request_representation = Google::Apis::AndroidpublisherV3::DeviceTierConfig::Representation
79
+ command.request_object = device_tier_config_object
80
+ command.response_representation = Google::Apis::AndroidpublisherV3::DeviceTierConfig::Representation
81
+ command.response_class = Google::Apis::AndroidpublisherV3::DeviceTierConfig
82
+ command.params['packageName'] = package_name unless package_name.nil?
83
+ command.query['allowUnknownDevices'] = allow_unknown_devices unless allow_unknown_devices.nil?
84
+ command.query['fields'] = fields unless fields.nil?
85
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
86
+ execute_or_queue_command(command, &block)
87
+ end
88
+
89
+ # Returns a particular device tier config.
90
+ # @param [String] package_name
91
+ # Package name of the app.
92
+ # @param [Fixnum] device_tier_config_id
93
+ # Required. Id of an existing device tier config.
94
+ # @param [String] fields
95
+ # Selector specifying which fields to include in a partial response.
96
+ # @param [String] quota_user
97
+ # Available to use for quota purposes for server-side applications. Can be any
98
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
99
+ # @param [Google::Apis::RequestOptions] options
100
+ # Request-specific options
101
+ #
102
+ # @yield [result, err] Result & error if block supplied
103
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::DeviceTierConfig] parsed result object
104
+ # @yieldparam err [StandardError] error object if request failed
105
+ #
106
+ # @return [Google::Apis::AndroidpublisherV3::DeviceTierConfig]
107
+ #
108
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
109
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
110
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
111
+ def get_application_device_tier_config(package_name, device_tier_config_id, fields: nil, quota_user: nil, options: nil, &block)
112
+ command = make_simple_command(:get, 'androidpublisher/v3/applications/{packageName}/deviceTierConfigs/{deviceTierConfigId}', options)
113
+ command.response_representation = Google::Apis::AndroidpublisherV3::DeviceTierConfig::Representation
114
+ command.response_class = Google::Apis::AndroidpublisherV3::DeviceTierConfig
115
+ command.params['packageName'] = package_name unless package_name.nil?
116
+ command.params['deviceTierConfigId'] = device_tier_config_id unless device_tier_config_id.nil?
117
+ command.query['fields'] = fields unless fields.nil?
118
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
119
+ execute_or_queue_command(command, &block)
120
+ end
121
+
122
+ # Returns created device tier configs, ordered by descending creation time.
123
+ # @param [String] package_name
124
+ # Package name of the app.
125
+ # @param [Fixnum] page_size
126
+ # The maximum number of device tier configs to return. The service may return
127
+ # fewer than this value. If unspecified, at most 10 device tier configs will be
128
+ # returned. The maximum value for this field is 100; values above 100 will be
129
+ # coerced to 100. Device tier configs will be ordered by descending creation
130
+ # time.
131
+ # @param [String] page_token
132
+ # A page token, received from a previous `ListDeviceTierConfigs` call. Provide
133
+ # this to retrieve the subsequent page.
134
+ # @param [String] fields
135
+ # Selector specifying which fields to include in a partial response.
136
+ # @param [String] quota_user
137
+ # Available to use for quota purposes for server-side applications. Can be any
138
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
139
+ # @param [Google::Apis::RequestOptions] options
140
+ # Request-specific options
141
+ #
142
+ # @yield [result, err] Result & error if block supplied
143
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::ListDeviceTierConfigsResponse] parsed result object
144
+ # @yieldparam err [StandardError] error object if request failed
145
+ #
146
+ # @return [Google::Apis::AndroidpublisherV3::ListDeviceTierConfigsResponse]
147
+ #
148
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
149
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
150
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
151
+ def list_application_device_tier_configs(package_name, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
152
+ command = make_simple_command(:get, 'androidpublisher/v3/applications/{packageName}/deviceTierConfigs', options)
153
+ command.response_representation = Google::Apis::AndroidpublisherV3::ListDeviceTierConfigsResponse::Representation
154
+ command.response_class = Google::Apis::AndroidpublisherV3::ListDeviceTierConfigsResponse
155
+ command.params['packageName'] = package_name unless package_name.nil?
156
+ command.query['pageSize'] = page_size unless page_size.nil?
157
+ command.query['pageToken'] = page_token unless page_token.nil?
158
+ command.query['fields'] = fields unless fields.nil?
159
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
160
+ execute_or_queue_command(command, &block)
161
+ end
162
+
52
163
  # Commits an app edit.
53
164
  # @param [String] package_name
54
165
  # Package name of the app.
@@ -375,9 +486,9 @@ module Google
375
486
  # @param [String] edit_id
376
487
  # Identifier of the edit.
377
488
  # @param [Boolean] ack_bundle_installation_warning
378
- # Must be set to true if the bundle installation may trigger a warning on user
379
- # devices (for example, if installation size may be over a threshold, typically
380
- # 100 MB).
489
+ # Must be set to true if the app bundle installation may trigger a warning on
490
+ # user devices (for example, if installation size may be over a threshold,
491
+ # typically 100 MB).
381
492
  # @param [String] fields
382
493
  # Selector specifying which fields to include in a partial response.
383
494
  # @param [String] quota_user
@@ -417,6 +528,42 @@ module Google
417
528
  execute_or_queue_command(command, &block)
418
529
  end
419
530
 
531
+ # Gets country availability.
532
+ # @param [String] package_name
533
+ # Package name of the app.
534
+ # @param [String] edit_id
535
+ # Identifier of the edit.
536
+ # @param [String] track
537
+ # The track to read from.
538
+ # @param [String] fields
539
+ # Selector specifying which fields to include in a partial response.
540
+ # @param [String] quota_user
541
+ # Available to use for quota purposes for server-side applications. Can be any
542
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
543
+ # @param [Google::Apis::RequestOptions] options
544
+ # Request-specific options
545
+ #
546
+ # @yield [result, err] Result & error if block supplied
547
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::TrackCountryAvailability] parsed result object
548
+ # @yieldparam err [StandardError] error object if request failed
549
+ #
550
+ # @return [Google::Apis::AndroidpublisherV3::TrackCountryAvailability]
551
+ #
552
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
553
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
554
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
555
+ def get_edit_countryavailability(package_name, edit_id, track, fields: nil, quota_user: nil, options: nil, &block)
556
+ command = make_simple_command(:get, 'androidpublisher/v3/applications/{packageName}/edits/{editId}/countryAvailability/{track}', options)
557
+ command.response_representation = Google::Apis::AndroidpublisherV3::TrackCountryAvailability::Representation
558
+ command.response_class = Google::Apis::AndroidpublisherV3::TrackCountryAvailability
559
+ command.params['packageName'] = package_name unless package_name.nil?
560
+ command.params['editId'] = edit_id unless edit_id.nil?
561
+ command.params['track'] = track unless track.nil?
562
+ command.query['fields'] = fields unless fields.nil?
563
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
564
+ execute_or_queue_command(command, &block)
565
+ end
566
+
420
567
  # Uploads a new deobfuscation file and attaches to the specified APK.
421
568
  # @param [String] package_name
422
569
  # Unique identifier for the Android app.
@@ -1141,7 +1288,7 @@ module Google
1141
1288
  execute_or_queue_command(command, &block)
1142
1289
  end
1143
1290
 
1144
- # Gets testers.
1291
+ # Gets testers. Note: Testers resource does not support email lists.
1145
1292
  # @param [String] package_name
1146
1293
  # Package name of the app.
1147
1294
  # @param [String] edit_id
@@ -1177,7 +1324,7 @@ module Google
1177
1324
  execute_or_queue_command(command, &block)
1178
1325
  end
1179
1326
 
1180
- # Patches testers.
1327
+ # Patches testers. Note: Testers resource does not support email lists.
1181
1328
  # @param [String] package_name
1182
1329
  # Package name of the app.
1183
1330
  # @param [String] edit_id
@@ -1216,7 +1363,7 @@ module Google
1216
1363
  execute_or_queue_command(command, &block)
1217
1364
  end
1218
1365
 
1219
- # Updates testers.
1366
+ # Updates testers. Note: Testers resource does not support email lists.
1220
1367
  # @param [String] package_name
1221
1368
  # Package name of the app.
1222
1369
  # @param [String] edit_id
@@ -1402,6 +1549,183 @@ module Google
1402
1549
  execute_or_queue_command(command, &block)
1403
1550
  end
1404
1551
 
1552
+ # Downloads a single signed APK generated from an app bundle.
1553
+ # @param [String] package_name
1554
+ # Package name of the app.
1555
+ # @param [Fixnum] version_code
1556
+ # Version code of the app bundle.
1557
+ # @param [String] download_id
1558
+ # Download ID, which uniquely identifies the APK to download. Can be obtained
1559
+ # from the response of `generatedapks.list` method.
1560
+ # @param [String] fields
1561
+ # Selector specifying which fields to include in a partial response.
1562
+ # @param [String] quota_user
1563
+ # Available to use for quota purposes for server-side applications. Can be any
1564
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1565
+ # @param [IO, String] download_dest
1566
+ # IO stream or filename to receive content download
1567
+ # @param [Google::Apis::RequestOptions] options
1568
+ # Request-specific options
1569
+ #
1570
+ # @yield [result, err] Result & error if block supplied
1571
+ # @yieldparam result [NilClass] No result returned for this method
1572
+ # @yieldparam err [StandardError] error object if request failed
1573
+ #
1574
+ # @return [void]
1575
+ #
1576
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1577
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1578
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1579
+ def download_generatedapk(package_name, version_code, download_id, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block)
1580
+ if download_dest.nil?
1581
+ command = make_simple_command(:get, 'androidpublisher/v3/applications/{packageName}/generatedApks/{versionCode}/downloads/{downloadId}:download', options)
1582
+ else
1583
+ command = make_download_command(:get, 'androidpublisher/v3/applications/{packageName}/generatedApks/{versionCode}/downloads/{downloadId}:download', options)
1584
+ command.download_dest = download_dest
1585
+ end
1586
+ command.params['packageName'] = package_name unless package_name.nil?
1587
+ command.params['versionCode'] = version_code unless version_code.nil?
1588
+ command.params['downloadId'] = download_id unless download_id.nil?
1589
+ command.query['fields'] = fields unless fields.nil?
1590
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1591
+ execute_or_queue_command(command, &block)
1592
+ end
1593
+
1594
+ # Returns download metadata for all APKs that were generated from a given app
1595
+ # bundle.
1596
+ # @param [String] package_name
1597
+ # Package name of the app.
1598
+ # @param [Fixnum] version_code
1599
+ # Version code of the app bundle.
1600
+ # @param [String] fields
1601
+ # Selector specifying which fields to include in a partial response.
1602
+ # @param [String] quota_user
1603
+ # Available to use for quota purposes for server-side applications. Can be any
1604
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1605
+ # @param [Google::Apis::RequestOptions] options
1606
+ # Request-specific options
1607
+ #
1608
+ # @yield [result, err] Result & error if block supplied
1609
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::GeneratedApksListResponse] parsed result object
1610
+ # @yieldparam err [StandardError] error object if request failed
1611
+ #
1612
+ # @return [Google::Apis::AndroidpublisherV3::GeneratedApksListResponse]
1613
+ #
1614
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1615
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1616
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1617
+ def list_generatedapks(package_name, version_code, fields: nil, quota_user: nil, options: nil, &block)
1618
+ command = make_simple_command(:get, 'androidpublisher/v3/applications/{packageName}/generatedApks/{versionCode}', options)
1619
+ command.response_representation = Google::Apis::AndroidpublisherV3::GeneratedApksListResponse::Representation
1620
+ command.response_class = Google::Apis::AndroidpublisherV3::GeneratedApksListResponse
1621
+ command.params['packageName'] = package_name unless package_name.nil?
1622
+ command.params['versionCode'] = version_code unless version_code.nil?
1623
+ command.query['fields'] = fields unless fields.nil?
1624
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1625
+ execute_or_queue_command(command, &block)
1626
+ end
1627
+
1628
+ # Grant access for a user to the given package.
1629
+ # @param [String] parent
1630
+ # Required. The user which needs permission. Format: developers/`developer`/
1631
+ # users/`user`
1632
+ # @param [Google::Apis::AndroidpublisherV3::Grant] grant_object
1633
+ # @param [String] fields
1634
+ # Selector specifying which fields to include in a partial response.
1635
+ # @param [String] quota_user
1636
+ # Available to use for quota purposes for server-side applications. Can be any
1637
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1638
+ # @param [Google::Apis::RequestOptions] options
1639
+ # Request-specific options
1640
+ #
1641
+ # @yield [result, err] Result & error if block supplied
1642
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::Grant] parsed result object
1643
+ # @yieldparam err [StandardError] error object if request failed
1644
+ #
1645
+ # @return [Google::Apis::AndroidpublisherV3::Grant]
1646
+ #
1647
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1648
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1649
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1650
+ def create_grant(parent, grant_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1651
+ command = make_simple_command(:post, 'androidpublisher/v3/{+parent}/grants', options)
1652
+ command.request_representation = Google::Apis::AndroidpublisherV3::Grant::Representation
1653
+ command.request_object = grant_object
1654
+ command.response_representation = Google::Apis::AndroidpublisherV3::Grant::Representation
1655
+ command.response_class = Google::Apis::AndroidpublisherV3::Grant
1656
+ command.params['parent'] = parent unless parent.nil?
1657
+ command.query['fields'] = fields unless fields.nil?
1658
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1659
+ execute_or_queue_command(command, &block)
1660
+ end
1661
+
1662
+ # Removes all access for the user to the given package or developer account.
1663
+ # @param [String] name
1664
+ # Required. The name of the grant to delete. Format: developers/`developer`/
1665
+ # users/`email`/grants/`package_name`
1666
+ # @param [String] fields
1667
+ # Selector specifying which fields to include in a partial response.
1668
+ # @param [String] quota_user
1669
+ # Available to use for quota purposes for server-side applications. Can be any
1670
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1671
+ # @param [Google::Apis::RequestOptions] options
1672
+ # Request-specific options
1673
+ #
1674
+ # @yield [result, err] Result & error if block supplied
1675
+ # @yieldparam result [NilClass] No result returned for this method
1676
+ # @yieldparam err [StandardError] error object if request failed
1677
+ #
1678
+ # @return [void]
1679
+ #
1680
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1681
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1682
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1683
+ def delete_grant(name, fields: nil, quota_user: nil, options: nil, &block)
1684
+ command = make_simple_command(:delete, 'androidpublisher/v3/{+name}', options)
1685
+ command.params['name'] = name unless name.nil?
1686
+ command.query['fields'] = fields unless fields.nil?
1687
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1688
+ execute_or_queue_command(command, &block)
1689
+ end
1690
+
1691
+ # Updates access for the user to the given package.
1692
+ # @param [String] name
1693
+ # Required. Resource name for this grant, following the pattern "developers/`
1694
+ # developer`/users/`email`/grants/`package_name`". If this grant is for a draft
1695
+ # app, the app ID will be used in this resource name instead of the package name.
1696
+ # @param [Google::Apis::AndroidpublisherV3::Grant] grant_object
1697
+ # @param [String] update_mask
1698
+ # Optional. The list of fields to be updated.
1699
+ # @param [String] fields
1700
+ # Selector specifying which fields to include in a partial response.
1701
+ # @param [String] quota_user
1702
+ # Available to use for quota purposes for server-side applications. Can be any
1703
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1704
+ # @param [Google::Apis::RequestOptions] options
1705
+ # Request-specific options
1706
+ #
1707
+ # @yield [result, err] Result & error if block supplied
1708
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::Grant] parsed result object
1709
+ # @yieldparam err [StandardError] error object if request failed
1710
+ #
1711
+ # @return [Google::Apis::AndroidpublisherV3::Grant]
1712
+ #
1713
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1714
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1715
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1716
+ def patch_grant(name, grant_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1717
+ command = make_simple_command(:patch, 'androidpublisher/v3/{+name}', options)
1718
+ command.request_representation = Google::Apis::AndroidpublisherV3::Grant::Representation
1719
+ command.request_object = grant_object
1720
+ command.response_representation = Google::Apis::AndroidpublisherV3::Grant::Representation
1721
+ command.response_class = Google::Apis::AndroidpublisherV3::Grant
1722
+ command.params['name'] = name unless name.nil?
1723
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1724
+ command.query['fields'] = fields unless fields.nil?
1725
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1726
+ execute_or_queue_command(command, &block)
1727
+ end
1728
+
1405
1729
  # Deletes an in-app product (i.e. a managed product or a subscriptions).
1406
1730
  # @param [String] package_name
1407
1731
  # Package name of the app.
@@ -1504,13 +1828,17 @@ module Google
1504
1828
  execute_or_queue_command(command, &block)
1505
1829
  end
1506
1830
 
1507
- # Lists all in-app products - both managed products and subscriptions.
1831
+ # Lists all in-app products - both managed products and subscriptions. If an app
1832
+ # has a large number of in-app products, the response may be paginated. In this
1833
+ # case the response field `tokenPagination.nextPageToken` will be set and the
1834
+ # caller should provide its value as a `token` request parameter to retrieve the
1835
+ # next page.
1508
1836
  # @param [String] package_name
1509
1837
  # Package name of the app.
1510
1838
  # @param [Fixnum] max_results
1511
- # How many results the list operation should return.
1839
+ # Deprecated and ignored. The page size is determined by the server.
1512
1840
  # @param [Fixnum] start_index
1513
- # The index of the first element to return.
1841
+ # Deprecated and ignored. Set the `token` parameter to rertieve the next page.
1514
1842
  # @param [String] token
1515
1843
  # Pagination token. If empty, list starts at the first product.
1516
1844
  # @param [String] fields
@@ -1590,6 +1918,9 @@ module Google
1590
1918
  # @param [String] sku
1591
1919
  # Unique identifier for the in-app product.
1592
1920
  # @param [Google::Apis::AndroidpublisherV3::InAppProduct] in_app_product_object
1921
+ # @param [Boolean] allow_missing
1922
+ # If set to true, and the in-app product with the given package_name and sku
1923
+ # doesn't exist, the in-app product will be created.
1593
1924
  # @param [Boolean] auto_convert_missing_prices
1594
1925
  # If true the prices for all regions targeted by the parent app that don't have
1595
1926
  # a price specified for this in-app product will be auto converted to the target
@@ -1611,7 +1942,7 @@ module Google
1611
1942
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1612
1943
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1613
1944
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1614
- def update_inappproduct(package_name, sku, in_app_product_object = nil, auto_convert_missing_prices: nil, fields: nil, quota_user: nil, options: nil, &block)
1945
+ def update_inappproduct(package_name, sku, in_app_product_object = nil, allow_missing: nil, auto_convert_missing_prices: nil, fields: nil, quota_user: nil, options: nil, &block)
1615
1946
  command = make_simple_command(:put, 'androidpublisher/v3/applications/{packageName}/inappproducts/{sku}', options)
1616
1947
  command.request_representation = Google::Apis::AndroidpublisherV3::InAppProduct::Representation
1617
1948
  command.request_object = in_app_product_object
@@ -1619,6 +1950,7 @@ module Google
1619
1950
  command.response_class = Google::Apis::AndroidpublisherV3::InAppProduct
1620
1951
  command.params['packageName'] = package_name unless package_name.nil?
1621
1952
  command.params['sku'] = sku unless sku.nil?
1953
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
1622
1954
  command.query['autoConvertMissingPrices'] = auto_convert_missing_prices unless auto_convert_missing_prices.nil?
1623
1955
  command.query['fields'] = fields unless fields.nil?
1624
1956
  command.query['quotaUser'] = quota_user unless quota_user.nil?
@@ -1713,18 +2045,11 @@ module Google
1713
2045
  execute_or_queue_command(command, &block)
1714
2046
  end
1715
2047
 
1716
- # Refund a user's subscription or in-app purchase order.
2048
+ # Calculates the region prices, using today's exchange rate and country-specific
2049
+ # pricing patterns, based on the price in the request for a set of regions.
1717
2050
  # @param [String] package_name
1718
- # The package name of the application for which this subscription or in-app item
1719
- # was purchased (for example, 'com.some.thing').
1720
- # @param [String] order_id
1721
- # The order ID provided to the user when the subscription or in-app order was
1722
- # purchased.
1723
- # @param [Boolean] revoke
1724
- # Whether to revoke the purchased item. If set to true, access to the
1725
- # subscription or in-app item will be terminated immediately. If the item is a
1726
- # recurring subscription, all future payments will also be terminated. Consumed
1727
- # in-app items need to be handled by developer's app. (optional).
2051
+ # Required. The app package name.
2052
+ # @param [Google::Apis::AndroidpublisherV3::ConvertRegionPricesRequest] convert_region_prices_request_object
1728
2053
  # @param [String] fields
1729
2054
  # Selector specifying which fields to include in a partial response.
1730
2055
  # @param [String] quota_user
@@ -1734,33 +2059,36 @@ module Google
1734
2059
  # Request-specific options
1735
2060
  #
1736
2061
  # @yield [result, err] Result & error if block supplied
1737
- # @yieldparam result [NilClass] No result returned for this method
2062
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::ConvertRegionPricesResponse] parsed result object
1738
2063
  # @yieldparam err [StandardError] error object if request failed
1739
2064
  #
1740
- # @return [void]
2065
+ # @return [Google::Apis::AndroidpublisherV3::ConvertRegionPricesResponse]
1741
2066
  #
1742
2067
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1743
2068
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1744
2069
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1745
- def refund_order(package_name, order_id, revoke: nil, fields: nil, quota_user: nil, options: nil, &block)
1746
- command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/orders/{orderId}:refund', options)
2070
+ def convert_monetization_region_prices(package_name, convert_region_prices_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2071
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/pricing:convertRegionPrices', options)
2072
+ command.request_representation = Google::Apis::AndroidpublisherV3::ConvertRegionPricesRequest::Representation
2073
+ command.request_object = convert_region_prices_request_object
2074
+ command.response_representation = Google::Apis::AndroidpublisherV3::ConvertRegionPricesResponse::Representation
2075
+ command.response_class = Google::Apis::AndroidpublisherV3::ConvertRegionPricesResponse
1747
2076
  command.params['packageName'] = package_name unless package_name.nil?
1748
- command.params['orderId'] = order_id unless order_id.nil?
1749
- command.query['revoke'] = revoke unless revoke.nil?
1750
2077
  command.query['fields'] = fields unless fields.nil?
1751
2078
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1752
2079
  execute_or_queue_command(command, &block)
1753
2080
  end
1754
2081
 
1755
- # Acknowledges a purchase of an inapp item.
2082
+ # Archives a subscription. Can only be done if at least one base plan was active
2083
+ # in the past, and no base plan is available for new or existing subscribers
2084
+ # currently. This action is irreversible, and the subscription ID will remain
2085
+ # reserved.
1756
2086
  # @param [String] package_name
1757
- # The package name of the application the inapp product was sold in (for example,
1758
- # 'com.some.thing').
2087
+ # Required. The parent app (package name) of the app of the subscription to
2088
+ # delete.
1759
2089
  # @param [String] product_id
1760
- # The inapp product SKU (for example, 'com.some.thing.inapp1').
1761
- # @param [String] token
1762
- # The token provided to the user's device when the inapp product was purchased.
1763
- # @param [Google::Apis::AndroidpublisherV3::ProductPurchasesAcknowledgeRequest] product_purchases_acknowledge_request_object
2090
+ # Required. The unique product ID of the subscription to delete.
2091
+ # @param [Google::Apis::AndroidpublisherV3::ArchiveSubscriptionRequest] archive_subscription_request_object
1764
2092
  # @param [String] fields
1765
2093
  # Selector specifying which fields to include in a partial response.
1766
2094
  # @param [String] quota_user
@@ -1770,34 +2098,792 @@ module Google
1770
2098
  # Request-specific options
1771
2099
  #
1772
2100
  # @yield [result, err] Result & error if block supplied
1773
- # @yieldparam result [NilClass] No result returned for this method
2101
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::Subscription] parsed result object
1774
2102
  # @yieldparam err [StandardError] error object if request failed
1775
2103
  #
1776
- # @return [void]
2104
+ # @return [Google::Apis::AndroidpublisherV3::Subscription]
1777
2105
  #
1778
2106
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1779
2107
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1780
2108
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1781
- def acknowledge_purchase_product(package_name, product_id, token, product_purchases_acknowledge_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1782
- command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/purchases/products/{productId}/tokens/{token}:acknowledge', options)
1783
- command.request_representation = Google::Apis::AndroidpublisherV3::ProductPurchasesAcknowledgeRequest::Representation
1784
- command.request_object = product_purchases_acknowledge_request_object
2109
+ def archive_subscription(package_name, product_id, archive_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2110
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}:archive', options)
2111
+ command.request_representation = Google::Apis::AndroidpublisherV3::ArchiveSubscriptionRequest::Representation
2112
+ command.request_object = archive_subscription_request_object
2113
+ command.response_representation = Google::Apis::AndroidpublisherV3::Subscription::Representation
2114
+ command.response_class = Google::Apis::AndroidpublisherV3::Subscription
1785
2115
  command.params['packageName'] = package_name unless package_name.nil?
1786
2116
  command.params['productId'] = product_id unless product_id.nil?
1787
- command.params['token'] = token unless token.nil?
1788
2117
  command.query['fields'] = fields unless fields.nil?
1789
2118
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1790
2119
  execute_or_queue_command(command, &block)
1791
2120
  end
1792
2121
 
1793
- # Checks the purchase and consumption status of an inapp item.
2122
+ # Creates a new subscription. Newly added base plans will remain in draft state
2123
+ # until activated.
1794
2124
  # @param [String] package_name
1795
- # The package name of the application the inapp product was sold in (for example,
1796
- # 'com.some.thing').
2125
+ # Required. The parent app (package name) for which the subscription should be
2126
+ # created. Must be equal to the package_name field on the Subscription resource.
2127
+ # @param [Google::Apis::AndroidpublisherV3::Subscription] subscription_object
1797
2128
  # @param [String] product_id
1798
- # The inapp product SKU (for example, 'com.some.thing.inapp1').
1799
- # @param [String] token
1800
- # The token provided to the user's device when the inapp product was purchased.
2129
+ # Required. The ID to use for the subscription. For the requirements on this
2130
+ # format, see the documentation of the product_id field on the Subscription
2131
+ # resource.
2132
+ # @param [String] regions_version_version
2133
+ # Required. A string representing version of the available regions being used
2134
+ # for the specified resource.
2135
+ # @param [String] fields
2136
+ # Selector specifying which fields to include in a partial response.
2137
+ # @param [String] quota_user
2138
+ # Available to use for quota purposes for server-side applications. Can be any
2139
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2140
+ # @param [Google::Apis::RequestOptions] options
2141
+ # Request-specific options
2142
+ #
2143
+ # @yield [result, err] Result & error if block supplied
2144
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::Subscription] parsed result object
2145
+ # @yieldparam err [StandardError] error object if request failed
2146
+ #
2147
+ # @return [Google::Apis::AndroidpublisherV3::Subscription]
2148
+ #
2149
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2150
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2151
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2152
+ def create_monetization_subscription(package_name, subscription_object = nil, product_id: nil, regions_version_version: nil, fields: nil, quota_user: nil, options: nil, &block)
2153
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/subscriptions', options)
2154
+ command.request_representation = Google::Apis::AndroidpublisherV3::Subscription::Representation
2155
+ command.request_object = subscription_object
2156
+ command.response_representation = Google::Apis::AndroidpublisherV3::Subscription::Representation
2157
+ command.response_class = Google::Apis::AndroidpublisherV3::Subscription
2158
+ command.params['packageName'] = package_name unless package_name.nil?
2159
+ command.query['productId'] = product_id unless product_id.nil?
2160
+ command.query['regionsVersion.version'] = regions_version_version unless regions_version_version.nil?
2161
+ command.query['fields'] = fields unless fields.nil?
2162
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2163
+ execute_or_queue_command(command, &block)
2164
+ end
2165
+
2166
+ # Deletes a subscription. A subscription can only be deleted if it has never had
2167
+ # a base plan published.
2168
+ # @param [String] package_name
2169
+ # Required. The parent app (package name) of the app of the subscription to
2170
+ # delete.
2171
+ # @param [String] product_id
2172
+ # Required. The unique product ID of the subscription to delete.
2173
+ # @param [String] fields
2174
+ # Selector specifying which fields to include in a partial response.
2175
+ # @param [String] quota_user
2176
+ # Available to use for quota purposes for server-side applications. Can be any
2177
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2178
+ # @param [Google::Apis::RequestOptions] options
2179
+ # Request-specific options
2180
+ #
2181
+ # @yield [result, err] Result & error if block supplied
2182
+ # @yieldparam result [NilClass] No result returned for this method
2183
+ # @yieldparam err [StandardError] error object if request failed
2184
+ #
2185
+ # @return [void]
2186
+ #
2187
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2188
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2189
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2190
+ def delete_monetization_subscription(package_name, product_id, fields: nil, quota_user: nil, options: nil, &block)
2191
+ command = make_simple_command(:delete, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}', options)
2192
+ command.params['packageName'] = package_name unless package_name.nil?
2193
+ command.params['productId'] = product_id unless product_id.nil?
2194
+ command.query['fields'] = fields unless fields.nil?
2195
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2196
+ execute_or_queue_command(command, &block)
2197
+ end
2198
+
2199
+ # Reads a single subscription.
2200
+ # @param [String] package_name
2201
+ # Required. The parent app (package name) of the subscription to get.
2202
+ # @param [String] product_id
2203
+ # Required. The unique product ID of the subscription to get.
2204
+ # @param [String] fields
2205
+ # Selector specifying which fields to include in a partial response.
2206
+ # @param [String] quota_user
2207
+ # Available to use for quota purposes for server-side applications. Can be any
2208
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2209
+ # @param [Google::Apis::RequestOptions] options
2210
+ # Request-specific options
2211
+ #
2212
+ # @yield [result, err] Result & error if block supplied
2213
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::Subscription] parsed result object
2214
+ # @yieldparam err [StandardError] error object if request failed
2215
+ #
2216
+ # @return [Google::Apis::AndroidpublisherV3::Subscription]
2217
+ #
2218
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2219
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2220
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2221
+ def get_monetization_subscription(package_name, product_id, fields: nil, quota_user: nil, options: nil, &block)
2222
+ command = make_simple_command(:get, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}', options)
2223
+ command.response_representation = Google::Apis::AndroidpublisherV3::Subscription::Representation
2224
+ command.response_class = Google::Apis::AndroidpublisherV3::Subscription
2225
+ command.params['packageName'] = package_name unless package_name.nil?
2226
+ command.params['productId'] = product_id unless product_id.nil?
2227
+ command.query['fields'] = fields unless fields.nil?
2228
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2229
+ execute_or_queue_command(command, &block)
2230
+ end
2231
+
2232
+ # Lists all subscriptions under a given app.
2233
+ # @param [String] package_name
2234
+ # Required. The parent app (package name) for which the subscriptions should be
2235
+ # read.
2236
+ # @param [Fixnum] page_size
2237
+ # The maximum number of subscriptions to return. The service may return fewer
2238
+ # than this value. If unspecified, at most 50 subscriptions will be returned.
2239
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
2240
+ # @param [String] page_token
2241
+ # A page token, received from a previous `ListSubscriptions` call. Provide this
2242
+ # to retrieve the subsequent page. When paginating, all other parameters
2243
+ # provided to `ListSubscriptions` must match the call that provided the page
2244
+ # token.
2245
+ # @param [Boolean] show_archived
2246
+ # Whether archived subscriptions should be included in the response. Defaults to
2247
+ # false.
2248
+ # @param [String] fields
2249
+ # Selector specifying which fields to include in a partial response.
2250
+ # @param [String] quota_user
2251
+ # Available to use for quota purposes for server-side applications. Can be any
2252
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2253
+ # @param [Google::Apis::RequestOptions] options
2254
+ # Request-specific options
2255
+ #
2256
+ # @yield [result, err] Result & error if block supplied
2257
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::ListSubscriptionsResponse] parsed result object
2258
+ # @yieldparam err [StandardError] error object if request failed
2259
+ #
2260
+ # @return [Google::Apis::AndroidpublisherV3::ListSubscriptionsResponse]
2261
+ #
2262
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2263
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2264
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2265
+ def list_monetization_subscriptions(package_name, page_size: nil, page_token: nil, show_archived: nil, fields: nil, quota_user: nil, options: nil, &block)
2266
+ command = make_simple_command(:get, 'androidpublisher/v3/applications/{packageName}/subscriptions', options)
2267
+ command.response_representation = Google::Apis::AndroidpublisherV3::ListSubscriptionsResponse::Representation
2268
+ command.response_class = Google::Apis::AndroidpublisherV3::ListSubscriptionsResponse
2269
+ command.params['packageName'] = package_name unless package_name.nil?
2270
+ command.query['pageSize'] = page_size unless page_size.nil?
2271
+ command.query['pageToken'] = page_token unless page_token.nil?
2272
+ command.query['showArchived'] = show_archived unless show_archived.nil?
2273
+ command.query['fields'] = fields unless fields.nil?
2274
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2275
+ execute_or_queue_command(command, &block)
2276
+ end
2277
+
2278
+ # Updates an existing subscription.
2279
+ # @param [String] package_name
2280
+ # Immutable. Package name of the parent app.
2281
+ # @param [String] product_id
2282
+ # Immutable. Unique product ID of the product. Unique within the parent app.
2283
+ # Product IDs must be composed of lower-case letters (a-z), numbers (0-9),
2284
+ # underscores (_) and dots (.). It must start with a lower-case letter or number,
2285
+ # and be between 1 and 40 (inclusive) characters in length.
2286
+ # @param [Google::Apis::AndroidpublisherV3::Subscription] subscription_object
2287
+ # @param [String] regions_version_version
2288
+ # Required. A string representing version of the available regions being used
2289
+ # for the specified resource.
2290
+ # @param [String] update_mask
2291
+ # Required. The list of fields to be updated.
2292
+ # @param [String] fields
2293
+ # Selector specifying which fields to include in a partial response.
2294
+ # @param [String] quota_user
2295
+ # Available to use for quota purposes for server-side applications. Can be any
2296
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2297
+ # @param [Google::Apis::RequestOptions] options
2298
+ # Request-specific options
2299
+ #
2300
+ # @yield [result, err] Result & error if block supplied
2301
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::Subscription] parsed result object
2302
+ # @yieldparam err [StandardError] error object if request failed
2303
+ #
2304
+ # @return [Google::Apis::AndroidpublisherV3::Subscription]
2305
+ #
2306
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2307
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2308
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2309
+ def patch_monetization_subscription(package_name, product_id, subscription_object = nil, regions_version_version: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2310
+ command = make_simple_command(:patch, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}', options)
2311
+ command.request_representation = Google::Apis::AndroidpublisherV3::Subscription::Representation
2312
+ command.request_object = subscription_object
2313
+ command.response_representation = Google::Apis::AndroidpublisherV3::Subscription::Representation
2314
+ command.response_class = Google::Apis::AndroidpublisherV3::Subscription
2315
+ command.params['packageName'] = package_name unless package_name.nil?
2316
+ command.params['productId'] = product_id unless product_id.nil?
2317
+ command.query['regionsVersion.version'] = regions_version_version unless regions_version_version.nil?
2318
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2319
+ command.query['fields'] = fields unless fields.nil?
2320
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2321
+ execute_or_queue_command(command, &block)
2322
+ end
2323
+
2324
+ # Activates a base plan. Once activated, base plans will be available to new
2325
+ # subscribers.
2326
+ # @param [String] package_name
2327
+ # Required. The parent app (package name) of the base plan to activate.
2328
+ # @param [String] product_id
2329
+ # Required. The parent subscription (ID) of the base plan to activate.
2330
+ # @param [String] base_plan_id
2331
+ # Required. The unique base plan ID of the base plan to activate.
2332
+ # @param [Google::Apis::AndroidpublisherV3::ActivateBasePlanRequest] activate_base_plan_request_object
2333
+ # @param [String] fields
2334
+ # Selector specifying which fields to include in a partial response.
2335
+ # @param [String] quota_user
2336
+ # Available to use for quota purposes for server-side applications. Can be any
2337
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2338
+ # @param [Google::Apis::RequestOptions] options
2339
+ # Request-specific options
2340
+ #
2341
+ # @yield [result, err] Result & error if block supplied
2342
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::Subscription] parsed result object
2343
+ # @yieldparam err [StandardError] error object if request failed
2344
+ #
2345
+ # @return [Google::Apis::AndroidpublisherV3::Subscription]
2346
+ #
2347
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2348
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2349
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2350
+ def activate_base_plan(package_name, product_id, base_plan_id, activate_base_plan_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2351
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}:activate', options)
2352
+ command.request_representation = Google::Apis::AndroidpublisherV3::ActivateBasePlanRequest::Representation
2353
+ command.request_object = activate_base_plan_request_object
2354
+ command.response_representation = Google::Apis::AndroidpublisherV3::Subscription::Representation
2355
+ command.response_class = Google::Apis::AndroidpublisherV3::Subscription
2356
+ command.params['packageName'] = package_name unless package_name.nil?
2357
+ command.params['productId'] = product_id unless product_id.nil?
2358
+ command.params['basePlanId'] = base_plan_id unless base_plan_id.nil?
2359
+ command.query['fields'] = fields unless fields.nil?
2360
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2361
+ execute_or_queue_command(command, &block)
2362
+ end
2363
+
2364
+ # Deactivates a base plan. Once deactivated, the base plan will become
2365
+ # unavailable to new subscribers, but existing subscribers will maintain their
2366
+ # subscription
2367
+ # @param [String] package_name
2368
+ # Required. The parent app (package name) of the base plan to deactivate.
2369
+ # @param [String] product_id
2370
+ # Required. The parent subscription (ID) of the base plan to deactivate.
2371
+ # @param [String] base_plan_id
2372
+ # Required. The unique base plan ID of the base plan to deactivate.
2373
+ # @param [Google::Apis::AndroidpublisherV3::DeactivateBasePlanRequest] deactivate_base_plan_request_object
2374
+ # @param [String] fields
2375
+ # Selector specifying which fields to include in a partial response.
2376
+ # @param [String] quota_user
2377
+ # Available to use for quota purposes for server-side applications. Can be any
2378
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2379
+ # @param [Google::Apis::RequestOptions] options
2380
+ # Request-specific options
2381
+ #
2382
+ # @yield [result, err] Result & error if block supplied
2383
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::Subscription] parsed result object
2384
+ # @yieldparam err [StandardError] error object if request failed
2385
+ #
2386
+ # @return [Google::Apis::AndroidpublisherV3::Subscription]
2387
+ #
2388
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2389
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2390
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2391
+ def deactivate_base_plan(package_name, product_id, base_plan_id, deactivate_base_plan_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2392
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}:deactivate', options)
2393
+ command.request_representation = Google::Apis::AndroidpublisherV3::DeactivateBasePlanRequest::Representation
2394
+ command.request_object = deactivate_base_plan_request_object
2395
+ command.response_representation = Google::Apis::AndroidpublisherV3::Subscription::Representation
2396
+ command.response_class = Google::Apis::AndroidpublisherV3::Subscription
2397
+ command.params['packageName'] = package_name unless package_name.nil?
2398
+ command.params['productId'] = product_id unless product_id.nil?
2399
+ command.params['basePlanId'] = base_plan_id unless base_plan_id.nil?
2400
+ command.query['fields'] = fields unless fields.nil?
2401
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2402
+ execute_or_queue_command(command, &block)
2403
+ end
2404
+
2405
+ # Deletes a base plan. Can only be done for draft base plans. This action is
2406
+ # irreversible.
2407
+ # @param [String] package_name
2408
+ # Required. The parent app (package name) of the base plan to delete.
2409
+ # @param [String] product_id
2410
+ # Required. The parent subscription (ID) of the base plan to delete.
2411
+ # @param [String] base_plan_id
2412
+ # Required. The unique offer ID of the base plan to delete.
2413
+ # @param [String] fields
2414
+ # Selector specifying which fields to include in a partial response.
2415
+ # @param [String] quota_user
2416
+ # Available to use for quota purposes for server-side applications. Can be any
2417
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2418
+ # @param [Google::Apis::RequestOptions] options
2419
+ # Request-specific options
2420
+ #
2421
+ # @yield [result, err] Result & error if block supplied
2422
+ # @yieldparam result [NilClass] No result returned for this method
2423
+ # @yieldparam err [StandardError] error object if request failed
2424
+ #
2425
+ # @return [void]
2426
+ #
2427
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2428
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2429
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2430
+ def delete_monetization_subscription_base_plan(package_name, product_id, base_plan_id, fields: nil, quota_user: nil, options: nil, &block)
2431
+ command = make_simple_command(:delete, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}', options)
2432
+ command.params['packageName'] = package_name unless package_name.nil?
2433
+ command.params['productId'] = product_id unless product_id.nil?
2434
+ command.params['basePlanId'] = base_plan_id unless base_plan_id.nil?
2435
+ command.query['fields'] = fields unless fields.nil?
2436
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2437
+ execute_or_queue_command(command, &block)
2438
+ end
2439
+
2440
+ # Migrates subscribers who are receiving an historical subscription price to the
2441
+ # currently-offered price for the specified region. Requests will cause price
2442
+ # change notifications to be sent to users who are currently receiving an
2443
+ # historical price older than the supplied timestamp. Subscribers who do not
2444
+ # agree to the new price will have their subscription ended at the next renewal.
2445
+ # @param [String] package_name
2446
+ # Required. Package name of the parent app. Must be equal to the package_name
2447
+ # field on the Subscription resource.
2448
+ # @param [String] product_id
2449
+ # Required. The ID of the subscription to update. Must be equal to the
2450
+ # product_id field on the Subscription resource.
2451
+ # @param [String] base_plan_id
2452
+ # Required. The unique base plan ID of the base plan to update prices on.
2453
+ # @param [Google::Apis::AndroidpublisherV3::MigrateBasePlanPricesRequest] migrate_base_plan_prices_request_object
2454
+ # @param [String] fields
2455
+ # Selector specifying which fields to include in a partial response.
2456
+ # @param [String] quota_user
2457
+ # Available to use for quota purposes for server-side applications. Can be any
2458
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2459
+ # @param [Google::Apis::RequestOptions] options
2460
+ # Request-specific options
2461
+ #
2462
+ # @yield [result, err] Result & error if block supplied
2463
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::MigrateBasePlanPricesResponse] parsed result object
2464
+ # @yieldparam err [StandardError] error object if request failed
2465
+ #
2466
+ # @return [Google::Apis::AndroidpublisherV3::MigrateBasePlanPricesResponse]
2467
+ #
2468
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2469
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2470
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2471
+ def migrate_monetization_subscription_base_plan_prices(package_name, product_id, base_plan_id, migrate_base_plan_prices_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2472
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}:migratePrices', options)
2473
+ command.request_representation = Google::Apis::AndroidpublisherV3::MigrateBasePlanPricesRequest::Representation
2474
+ command.request_object = migrate_base_plan_prices_request_object
2475
+ command.response_representation = Google::Apis::AndroidpublisherV3::MigrateBasePlanPricesResponse::Representation
2476
+ command.response_class = Google::Apis::AndroidpublisherV3::MigrateBasePlanPricesResponse
2477
+ command.params['packageName'] = package_name unless package_name.nil?
2478
+ command.params['productId'] = product_id unless product_id.nil?
2479
+ command.params['basePlanId'] = base_plan_id unless base_plan_id.nil?
2480
+ command.query['fields'] = fields unless fields.nil?
2481
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2482
+ execute_or_queue_command(command, &block)
2483
+ end
2484
+
2485
+ # Activates a subscription offer. Once activated, subscription offers will be
2486
+ # available to new subscribers.
2487
+ # @param [String] package_name
2488
+ # Required. The parent app (package name) of the offer to activate.
2489
+ # @param [String] product_id
2490
+ # Required. The parent subscription (ID) of the offer to activate.
2491
+ # @param [String] base_plan_id
2492
+ # Required. The parent base plan (ID) of the offer to activate.
2493
+ # @param [String] offer_id
2494
+ # Required. The unique offer ID of the offer to activate.
2495
+ # @param [Google::Apis::AndroidpublisherV3::ActivateSubscriptionOfferRequest] activate_subscription_offer_request_object
2496
+ # @param [String] fields
2497
+ # Selector specifying which fields to include in a partial response.
2498
+ # @param [String] quota_user
2499
+ # Available to use for quota purposes for server-side applications. Can be any
2500
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2501
+ # @param [Google::Apis::RequestOptions] options
2502
+ # Request-specific options
2503
+ #
2504
+ # @yield [result, err] Result & error if block supplied
2505
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::SubscriptionOffer] parsed result object
2506
+ # @yieldparam err [StandardError] error object if request failed
2507
+ #
2508
+ # @return [Google::Apis::AndroidpublisherV3::SubscriptionOffer]
2509
+ #
2510
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2511
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2512
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2513
+ def activate_subscription_offer(package_name, product_id, base_plan_id, offer_id, activate_subscription_offer_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2514
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers/{offerId}:activate', options)
2515
+ command.request_representation = Google::Apis::AndroidpublisherV3::ActivateSubscriptionOfferRequest::Representation
2516
+ command.request_object = activate_subscription_offer_request_object
2517
+ command.response_representation = Google::Apis::AndroidpublisherV3::SubscriptionOffer::Representation
2518
+ command.response_class = Google::Apis::AndroidpublisherV3::SubscriptionOffer
2519
+ command.params['packageName'] = package_name unless package_name.nil?
2520
+ command.params['productId'] = product_id unless product_id.nil?
2521
+ command.params['basePlanId'] = base_plan_id unless base_plan_id.nil?
2522
+ command.params['offerId'] = offer_id unless offer_id.nil?
2523
+ command.query['fields'] = fields unless fields.nil?
2524
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2525
+ execute_or_queue_command(command, &block)
2526
+ end
2527
+
2528
+ # Creates a new subscription offer. Only auto-renewing base plans can have
2529
+ # subscription offers. The offer state will be DRAFT until it is activated.
2530
+ # @param [String] package_name
2531
+ # Required. The parent app (package name) for which the offer should be created.
2532
+ # Must be equal to the package_name field on the Subscription resource.
2533
+ # @param [String] product_id
2534
+ # Required. The parent subscription (ID) for which the offer should be created.
2535
+ # Must be equal to the product_id field on the SubscriptionOffer resource.
2536
+ # @param [String] base_plan_id
2537
+ # Required. The parent base plan (ID) for which the offer should be created.
2538
+ # Must be equal to the base_plan_id field on the SubscriptionOffer resource.
2539
+ # @param [Google::Apis::AndroidpublisherV3::SubscriptionOffer] subscription_offer_object
2540
+ # @param [String] offer_id
2541
+ # Required. The ID to use for the offer. For the requirements on this format,
2542
+ # see the documentation of the offer_id field on the SubscriptionOffer resource.
2543
+ # @param [String] regions_version_version
2544
+ # Required. A string representing version of the available regions being used
2545
+ # for the specified resource.
2546
+ # @param [String] fields
2547
+ # Selector specifying which fields to include in a partial response.
2548
+ # @param [String] quota_user
2549
+ # Available to use for quota purposes for server-side applications. Can be any
2550
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2551
+ # @param [Google::Apis::RequestOptions] options
2552
+ # Request-specific options
2553
+ #
2554
+ # @yield [result, err] Result & error if block supplied
2555
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::SubscriptionOffer] parsed result object
2556
+ # @yieldparam err [StandardError] error object if request failed
2557
+ #
2558
+ # @return [Google::Apis::AndroidpublisherV3::SubscriptionOffer]
2559
+ #
2560
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2561
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2562
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2563
+ def create_monetization_subscription_base_plan_offer(package_name, product_id, base_plan_id, subscription_offer_object = nil, offer_id: nil, regions_version_version: nil, fields: nil, quota_user: nil, options: nil, &block)
2564
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers', options)
2565
+ command.request_representation = Google::Apis::AndroidpublisherV3::SubscriptionOffer::Representation
2566
+ command.request_object = subscription_offer_object
2567
+ command.response_representation = Google::Apis::AndroidpublisherV3::SubscriptionOffer::Representation
2568
+ command.response_class = Google::Apis::AndroidpublisherV3::SubscriptionOffer
2569
+ command.params['packageName'] = package_name unless package_name.nil?
2570
+ command.params['productId'] = product_id unless product_id.nil?
2571
+ command.params['basePlanId'] = base_plan_id unless base_plan_id.nil?
2572
+ command.query['offerId'] = offer_id unless offer_id.nil?
2573
+ command.query['regionsVersion.version'] = regions_version_version unless regions_version_version.nil?
2574
+ command.query['fields'] = fields unless fields.nil?
2575
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2576
+ execute_or_queue_command(command, &block)
2577
+ end
2578
+
2579
+ # Deactivates a subscription offer. Once deactivated, existing subscribers will
2580
+ # maintain their subscription, but the offer will become unavailable to new
2581
+ # subscribers.
2582
+ # @param [String] package_name
2583
+ # Required. The parent app (package name) of the offer to deactivate.
2584
+ # @param [String] product_id
2585
+ # Required. The parent subscription (ID) of the offer to deactivate.
2586
+ # @param [String] base_plan_id
2587
+ # Required. The parent base plan (ID) of the offer to deactivate.
2588
+ # @param [String] offer_id
2589
+ # Required. The unique offer ID of the offer to deactivate.
2590
+ # @param [Google::Apis::AndroidpublisherV3::DeactivateSubscriptionOfferRequest] deactivate_subscription_offer_request_object
2591
+ # @param [String] fields
2592
+ # Selector specifying which fields to include in a partial response.
2593
+ # @param [String] quota_user
2594
+ # Available to use for quota purposes for server-side applications. Can be any
2595
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2596
+ # @param [Google::Apis::RequestOptions] options
2597
+ # Request-specific options
2598
+ #
2599
+ # @yield [result, err] Result & error if block supplied
2600
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::SubscriptionOffer] parsed result object
2601
+ # @yieldparam err [StandardError] error object if request failed
2602
+ #
2603
+ # @return [Google::Apis::AndroidpublisherV3::SubscriptionOffer]
2604
+ #
2605
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2606
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2607
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2608
+ def deactivate_subscription_offer(package_name, product_id, base_plan_id, offer_id, deactivate_subscription_offer_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2609
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers/{offerId}:deactivate', options)
2610
+ command.request_representation = Google::Apis::AndroidpublisherV3::DeactivateSubscriptionOfferRequest::Representation
2611
+ command.request_object = deactivate_subscription_offer_request_object
2612
+ command.response_representation = Google::Apis::AndroidpublisherV3::SubscriptionOffer::Representation
2613
+ command.response_class = Google::Apis::AndroidpublisherV3::SubscriptionOffer
2614
+ command.params['packageName'] = package_name unless package_name.nil?
2615
+ command.params['productId'] = product_id unless product_id.nil?
2616
+ command.params['basePlanId'] = base_plan_id unless base_plan_id.nil?
2617
+ command.params['offerId'] = offer_id unless offer_id.nil?
2618
+ command.query['fields'] = fields unless fields.nil?
2619
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2620
+ execute_or_queue_command(command, &block)
2621
+ end
2622
+
2623
+ # Deletes a subscription offer. Can only be done for draft offers. This action
2624
+ # is irreversible.
2625
+ # @param [String] package_name
2626
+ # Required. The parent app (package name) of the offer to delete.
2627
+ # @param [String] product_id
2628
+ # Required. The parent subscription (ID) of the offer to delete.
2629
+ # @param [String] base_plan_id
2630
+ # Required. The parent base plan (ID) of the offer to delete.
2631
+ # @param [String] offer_id
2632
+ # Required. The unique offer ID of the offer to delete.
2633
+ # @param [String] fields
2634
+ # Selector specifying which fields to include in a partial response.
2635
+ # @param [String] quota_user
2636
+ # Available to use for quota purposes for server-side applications. Can be any
2637
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2638
+ # @param [Google::Apis::RequestOptions] options
2639
+ # Request-specific options
2640
+ #
2641
+ # @yield [result, err] Result & error if block supplied
2642
+ # @yieldparam result [NilClass] No result returned for this method
2643
+ # @yieldparam err [StandardError] error object if request failed
2644
+ #
2645
+ # @return [void]
2646
+ #
2647
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2648
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2649
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2650
+ def delete_monetization_subscription_base_plan_offer(package_name, product_id, base_plan_id, offer_id, fields: nil, quota_user: nil, options: nil, &block)
2651
+ command = make_simple_command(:delete, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers/{offerId}', options)
2652
+ command.params['packageName'] = package_name unless package_name.nil?
2653
+ command.params['productId'] = product_id unless product_id.nil?
2654
+ command.params['basePlanId'] = base_plan_id unless base_plan_id.nil?
2655
+ command.params['offerId'] = offer_id unless offer_id.nil?
2656
+ command.query['fields'] = fields unless fields.nil?
2657
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2658
+ execute_or_queue_command(command, &block)
2659
+ end
2660
+
2661
+ # Reads a single offer
2662
+ # @param [String] package_name
2663
+ # Required. The parent app (package name) of the offer to get.
2664
+ # @param [String] product_id
2665
+ # Required. The parent subscription (ID) of the offer to get.
2666
+ # @param [String] base_plan_id
2667
+ # Required. The parent base plan (ID) of the offer to get.
2668
+ # @param [String] offer_id
2669
+ # Required. The unique offer ID of the offer to get.
2670
+ # @param [String] fields
2671
+ # Selector specifying which fields to include in a partial response.
2672
+ # @param [String] quota_user
2673
+ # Available to use for quota purposes for server-side applications. Can be any
2674
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2675
+ # @param [Google::Apis::RequestOptions] options
2676
+ # Request-specific options
2677
+ #
2678
+ # @yield [result, err] Result & error if block supplied
2679
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::SubscriptionOffer] parsed result object
2680
+ # @yieldparam err [StandardError] error object if request failed
2681
+ #
2682
+ # @return [Google::Apis::AndroidpublisherV3::SubscriptionOffer]
2683
+ #
2684
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2685
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2686
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2687
+ def get_monetization_subscription_base_plan_offer(package_name, product_id, base_plan_id, offer_id, fields: nil, quota_user: nil, options: nil, &block)
2688
+ command = make_simple_command(:get, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers/{offerId}', options)
2689
+ command.response_representation = Google::Apis::AndroidpublisherV3::SubscriptionOffer::Representation
2690
+ command.response_class = Google::Apis::AndroidpublisherV3::SubscriptionOffer
2691
+ command.params['packageName'] = package_name unless package_name.nil?
2692
+ command.params['productId'] = product_id unless product_id.nil?
2693
+ command.params['basePlanId'] = base_plan_id unless base_plan_id.nil?
2694
+ command.params['offerId'] = offer_id unless offer_id.nil?
2695
+ command.query['fields'] = fields unless fields.nil?
2696
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2697
+ execute_or_queue_command(command, &block)
2698
+ end
2699
+
2700
+ # Lists all offers under a given subscription.
2701
+ # @param [String] package_name
2702
+ # Required. The parent app (package name) for which the subscriptions should be
2703
+ # read.
2704
+ # @param [String] product_id
2705
+ # Required. The parent subscription (ID) for which the offers should be read.
2706
+ # @param [String] base_plan_id
2707
+ # Required. The parent base plan (ID) for which the offers should be read. May
2708
+ # be specified as '-' to read all offers under a subscription.
2709
+ # @param [Fixnum] page_size
2710
+ # The maximum number of subscriptions to return. The service may return fewer
2711
+ # than this value. If unspecified, at most 50 subscriptions will be returned.
2712
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
2713
+ # @param [String] page_token
2714
+ # A page token, received from a previous `ListSubscriptionsOffers` call. Provide
2715
+ # this to retrieve the subsequent page. When paginating, all other parameters
2716
+ # provided to `ListSubscriptionOffers` must match the call that provided the
2717
+ # page token.
2718
+ # @param [String] fields
2719
+ # Selector specifying which fields to include in a partial response.
2720
+ # @param [String] quota_user
2721
+ # Available to use for quota purposes for server-side applications. Can be any
2722
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2723
+ # @param [Google::Apis::RequestOptions] options
2724
+ # Request-specific options
2725
+ #
2726
+ # @yield [result, err] Result & error if block supplied
2727
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::ListSubscriptionOffersResponse] parsed result object
2728
+ # @yieldparam err [StandardError] error object if request failed
2729
+ #
2730
+ # @return [Google::Apis::AndroidpublisherV3::ListSubscriptionOffersResponse]
2731
+ #
2732
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2733
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2734
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2735
+ def list_monetization_subscription_base_plan_offers(package_name, product_id, base_plan_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2736
+ command = make_simple_command(:get, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers', options)
2737
+ command.response_representation = Google::Apis::AndroidpublisherV3::ListSubscriptionOffersResponse::Representation
2738
+ command.response_class = Google::Apis::AndroidpublisherV3::ListSubscriptionOffersResponse
2739
+ command.params['packageName'] = package_name unless package_name.nil?
2740
+ command.params['productId'] = product_id unless product_id.nil?
2741
+ command.params['basePlanId'] = base_plan_id unless base_plan_id.nil?
2742
+ command.query['pageSize'] = page_size unless page_size.nil?
2743
+ command.query['pageToken'] = page_token unless page_token.nil?
2744
+ command.query['fields'] = fields unless fields.nil?
2745
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2746
+ execute_or_queue_command(command, &block)
2747
+ end
2748
+
2749
+ # Updates an existing subscription offer.
2750
+ # @param [String] package_name
2751
+ # Required. Immutable. The package name of the app the parent subscription
2752
+ # belongs to.
2753
+ # @param [String] product_id
2754
+ # Required. Immutable. The ID of the parent subscription this offer belongs to.
2755
+ # @param [String] base_plan_id
2756
+ # Required. Immutable. The ID of the base plan to which this offer is an
2757
+ # extension.
2758
+ # @param [String] offer_id
2759
+ # Required. Immutable. Unique ID of this subscription offer. Must be unique
2760
+ # within the base plan.
2761
+ # @param [Google::Apis::AndroidpublisherV3::SubscriptionOffer] subscription_offer_object
2762
+ # @param [String] regions_version_version
2763
+ # Required. A string representing version of the available regions being used
2764
+ # for the specified resource.
2765
+ # @param [String] update_mask
2766
+ # Required. The list of fields to be updated.
2767
+ # @param [String] fields
2768
+ # Selector specifying which fields to include in a partial response.
2769
+ # @param [String] quota_user
2770
+ # Available to use for quota purposes for server-side applications. Can be any
2771
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2772
+ # @param [Google::Apis::RequestOptions] options
2773
+ # Request-specific options
2774
+ #
2775
+ # @yield [result, err] Result & error if block supplied
2776
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::SubscriptionOffer] parsed result object
2777
+ # @yieldparam err [StandardError] error object if request failed
2778
+ #
2779
+ # @return [Google::Apis::AndroidpublisherV3::SubscriptionOffer]
2780
+ #
2781
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2782
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2783
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2784
+ def patch_monetization_subscription_base_plan_offer(package_name, product_id, base_plan_id, offer_id, subscription_offer_object = nil, regions_version_version: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2785
+ command = make_simple_command(:patch, 'androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers/{offerId}', options)
2786
+ command.request_representation = Google::Apis::AndroidpublisherV3::SubscriptionOffer::Representation
2787
+ command.request_object = subscription_offer_object
2788
+ command.response_representation = Google::Apis::AndroidpublisherV3::SubscriptionOffer::Representation
2789
+ command.response_class = Google::Apis::AndroidpublisherV3::SubscriptionOffer
2790
+ command.params['packageName'] = package_name unless package_name.nil?
2791
+ command.params['productId'] = product_id unless product_id.nil?
2792
+ command.params['basePlanId'] = base_plan_id unless base_plan_id.nil?
2793
+ command.params['offerId'] = offer_id unless offer_id.nil?
2794
+ command.query['regionsVersion.version'] = regions_version_version unless regions_version_version.nil?
2795
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2796
+ command.query['fields'] = fields unless fields.nil?
2797
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2798
+ execute_or_queue_command(command, &block)
2799
+ end
2800
+
2801
+ # Refunds a user's subscription or in-app purchase order. Orders older than 1
2802
+ # year cannot be refunded.
2803
+ # @param [String] package_name
2804
+ # The package name of the application for which this subscription or in-app item
2805
+ # was purchased (for example, 'com.some.thing').
2806
+ # @param [String] order_id
2807
+ # The order ID provided to the user when the subscription or in-app order was
2808
+ # purchased.
2809
+ # @param [Boolean] revoke
2810
+ # Whether to revoke the purchased item. If set to true, access to the
2811
+ # subscription or in-app item will be terminated immediately. If the item is a
2812
+ # recurring subscription, all future payments will also be terminated. Consumed
2813
+ # in-app items need to be handled by developer's app. (optional).
2814
+ # @param [String] fields
2815
+ # Selector specifying which fields to include in a partial response.
2816
+ # @param [String] quota_user
2817
+ # Available to use for quota purposes for server-side applications. Can be any
2818
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2819
+ # @param [Google::Apis::RequestOptions] options
2820
+ # Request-specific options
2821
+ #
2822
+ # @yield [result, err] Result & error if block supplied
2823
+ # @yieldparam result [NilClass] No result returned for this method
2824
+ # @yieldparam err [StandardError] error object if request failed
2825
+ #
2826
+ # @return [void]
2827
+ #
2828
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2829
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2830
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2831
+ def refund_order(package_name, order_id, revoke: nil, fields: nil, quota_user: nil, options: nil, &block)
2832
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/orders/{orderId}:refund', options)
2833
+ command.params['packageName'] = package_name unless package_name.nil?
2834
+ command.params['orderId'] = order_id unless order_id.nil?
2835
+ command.query['revoke'] = revoke unless revoke.nil?
2836
+ command.query['fields'] = fields unless fields.nil?
2837
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2838
+ execute_or_queue_command(command, &block)
2839
+ end
2840
+
2841
+ # Acknowledges a purchase of an inapp item.
2842
+ # @param [String] package_name
2843
+ # The package name of the application the inapp product was sold in (for example,
2844
+ # 'com.some.thing').
2845
+ # @param [String] product_id
2846
+ # The inapp product SKU (for example, 'com.some.thing.inapp1').
2847
+ # @param [String] token
2848
+ # The token provided to the user's device when the inapp product was purchased.
2849
+ # @param [Google::Apis::AndroidpublisherV3::ProductPurchasesAcknowledgeRequest] product_purchases_acknowledge_request_object
2850
+ # @param [String] fields
2851
+ # Selector specifying which fields to include in a partial response.
2852
+ # @param [String] quota_user
2853
+ # Available to use for quota purposes for server-side applications. Can be any
2854
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2855
+ # @param [Google::Apis::RequestOptions] options
2856
+ # Request-specific options
2857
+ #
2858
+ # @yield [result, err] Result & error if block supplied
2859
+ # @yieldparam result [NilClass] No result returned for this method
2860
+ # @yieldparam err [StandardError] error object if request failed
2861
+ #
2862
+ # @return [void]
2863
+ #
2864
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2865
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2866
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2867
+ def acknowledge_purchase_product(package_name, product_id, token, product_purchases_acknowledge_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2868
+ command = make_simple_command(:post, 'androidpublisher/v3/applications/{packageName}/purchases/products/{productId}/tokens/{token}:acknowledge', options)
2869
+ command.request_representation = Google::Apis::AndroidpublisherV3::ProductPurchasesAcknowledgeRequest::Representation
2870
+ command.request_object = product_purchases_acknowledge_request_object
2871
+ command.params['packageName'] = package_name unless package_name.nil?
2872
+ command.params['productId'] = product_id unless product_id.nil?
2873
+ command.params['token'] = token unless token.nil?
2874
+ command.query['fields'] = fields unless fields.nil?
2875
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2876
+ execute_or_queue_command(command, &block)
2877
+ end
2878
+
2879
+ # Checks the purchase and consumption status of an inapp item.
2880
+ # @param [String] package_name
2881
+ # The package name of the application the inapp product was sold in (for example,
2882
+ # 'com.some.thing').
2883
+ # @param [String] product_id
2884
+ # The inapp product SKU (for example, 'com.some.thing.inapp1').
2885
+ # @param [String] token
2886
+ # The token provided to the user's device when the inapp product was purchased.
1801
2887
  # @param [String] fields
1802
2888
  # Selector specifying which fields to include in a partial response.
1803
2889
  # @param [String] quota_user
@@ -2051,6 +3137,41 @@ module Google
2051
3137
  execute_or_queue_command(command, &block)
2052
3138
  end
2053
3139
 
3140
+ # Get metadata about a subscription
3141
+ # @param [String] package_name
3142
+ # The package of the application for which this subscription was purchased (for
3143
+ # example, 'com.some.thing').
3144
+ # @param [String] token
3145
+ # Required. The token provided to the user's device when the subscription was
3146
+ # purchased.
3147
+ # @param [String] fields
3148
+ # Selector specifying which fields to include in a partial response.
3149
+ # @param [String] quota_user
3150
+ # Available to use for quota purposes for server-side applications. Can be any
3151
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3152
+ # @param [Google::Apis::RequestOptions] options
3153
+ # Request-specific options
3154
+ #
3155
+ # @yield [result, err] Result & error if block supplied
3156
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::SubscriptionPurchaseV2] parsed result object
3157
+ # @yieldparam err [StandardError] error object if request failed
3158
+ #
3159
+ # @return [Google::Apis::AndroidpublisherV3::SubscriptionPurchaseV2]
3160
+ #
3161
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3162
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3163
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3164
+ def get_purchase_subscriptionsv2(package_name, token, fields: nil, quota_user: nil, options: nil, &block)
3165
+ command = make_simple_command(:get, 'androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}', options)
3166
+ command.response_representation = Google::Apis::AndroidpublisherV3::SubscriptionPurchaseV2::Representation
3167
+ command.response_class = Google::Apis::AndroidpublisherV3::SubscriptionPurchaseV2
3168
+ command.params['packageName'] = package_name unless package_name.nil?
3169
+ command.params['token'] = token unless token.nil?
3170
+ command.query['fields'] = fields unless fields.nil?
3171
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3172
+ execute_or_queue_command(command, &block)
3173
+ end
3174
+
2054
3175
  # Lists the purchases that were canceled, refunded or charged-back.
2055
3176
  # @param [String] package_name
2056
3177
  # The package name of the application for which voided purchases need to be
@@ -2382,6 +3503,145 @@ module Google
2382
3503
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2383
3504
  execute_or_queue_command(command, &block)
2384
3505
  end
3506
+
3507
+ # Grant access for a user to the given developer account.
3508
+ # @param [String] parent
3509
+ # Required. The developer account to add the user to. Format: developers/`
3510
+ # developer`
3511
+ # @param [Google::Apis::AndroidpublisherV3::User] user_object
3512
+ # @param [String] fields
3513
+ # Selector specifying which fields to include in a partial response.
3514
+ # @param [String] quota_user
3515
+ # Available to use for quota purposes for server-side applications. Can be any
3516
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3517
+ # @param [Google::Apis::RequestOptions] options
3518
+ # Request-specific options
3519
+ #
3520
+ # @yield [result, err] Result & error if block supplied
3521
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::User] parsed result object
3522
+ # @yieldparam err [StandardError] error object if request failed
3523
+ #
3524
+ # @return [Google::Apis::AndroidpublisherV3::User]
3525
+ #
3526
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3527
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3528
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3529
+ def create_user(parent, user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3530
+ command = make_simple_command(:post, 'androidpublisher/v3/{+parent}/users', options)
3531
+ command.request_representation = Google::Apis::AndroidpublisherV3::User::Representation
3532
+ command.request_object = user_object
3533
+ command.response_representation = Google::Apis::AndroidpublisherV3::User::Representation
3534
+ command.response_class = Google::Apis::AndroidpublisherV3::User
3535
+ command.params['parent'] = parent unless parent.nil?
3536
+ command.query['fields'] = fields unless fields.nil?
3537
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3538
+ execute_or_queue_command(command, &block)
3539
+ end
3540
+
3541
+ # Removes all access for the user to the given developer account.
3542
+ # @param [String] name
3543
+ # Required. The name of the user to delete. Format: developers/`developer`/users/
3544
+ # `email`
3545
+ # @param [String] fields
3546
+ # Selector specifying which fields to include in a partial response.
3547
+ # @param [String] quota_user
3548
+ # Available to use for quota purposes for server-side applications. Can be any
3549
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3550
+ # @param [Google::Apis::RequestOptions] options
3551
+ # Request-specific options
3552
+ #
3553
+ # @yield [result, err] Result & error if block supplied
3554
+ # @yieldparam result [NilClass] No result returned for this method
3555
+ # @yieldparam err [StandardError] error object if request failed
3556
+ #
3557
+ # @return [void]
3558
+ #
3559
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3560
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3561
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3562
+ def delete_user(name, fields: nil, quota_user: nil, options: nil, &block)
3563
+ command = make_simple_command(:delete, 'androidpublisher/v3/{+name}', options)
3564
+ command.params['name'] = name unless name.nil?
3565
+ command.query['fields'] = fields unless fields.nil?
3566
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3567
+ execute_or_queue_command(command, &block)
3568
+ end
3569
+
3570
+ # Lists all users with access to a developer account.
3571
+ # @param [String] parent
3572
+ # Required. The developer account to fetch users from. Format: developers/`
3573
+ # developer`
3574
+ # @param [Fixnum] page_size
3575
+ # The maximum number of results to return. This must be set to -1 to disable
3576
+ # pagination.
3577
+ # @param [String] page_token
3578
+ # A token received from a previous call to this method, in order to retrieve
3579
+ # further results.
3580
+ # @param [String] fields
3581
+ # Selector specifying which fields to include in a partial response.
3582
+ # @param [String] quota_user
3583
+ # Available to use for quota purposes for server-side applications. Can be any
3584
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3585
+ # @param [Google::Apis::RequestOptions] options
3586
+ # Request-specific options
3587
+ #
3588
+ # @yield [result, err] Result & error if block supplied
3589
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::ListUsersResponse] parsed result object
3590
+ # @yieldparam err [StandardError] error object if request failed
3591
+ #
3592
+ # @return [Google::Apis::AndroidpublisherV3::ListUsersResponse]
3593
+ #
3594
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3595
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3596
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3597
+ def list_users(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3598
+ command = make_simple_command(:get, 'androidpublisher/v3/{+parent}/users', options)
3599
+ command.response_representation = Google::Apis::AndroidpublisherV3::ListUsersResponse::Representation
3600
+ command.response_class = Google::Apis::AndroidpublisherV3::ListUsersResponse
3601
+ command.params['parent'] = parent unless parent.nil?
3602
+ command.query['pageSize'] = page_size unless page_size.nil?
3603
+ command.query['pageToken'] = page_token unless page_token.nil?
3604
+ command.query['fields'] = fields unless fields.nil?
3605
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3606
+ execute_or_queue_command(command, &block)
3607
+ end
3608
+
3609
+ # Updates access for the user to the developer account.
3610
+ # @param [String] name
3611
+ # Required. Resource name for this user, following the pattern "developers/`
3612
+ # developer`/users/`email`".
3613
+ # @param [Google::Apis::AndroidpublisherV3::User] user_object
3614
+ # @param [String] update_mask
3615
+ # Optional. The list of fields to be updated.
3616
+ # @param [String] fields
3617
+ # Selector specifying which fields to include in a partial response.
3618
+ # @param [String] quota_user
3619
+ # Available to use for quota purposes for server-side applications. Can be any
3620
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3621
+ # @param [Google::Apis::RequestOptions] options
3622
+ # Request-specific options
3623
+ #
3624
+ # @yield [result, err] Result & error if block supplied
3625
+ # @yieldparam result [Google::Apis::AndroidpublisherV3::User] parsed result object
3626
+ # @yieldparam err [StandardError] error object if request failed
3627
+ #
3628
+ # @return [Google::Apis::AndroidpublisherV3::User]
3629
+ #
3630
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3631
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3632
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3633
+ def patch_user(name, user_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
3634
+ command = make_simple_command(:patch, 'androidpublisher/v3/{+name}', options)
3635
+ command.request_representation = Google::Apis::AndroidpublisherV3::User::Representation
3636
+ command.request_object = user_object
3637
+ command.response_representation = Google::Apis::AndroidpublisherV3::User::Representation
3638
+ command.response_class = Google::Apis::AndroidpublisherV3::User
3639
+ command.params['name'] = name unless name.nil?
3640
+ command.query['updateMask'] = update_mask unless update_mask.nil?
3641
+ command.query['fields'] = fields unless fields.nil?
3642
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3643
+ execute_or_queue_command(command, &block)
3644
+ end
2385
3645
 
2386
3646
  protected
2387
3647