source: vendor/google/apiclient-services/src/AuthorizedBuyersMarketplace/Resource/BuyersClientsUsers.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 2 weeks ago

Upload project files

  • Property mode set to 100644
File size: 6.1 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\AuthorizedBuyersMarketplace\Resource;
19
20use Google\Service\AuthorizedBuyersMarketplace\ActivateClientUserRequest;
21use Google\Service\AuthorizedBuyersMarketplace\AuthorizedbuyersmarketplaceEmpty;
22use Google\Service\AuthorizedBuyersMarketplace\ClientUser;
23use Google\Service\AuthorizedBuyersMarketplace\DeactivateClientUserRequest;
24use Google\Service\AuthorizedBuyersMarketplace\ListClientUsersResponse;
25
26/**
27 * The "users" collection of methods.
28 * Typical usage is:
29 * <code>
30 * $authorizedbuyersmarketplaceService = new Google\Service\AuthorizedBuyersMarketplace(...);
31 * $users = $authorizedbuyersmarketplaceService->buyers_clients_users;
32 * </code>
33 */
34class BuyersClientsUsers extends \Google\Service\Resource
35{
36 /**
37 * Activates an existing client user. The state of the client user will be
38 * updated from "INACTIVE" to "ACTIVE". This method has no effect if the client
39 * user is already in "ACTIVE" state. An error will be returned if the client
40 * user to activate is still in "INVITED" state. (users.activate)
41 *
42 * @param string $name Required. Format:
43 * `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`
44 * @param ActivateClientUserRequest $postBody
45 * @param array $optParams Optional parameters.
46 * @return ClientUser
47 * @throws \Google\Service\Exception
48 */
49 public function activate($name, ActivateClientUserRequest $postBody, $optParams = [])
50 {
51 $params = ['name' => $name, 'postBody' => $postBody];
52 $params = array_merge($params, $optParams);
53 return $this->call('activate', [$params], ClientUser::class);
54 }
55 /**
56 * Creates a new client user in "INVITED" state. An email invitation will be
57 * sent to the new user, once accepted the user will become active.
58 * (users.create)
59 *
60 * @param string $parent Required. The name of the client. Format:
61 * `buyers/{accountId}/clients/{clientAccountId}`
62 * @param ClientUser $postBody
63 * @param array $optParams Optional parameters.
64 * @return ClientUser
65 * @throws \Google\Service\Exception
66 */
67 public function create($parent, ClientUser $postBody, $optParams = [])
68 {
69 $params = ['parent' => $parent, 'postBody' => $postBody];
70 $params = array_merge($params, $optParams);
71 return $this->call('create', [$params], ClientUser::class);
72 }
73 /**
74 * Deactivates an existing client user. The state of the client user will be
75 * updated from "ACTIVE" to "INACTIVE". This method has no effect if the client
76 * user is already in "INACTIVE" state. An error will be returned if the client
77 * user to deactivate is still in "INVITED" state. (users.deactivate)
78 *
79 * @param string $name Required. Format:
80 * `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`
81 * @param DeactivateClientUserRequest $postBody
82 * @param array $optParams Optional parameters.
83 * @return ClientUser
84 * @throws \Google\Service\Exception
85 */
86 public function deactivate($name, DeactivateClientUserRequest $postBody, $optParams = [])
87 {
88 $params = ['name' => $name, 'postBody' => $postBody];
89 $params = array_merge($params, $optParams);
90 return $this->call('deactivate', [$params], ClientUser::class);
91 }
92 /**
93 * Deletes an existing client user. The client user will lose access to the
94 * Authorized Buyers UI. Note that if a client user is deleted, the user's
95 * access to the UI can't be restored unless a new client user is created and
96 * activated. (users.delete)
97 *
98 * @param string $name Required. Format:
99 * `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`
100 * @param array $optParams Optional parameters.
101 * @return AuthorizedbuyersmarketplaceEmpty
102 * @throws \Google\Service\Exception
103 */
104 public function delete($name, $optParams = [])
105 {
106 $params = ['name' => $name];
107 $params = array_merge($params, $optParams);
108 return $this->call('delete', [$params], AuthorizedbuyersmarketplaceEmpty::class);
109 }
110 /**
111 * Retrieves an existing client user. (users.get)
112 *
113 * @param string $name Required. Format:
114 * `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`
115 * @param array $optParams Optional parameters.
116 * @return ClientUser
117 * @throws \Google\Service\Exception
118 */
119 public function get($name, $optParams = [])
120 {
121 $params = ['name' => $name];
122 $params = array_merge($params, $optParams);
123 return $this->call('get', [$params], ClientUser::class);
124 }
125 /**
126 * Lists all client users for a specified client. (users.listBuyersClientsUsers)
127 *
128 * @param string $parent Required. The name of the client. Format:
129 * `buyers/{buyerAccountId}/clients/{clientAccountId}`
130 * @param array $optParams Optional parameters.
131 *
132 * @opt_param int pageSize Requested page size. If left blank, a default page
133 * size of 500 will be applied.
134 * @opt_param string pageToken A token identifying a page of results the server
135 * should return. Typically, this is the value of
136 * ListClientUsersResponse.nextPageToken returned from the previous call to the
137 * list method.
138 * @return ListClientUsersResponse
139 * @throws \Google\Service\Exception
140 */
141 public function listBuyersClientsUsers($parent, $optParams = [])
142 {
143 $params = ['parent' => $parent];
144 $params = array_merge($params, $optParams);
145 return $this->call('list', [$params], ListClientUsersResponse::class);
146 }
147}
148
149// Adding a class alias for backwards compatibility with the previous class name.
150class_alias(BuyersClientsUsers::class, 'Google_Service_AuthorizedBuyersMarketplace_Resource_BuyersClientsUsers');
Note: See TracBrowser for help on using the repository browser.