PluginProbe
Authorizer / 2.2
Authorizer v2.2
3.15.3 3.15.2 3.15.1 3.15.0 3.14.3 3.14.4 3.14.2 3.14.1 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.10 2.9.11 2.9.12 2.9.13 2.9.2 2.9.3 2.9.6 All 126 releases
authorizer / inc / google-api-php-client / src / Google / Service / AndroidPublisher.php

AndroidPublisher.php in Authorizer 2.2, at inc/google-api-php-client/src/Google/Service/AndroidPublisher.php

331 lines 9.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Copyright 2010 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
18 /**
19 * Service definition for AndroidPublisher (v1.1).
20 *
21 * <p>
22 * Lets Android application developers access their Google Play accounts.
23 * </p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://developers.google.com/android-publisher" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32 class Google_Service_AndroidPublisher extends Google_Service
33 {
34 /** View and manage your Google Play Android Developer account. */
35 const ANDROIDPUBLISHER = "https://www.googleapis.com/auth/androidpublisher";
36
37 public $inapppurchases;
38 public $purchases;
39
40
41 /**
42 * Constructs the internal representation of the AndroidPublisher service.
43 *
44 * @param Google_Client $client
45 */
46 public function __construct(Google_Client $client)
47 {
48 parent::__construct($client);
49 $this->servicePath = 'androidpublisher/v1.1/applications/';
50 $this->version = 'v1.1';
51 $this->serviceName = 'androidpublisher';
52
53 $this->inapppurchases = new Google_Service_AndroidPublisher_Inapppurchases_Resource(
54 $this,
55 $this->serviceName,
56 'inapppurchases',
57 array(
58 'methods' => array(
59 'get' => array(
60 'path' => '{packageName}/inapp/{productId}/purchases/{token}',
61 'httpMethod' => 'GET',
62 'parameters' => array(
63 'packageName' => array(
64 'location' => 'path',
65 'type' => 'string',
66 'required' => true,
67 ),
68 'productId' => array(
69 'location' => 'path',
70 'type' => 'string',
71 'required' => true,
72 ),
73 'token' => array(
74 'location' => 'path',
75 'type' => 'string',
76 'required' => true,
77 ),
78 ),
79 ),
80 )
81 )
82 );
83 $this->purchases = new Google_Service_AndroidPublisher_Purchases_Resource(
84 $this,
85 $this->serviceName,
86 'purchases',
87 array(
88 'methods' => array(
89 'cancel' => array(
90 'path' => '{packageName}/subscriptions/{subscriptionId}/purchases/{token}/cancel',
91 'httpMethod' => 'POST',
92 'parameters' => array(
93 'packageName' => array(
94 'location' => 'path',
95 'type' => 'string',
96 'required' => true,
97 ),
98 'subscriptionId' => array(
99 'location' => 'path',
100 'type' => 'string',
101 'required' => true,
102 ),
103 'token' => array(
104 'location' => 'path',
105 'type' => 'string',
106 'required' => true,
107 ),
108 ),
109 ),'get' => array(
110 'path' => '{packageName}/subscriptions/{subscriptionId}/purchases/{token}',
111 'httpMethod' => 'GET',
112 'parameters' => array(
113 'packageName' => array(
114 'location' => 'path',
115 'type' => 'string',
116 'required' => true,
117 ),
118 'subscriptionId' => array(
119 'location' => 'path',
120 'type' => 'string',
121 'required' => true,
122 ),
123 'token' => array(
124 'location' => 'path',
125 'type' => 'string',
126 'required' => true,
127 ),
128 ),
129 ),
130 )
131 )
132 );
133 }
134 }
135
136
137 /**
138 * The "inapppurchases" collection of methods.
139 * Typical usage is:
140 * <code>
141 * $androidpublisherService = new Google_Service_AndroidPublisher(...);
142 * $inapppurchases = $androidpublisherService->inapppurchases;
143 * </code>
144 */
145 class Google_Service_AndroidPublisher_Inapppurchases_Resource extends Google_Service_Resource
146 {
147
148 /**
149 * Checks the purchase and consumption status of an inapp item.
150 * (inapppurchases.get)
151 *
152 * @param string $packageName
153 * The package name of the application the inapp product was sold in (for example,
154 * 'com.some.thing').
155 * @param string $productId
156 * The inapp product SKU (for example, 'com.some.thing.inapp1').
157 * @param string $token
158 * The token provided to the user's device when the inapp product was purchased.
159 * @param array $optParams Optional parameters.
160 * @return Google_Service_AndroidPublisher_InappPurchase
161 */
162 public function get($packageName, $productId, $token, $optParams = array())
163 {
164 $params = array('packageName' => $packageName, 'productId' => $productId, 'token' => $token);
165 $params = array_merge($params, $optParams);
166 return $this->call('get', array($params), "Google_Service_AndroidPublisher_InappPurchase");
167 }
168 }
169
170 /**
171 * The "purchases" collection of methods.
172 * Typical usage is:
173 * <code>
174 * $androidpublisherService = new Google_Service_AndroidPublisher(...);
175 * $purchases = $androidpublisherService->purchases;
176 * </code>
177 */
178 class Google_Service_AndroidPublisher_Purchases_Resource extends Google_Service_Resource
179 {
180
181 /**
182 * Cancels a user's subscription purchase. The subscription remains valid until
183 * its expiration time. (purchases.cancel)
184 *
185 * @param string $packageName
186 * The package name of the application for which this subscription was purchased (for example,
187 * 'com.some.thing').
188 * @param string $subscriptionId
189 * The purchased subscription ID (for example, 'monthly001').
190 * @param string $token
191 * The token provided to the user's device when the subscription was purchased.
192 * @param array $optParams Optional parameters.
193 */
194 public function cancel($packageName, $subscriptionId, $token, $optParams = array())
195 {
196 $params = array('packageName' => $packageName, 'subscriptionId' => $subscriptionId, 'token' => $token);
197 $params = array_merge($params, $optParams);
198 return $this->call('cancel', array($params));
199 }
200 /**
201 * Checks whether a user's subscription purchase is valid and returns its expiry
202 * time. (purchases.get)
203 *
204 * @param string $packageName
205 * The package name of the application for which this subscription was purchased (for example,
206 * 'com.some.thing').
207 * @param string $subscriptionId
208 * The purchased subscription ID (for example, 'monthly001').
209 * @param string $token
210 * The token provided to the user's device when the subscription was purchased.
211 * @param array $optParams Optional parameters.
212 * @return Google_Service_AndroidPublisher_SubscriptionPurchase
213 */
214 public function get($packageName, $subscriptionId, $token, $optParams = array())
215 {
216 $params = array('packageName' => $packageName, 'subscriptionId' => $subscriptionId, 'token' => $token);
217 $params = array_merge($params, $optParams);
218 return $this->call('get', array($params), "Google_Service_AndroidPublisher_SubscriptionPurchase");
219 }
220 }
221
222
223
224
225 class Google_Service_AndroidPublisher_InappPurchase extends Google_Model
226 {
227 public $consumptionState;
228 public $developerPayload;
229 public $kind;
230 public $purchaseState;
231 public $purchaseTime;
232
233 public function setConsumptionState($consumptionState)
234 {
235 $this->consumptionState = $consumptionState;
236 }
237
238 public function getConsumptionState()
239 {
240 return $this->consumptionState;
241 }
242
243 public function setDeveloperPayload($developerPayload)
244 {
245 $this->developerPayload = $developerPayload;
246 }
247
248 public function getDeveloperPayload()
249 {
250 return $this->developerPayload;
251 }
252
253 public function setKind($kind)
254 {
255 $this->kind = $kind;
256 }
257
258 public function getKind()
259 {
260 return $this->kind;
261 }
262
263 public function setPurchaseState($purchaseState)
264 {
265 $this->purchaseState = $purchaseState;
266 }
267
268 public function getPurchaseState()
269 {
270 return $this->purchaseState;
271 }
272
273 public function setPurchaseTime($purchaseTime)
274 {
275 $this->purchaseTime = $purchaseTime;
276 }
277
278 public function getPurchaseTime()
279 {
280 return $this->purchaseTime;
281 }
282 }
283
284 class Google_Service_AndroidPublisher_SubscriptionPurchase extends Google_Model
285 {
286 public $autoRenewing;
287 public $initiationTimestampMsec;
288 public $kind;
289 public $validUntilTimestampMsec;
290
291 public function setAutoRenewing($autoRenewing)
292 {
293 $this->autoRenewing = $autoRenewing;
294 }
295
296 public function getAutoRenewing()
297 {
298 return $this->autoRenewing;
299 }
300
301 public function setInitiationTimestampMsec($initiationTimestampMsec)
302 {
303 $this->initiationTimestampMsec = $initiationTimestampMsec;
304 }
305
306 public function getInitiationTimestampMsec()
307 {
308 return $this->initiationTimestampMsec;
309 }
310
311 public function setKind($kind)
312 {
313 $this->kind = $kind;
314 }
315
316 public function getKind()
317 {
318 return $this->kind;
319 }
320
321 public function setValidUntilTimestampMsec($validUntilTimestampMsec)
322 {
323 $this->validUntilTimestampMsec = $validUntilTimestampMsec;
324 }
325
326 public function getValidUntilTimestampMsec()
327 {
328 return $this->validUntilTimestampMsec;
329 }
330 }
331