[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\MyBusinessAccountManagement\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\MyBusinessAccountManagement\AcceptInvitationRequest;
|
---|
| 21 | use Google\Service\MyBusinessAccountManagement\DeclineInvitationRequest;
|
---|
| 22 | use Google\Service\MyBusinessAccountManagement\ListInvitationsResponse;
|
---|
| 23 | use Google\Service\MyBusinessAccountManagement\MybusinessaccountmanagementEmpty;
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * The "invitations" collection of methods.
|
---|
| 27 | * Typical usage is:
|
---|
| 28 | * <code>
|
---|
| 29 | * $mybusinessaccountmanagementService = new Google\Service\MyBusinessAccountManagement(...);
|
---|
| 30 | * $invitations = $mybusinessaccountmanagementService->accounts_invitations;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class AccountsInvitations extends \Google\Service\Resource
|
---|
| 34 | {
|
---|
| 35 | /**
|
---|
| 36 | * Accepts the specified invitation. (invitations.accept)
|
---|
| 37 | *
|
---|
| 38 | * @param string $name Required. The name of the invitation that is being
|
---|
| 39 | * accepted. `accounts/{account_id}/invitations/{invitation_id}`
|
---|
| 40 | * @param AcceptInvitationRequest $postBody
|
---|
| 41 | * @param array $optParams Optional parameters.
|
---|
| 42 | * @return MybusinessaccountmanagementEmpty
|
---|
| 43 | * @throws \Google\Service\Exception
|
---|
| 44 | */
|
---|
| 45 | public function accept($name, AcceptInvitationRequest $postBody, $optParams = [])
|
---|
| 46 | {
|
---|
| 47 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 48 | $params = array_merge($params, $optParams);
|
---|
| 49 | return $this->call('accept', [$params], MybusinessaccountmanagementEmpty::class);
|
---|
| 50 | }
|
---|
| 51 | /**
|
---|
| 52 | * Declines the specified invitation. (invitations.decline)
|
---|
| 53 | *
|
---|
| 54 | * @param string $name Required. The name of the account invitation that is
|
---|
| 55 | * being declined. `accounts/{account_id}/invitations/{invitation_id}`
|
---|
| 56 | * @param DeclineInvitationRequest $postBody
|
---|
| 57 | * @param array $optParams Optional parameters.
|
---|
| 58 | * @return MybusinessaccountmanagementEmpty
|
---|
| 59 | * @throws \Google\Service\Exception
|
---|
| 60 | */
|
---|
| 61 | public function decline($name, DeclineInvitationRequest $postBody, $optParams = [])
|
---|
| 62 | {
|
---|
| 63 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 64 | $params = array_merge($params, $optParams);
|
---|
| 65 | return $this->call('decline', [$params], MybusinessaccountmanagementEmpty::class);
|
---|
| 66 | }
|
---|
| 67 | /**
|
---|
| 68 | * Lists pending invitations for the specified account.
|
---|
| 69 | * (invitations.listAccountsInvitations)
|
---|
| 70 | *
|
---|
| 71 | * @param string $parent Required. The name of the account from which the list
|
---|
| 72 | * of invitations is being retrieved. `accounts/{account_id}/invitations`
|
---|
| 73 | * @param array $optParams Optional parameters.
|
---|
| 74 | *
|
---|
| 75 | * @opt_param string filter Optional. Filtering the response is supported via
|
---|
| 76 | * the Invitation.target_type field.
|
---|
| 77 | * @return ListInvitationsResponse
|
---|
| 78 | * @throws \Google\Service\Exception
|
---|
| 79 | */
|
---|
| 80 | public function listAccountsInvitations($parent, $optParams = [])
|
---|
| 81 | {
|
---|
| 82 | $params = ['parent' => $parent];
|
---|
| 83 | $params = array_merge($params, $optParams);
|
---|
| 84 | return $this->call('list', [$params], ListInvitationsResponse::class);
|
---|
| 85 | }
|
---|
| 86 | }
|
---|
| 87 |
|
---|
| 88 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 89 | class_alias(AccountsInvitations::class, 'Google_Service_MyBusinessAccountManagement_Resource_AccountsInvitations');
|
---|