source: vendor/google/apiclient-services/src/AndroidPublisher/Resource/Grants.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: 3.0 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\Grant;
21
22/**
23 * The "grants" collection of methods.
24 * Typical usage is:
25 * <code>
26 * $androidpublisherService = new Google\Service\AndroidPublisher(...);
27 * $grants = $androidpublisherService->grants;
28 * </code>
29 */
30class Grants extends \Google\Service\Resource
31{
32 /**
33 * Grant access for a user to the given package. (grants.create)
34 *
35 * @param string $parent Required. The user which needs permission. Format:
36 * developers/{developer}/users/{user}
37 * @param Grant $postBody
38 * @param array $optParams Optional parameters.
39 * @return Grant
40 * @throws \Google\Service\Exception
41 */
42 public function create($parent, Grant $postBody, $optParams = [])
43 {
44 $params = ['parent' => $parent, 'postBody' => $postBody];
45 $params = array_merge($params, $optParams);
46 return $this->call('create', [$params], Grant::class);
47 }
48 /**
49 * Removes all access for the user to the given package or developer account.
50 * (grants.delete)
51 *
52 * @param string $name Required. The name of the grant to delete. Format:
53 * developers/{developer}/users/{email}/grants/{package_name}
54 * @param array $optParams Optional parameters.
55 * @throws \Google\Service\Exception
56 */
57 public function delete($name, $optParams = [])
58 {
59 $params = ['name' => $name];
60 $params = array_merge($params, $optParams);
61 return $this->call('delete', [$params]);
62 }
63 /**
64 * Updates access for the user to the given package. (grants.patch)
65 *
66 * @param string $name Required. Resource name for this grant, following the
67 * pattern "developers/{developer}/users/{email}/grants/{package_name}". If this
68 * grant is for a draft app, the app ID will be used in this resource name
69 * instead of the package name.
70 * @param Grant $postBody
71 * @param array $optParams Optional parameters.
72 *
73 * @opt_param string updateMask Optional. The list of fields to be updated.
74 * @return Grant
75 * @throws \Google\Service\Exception
76 */
77 public function patch($name, Grant $postBody, $optParams = [])
78 {
79 $params = ['name' => $name, 'postBody' => $postBody];
80 $params = array_merge($params, $optParams);
81 return $this->call('patch', [$params], Grant::class);
82 }
83}
84
85// Adding a class alias for backwards compatibility with the previous class name.
86class_alias(Grants::class, 'Google_Service_AndroidPublisher_Resource_Grants');
Note: See TracBrowser for help on using the repository browser.