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\AdExchangeBuyerII\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\AdExchangeBuyerII\ClientUserInvitation;
|
---|
21 | use Google\Service\AdExchangeBuyerII\ListClientUserInvitationsResponse;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "invitations" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $adexchangebuyer2Service = new Google\Service\AdExchangeBuyerII(...);
|
---|
28 | * $invitations = $adexchangebuyer2Service->accounts_clients_invitations;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class AccountsClientsInvitations extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Creates and sends out an email invitation to access an Ad Exchange client
|
---|
35 | * buyer account. (invitations.create)
|
---|
36 | *
|
---|
37 | * @param string $accountId Numerical account ID of the client's sponsor buyer.
|
---|
38 | * (required)
|
---|
39 | * @param string $clientAccountId Numerical account ID of the client buyer that
|
---|
40 | * the user should be associated with. (required)
|
---|
41 | * @param ClientUserInvitation $postBody
|
---|
42 | * @param array $optParams Optional parameters.
|
---|
43 | * @return ClientUserInvitation
|
---|
44 | * @throws \Google\Service\Exception
|
---|
45 | */
|
---|
46 | public function create($accountId, $clientAccountId, ClientUserInvitation $postBody, $optParams = [])
|
---|
47 | {
|
---|
48 | $params = ['accountId' => $accountId, 'clientAccountId' => $clientAccountId, 'postBody' => $postBody];
|
---|
49 | $params = array_merge($params, $optParams);
|
---|
50 | return $this->call('create', [$params], ClientUserInvitation::class);
|
---|
51 | }
|
---|
52 | /**
|
---|
53 | * Retrieves an existing client user invitation. (invitations.get)
|
---|
54 | *
|
---|
55 | * @param string $accountId Numerical account ID of the client's sponsor buyer.
|
---|
56 | * (required)
|
---|
57 | * @param string $clientAccountId Numerical account ID of the client buyer that
|
---|
58 | * the user invitation to be retrieved is associated with. (required)
|
---|
59 | * @param string $invitationId Numerical identifier of the user invitation to
|
---|
60 | * retrieve. (required)
|
---|
61 | * @param array $optParams Optional parameters.
|
---|
62 | * @return ClientUserInvitation
|
---|
63 | * @throws \Google\Service\Exception
|
---|
64 | */
|
---|
65 | public function get($accountId, $clientAccountId, $invitationId, $optParams = [])
|
---|
66 | {
|
---|
67 | $params = ['accountId' => $accountId, 'clientAccountId' => $clientAccountId, 'invitationId' => $invitationId];
|
---|
68 | $params = array_merge($params, $optParams);
|
---|
69 | return $this->call('get', [$params], ClientUserInvitation::class);
|
---|
70 | }
|
---|
71 | /**
|
---|
72 | * Lists all the client users invitations for a client with a given account ID.
|
---|
73 | * (invitations.listAccountsClientsInvitations)
|
---|
74 | *
|
---|
75 | * @param string $accountId Numerical account ID of the client's sponsor buyer.
|
---|
76 | * (required)
|
---|
77 | * @param string $clientAccountId Numerical account ID of the client buyer to
|
---|
78 | * list invitations for. (required) You must either specify a string
|
---|
79 | * representation of a numerical account identifier or the `-` character to list
|
---|
80 | * all the invitations for all the clients of a given sponsor buyer.
|
---|
81 | * @param array $optParams Optional parameters.
|
---|
82 | *
|
---|
83 | * @opt_param int pageSize Requested page size. Server may return fewer clients
|
---|
84 | * than requested. If unspecified, server will pick an appropriate default.
|
---|
85 | * @opt_param string pageToken A token identifying a page of results the server
|
---|
86 | * should return. Typically, this is the value of
|
---|
87 | * ListClientUserInvitationsResponse.nextPageToken returned from the previous
|
---|
88 | * call to the clients.invitations.list method.
|
---|
89 | * @return ListClientUserInvitationsResponse
|
---|
90 | * @throws \Google\Service\Exception
|
---|
91 | */
|
---|
92 | public function listAccountsClientsInvitations($accountId, $clientAccountId, $optParams = [])
|
---|
93 | {
|
---|
94 | $params = ['accountId' => $accountId, 'clientAccountId' => $clientAccountId];
|
---|
95 | $params = array_merge($params, $optParams);
|
---|
96 | return $this->call('list', [$params], ListClientUserInvitationsResponse::class);
|
---|
97 | }
|
---|
98 | }
|
---|
99 |
|
---|
100 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
101 | class_alias(AccountsClientsInvitations::class, 'Google_Service_AdExchangeBuyerII_Resource_AccountsClientsInvitations');
|
---|