[e3d4e0a] | 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 |
|
---|
| 18 | namespace Google\Service\AndroidPublisher\Resource;
|
---|
| 19 |
|
---|
| 20 | /**
|
---|
| 21 | * The "orders" collection of methods.
|
---|
| 22 | * Typical usage is:
|
---|
| 23 | * <code>
|
---|
| 24 | * $androidpublisherService = new Google\Service\AndroidPublisher(...);
|
---|
| 25 | * $orders = $androidpublisherService->orders;
|
---|
| 26 | * </code>
|
---|
| 27 | */
|
---|
| 28 | class Orders extends \Google\Service\Resource
|
---|
| 29 | {
|
---|
| 30 | /**
|
---|
| 31 | * Refunds a user's subscription or in-app purchase order. Orders older than 3
|
---|
| 32 | * years cannot be refunded. (orders.refund)
|
---|
| 33 | *
|
---|
| 34 | * @param string $packageName The package name of the application for which this
|
---|
| 35 | * subscription or in-app item was purchased (for example, 'com.some.thing').
|
---|
| 36 | * @param string $orderId The order ID provided to the user when the
|
---|
| 37 | * subscription or in-app order was purchased.
|
---|
| 38 | * @param array $optParams Optional parameters.
|
---|
| 39 | *
|
---|
| 40 | * @opt_param bool revoke Whether to revoke the purchased item. If set to true,
|
---|
| 41 | * access to the subscription or in-app item will be terminated immediately. If
|
---|
| 42 | * the item is a recurring subscription, all future payments will also be
|
---|
| 43 | * terminated. Consumed in-app items need to be handled by developer's app.
|
---|
| 44 | * (optional).
|
---|
| 45 | * @throws \Google\Service\Exception
|
---|
| 46 | */
|
---|
| 47 | public function refund($packageName, $orderId, $optParams = [])
|
---|
| 48 | {
|
---|
| 49 | $params = ['packageName' => $packageName, 'orderId' => $orderId];
|
---|
| 50 | $params = array_merge($params, $optParams);
|
---|
| 51 | return $this->call('refund', [$params]);
|
---|
| 52 | }
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 56 | class_alias(Orders::class, 'Google_Service_AndroidPublisher_Resource_Orders');
|
---|