source: vendor/google/apiclient-services/src/AndroidPublisher/Resource/MonetizationSubscriptionsBasePlans.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 12 days ago

Upload new project files

  • Property mode set to 100644
File size: 8.2 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\AndroidPublisher\Resource;
19
20use Google\Service\AndroidPublisher\ActivateBasePlanRequest;
21use Google\Service\AndroidPublisher\BatchMigrateBasePlanPricesRequest;
22use Google\Service\AndroidPublisher\BatchMigrateBasePlanPricesResponse;
23use Google\Service\AndroidPublisher\BatchUpdateBasePlanStatesRequest;
24use Google\Service\AndroidPublisher\BatchUpdateBasePlanStatesResponse;
25use Google\Service\AndroidPublisher\DeactivateBasePlanRequest;
26use Google\Service\AndroidPublisher\MigrateBasePlanPricesRequest;
27use Google\Service\AndroidPublisher\MigrateBasePlanPricesResponse;
28use Google\Service\AndroidPublisher\Subscription;
29
30/**
31 * The "basePlans" collection of methods.
32 * Typical usage is:
33 * <code>
34 * $androidpublisherService = new Google\Service\AndroidPublisher(...);
35 * $basePlans = $androidpublisherService->monetization_subscriptions_basePlans;
36 * </code>
37 */
38class MonetizationSubscriptionsBasePlans extends \Google\Service\Resource
39{
40 /**
41 * Activates a base plan. Once activated, base plans will be available to new
42 * subscribers. (basePlans.activate)
43 *
44 * @param string $packageName Required. The parent app (package name) of the
45 * base plan to activate.
46 * @param string $productId Required. The parent subscription (ID) of the base
47 * plan to activate.
48 * @param string $basePlanId Required. The unique base plan ID of the base plan
49 * to activate.
50 * @param ActivateBasePlanRequest $postBody
51 * @param array $optParams Optional parameters.
52 * @return Subscription
53 * @throws \Google\Service\Exception
54 */
55 public function activate($packageName, $productId, $basePlanId, ActivateBasePlanRequest $postBody, $optParams = [])
56 {
57 $params = ['packageName' => $packageName, 'productId' => $productId, 'basePlanId' => $basePlanId, 'postBody' => $postBody];
58 $params = array_merge($params, $optParams);
59 return $this->call('activate', [$params], Subscription::class);
60 }
61 /**
62 * Batch variant of the MigrateBasePlanPrices endpoint. Set the latencyTolerance
63 * field on nested requests to PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT
64 * to achieve maximum update throughput. (basePlans.batchMigratePrices)
65 *
66 * @param string $packageName Required. The parent app (package name) for which
67 * the subscriptions should be created or updated. Must be equal to the
68 * package_name field on all the Subscription resources.
69 * @param string $productId Required. The product ID of the parent subscription,
70 * if all updated offers belong to the same subscription. If this batch update
71 * spans multiple subscriptions, set this field to "-". Must be set.
72 * @param BatchMigrateBasePlanPricesRequest $postBody
73 * @param array $optParams Optional parameters.
74 * @return BatchMigrateBasePlanPricesResponse
75 * @throws \Google\Service\Exception
76 */
77 public function batchMigratePrices($packageName, $productId, BatchMigrateBasePlanPricesRequest $postBody, $optParams = [])
78 {
79 $params = ['packageName' => $packageName, 'productId' => $productId, 'postBody' => $postBody];
80 $params = array_merge($params, $optParams);
81 return $this->call('batchMigratePrices', [$params], BatchMigrateBasePlanPricesResponse::class);
82 }
83 /**
84 * Activates or deactivates base plans across one or multiple subscriptions. Set
85 * the latencyTolerance field on nested requests to
86 * PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT to achieve maximum update
87 * throughput. (basePlans.batchUpdateStates)
88 *
89 * @param string $packageName Required. The parent app (package name) of the
90 * updated base plans.
91 * @param string $productId Required. The product ID of the parent subscription,
92 * if all updated base plans belong to the same subscription. If this batch
93 * update spans multiple subscriptions, set this field to "-". Must be set.
94 * @param BatchUpdateBasePlanStatesRequest $postBody
95 * @param array $optParams Optional parameters.
96 * @return BatchUpdateBasePlanStatesResponse
97 * @throws \Google\Service\Exception
98 */
99 public function batchUpdateStates($packageName, $productId, BatchUpdateBasePlanStatesRequest $postBody, $optParams = [])
100 {
101 $params = ['packageName' => $packageName, 'productId' => $productId, 'postBody' => $postBody];
102 $params = array_merge($params, $optParams);
103 return $this->call('batchUpdateStates', [$params], BatchUpdateBasePlanStatesResponse::class);
104 }
105 /**
106 * Deactivates a base plan. Once deactivated, the base plan will become
107 * unavailable to new subscribers, but existing subscribers will maintain their
108 * subscription (basePlans.deactivate)
109 *
110 * @param string $packageName Required. The parent app (package name) of the
111 * base plan to deactivate.
112 * @param string $productId Required. The parent subscription (ID) of the base
113 * plan to deactivate.
114 * @param string $basePlanId Required. The unique base plan ID of the base plan
115 * to deactivate.
116 * @param DeactivateBasePlanRequest $postBody
117 * @param array $optParams Optional parameters.
118 * @return Subscription
119 * @throws \Google\Service\Exception
120 */
121 public function deactivate($packageName, $productId, $basePlanId, DeactivateBasePlanRequest $postBody, $optParams = [])
122 {
123 $params = ['packageName' => $packageName, 'productId' => $productId, 'basePlanId' => $basePlanId, 'postBody' => $postBody];
124 $params = array_merge($params, $optParams);
125 return $this->call('deactivate', [$params], Subscription::class);
126 }
127 /**
128 * Deletes a base plan. Can only be done for draft base plans. This action is
129 * irreversible. (basePlans.delete)
130 *
131 * @param string $packageName Required. The parent app (package name) of the
132 * base plan to delete.
133 * @param string $productId Required. The parent subscription (ID) of the base
134 * plan to delete.
135 * @param string $basePlanId Required. The unique offer ID of the base plan to
136 * delete.
137 * @param array $optParams Optional parameters.
138 * @throws \Google\Service\Exception
139 */
140 public function delete($packageName, $productId, $basePlanId, $optParams = [])
141 {
142 $params = ['packageName' => $packageName, 'productId' => $productId, 'basePlanId' => $basePlanId];
143 $params = array_merge($params, $optParams);
144 return $this->call('delete', [$params]);
145 }
146 /**
147 * Migrates subscribers from one or more legacy price cohorts to the current
148 * price. Requests result in Google Play notifying affected subscribers. Only up
149 * to 250 simultaneous legacy price cohorts are supported.
150 * (basePlans.migratePrices)
151 *
152 * @param string $packageName Required. Package name of the parent app. Must be
153 * equal to the package_name field on the Subscription resource.
154 * @param string $productId Required. The ID of the subscription to update. Must
155 * be equal to the product_id field on the Subscription resource.
156 * @param string $basePlanId Required. The unique base plan ID of the base plan
157 * to update prices on.
158 * @param MigrateBasePlanPricesRequest $postBody
159 * @param array $optParams Optional parameters.
160 * @return MigrateBasePlanPricesResponse
161 * @throws \Google\Service\Exception
162 */
163 public function migratePrices($packageName, $productId, $basePlanId, MigrateBasePlanPricesRequest $postBody, $optParams = [])
164 {
165 $params = ['packageName' => $packageName, 'productId' => $productId, 'basePlanId' => $basePlanId, 'postBody' => $postBody];
166 $params = array_merge($params, $optParams);
167 return $this->call('migratePrices', [$params], MigrateBasePlanPricesResponse::class);
168 }
169}
170
171// Adding a class alias for backwards compatibility with the previous class name.
172class_alias(MonetizationSubscriptionsBasePlans::class, 'Google_Service_AndroidPublisher_Resource_MonetizationSubscriptionsBasePlans');
Note: See TracBrowser for help on using the repository browser.