[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\Adsense\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Adsense\ListPolicyIssuesResponse;
|
---|
| 21 | use Google\Service\Adsense\PolicyIssue;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "policyIssues" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $adsenseService = new Google\Service\Adsense(...);
|
---|
| 28 | * $policyIssues = $adsenseService->accounts_policyIssues;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class AccountsPolicyIssues extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Gets information about the selected policy issue. (policyIssues.get)
|
---|
| 35 | *
|
---|
| 36 | * @param string $name Required. Name of the policy issue. Format:
|
---|
| 37 | * accounts/{account}/policyIssues/{policy_issue}
|
---|
| 38 | * @param array $optParams Optional parameters.
|
---|
| 39 | * @return PolicyIssue
|
---|
| 40 | * @throws \Google\Service\Exception
|
---|
| 41 | */
|
---|
| 42 | public function get($name, $optParams = [])
|
---|
| 43 | {
|
---|
| 44 | $params = ['name' => $name];
|
---|
| 45 | $params = array_merge($params, $optParams);
|
---|
| 46 | return $this->call('get', [$params], PolicyIssue::class);
|
---|
| 47 | }
|
---|
| 48 | /**
|
---|
| 49 | * Lists all the policy issues where the specified account is involved, both
|
---|
| 50 | * directly and through any AFP child accounts.
|
---|
| 51 | * (policyIssues.listAccountsPolicyIssues)
|
---|
| 52 | *
|
---|
| 53 | * @param string $parent Required. The account for which policy issues are being
|
---|
| 54 | * retrieved. Format: accounts/{account}
|
---|
| 55 | * @param array $optParams Optional parameters.
|
---|
| 56 | *
|
---|
| 57 | * @opt_param int pageSize The maximum number of policy issues to include in the
|
---|
| 58 | * response, used for paging. If unspecified, at most 10000 policy issues will
|
---|
| 59 | * be returned. The maximum value is 10000; values above 10000 will be coerced
|
---|
| 60 | * to 10000.
|
---|
| 61 | * @opt_param string pageToken A page token, received from a previous
|
---|
| 62 | * `ListPolicyIssues` call. Provide this to retrieve the subsequent page. When
|
---|
| 63 | * paginating, all other parameters provided to `ListPolicyIssues` must match
|
---|
| 64 | * the call that provided the page token.
|
---|
| 65 | * @return ListPolicyIssuesResponse
|
---|
| 66 | * @throws \Google\Service\Exception
|
---|
| 67 | */
|
---|
| 68 | public function listAccountsPolicyIssues($parent, $optParams = [])
|
---|
| 69 | {
|
---|
| 70 | $params = ['parent' => $parent];
|
---|
| 71 | $params = array_merge($params, $optParams);
|
---|
| 72 | return $this->call('list', [$params], ListPolicyIssuesResponse::class);
|
---|
| 73 | }
|
---|
| 74 | }
|
---|
| 75 |
|
---|
| 76 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 77 | class_alias(AccountsPolicyIssues::class, 'Google_Service_Adsense_Resource_AccountsPolicyIssues');
|
---|