source: vendor/google/apiclient-services/src/Adsense/Resource/Accounts.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: 4.3 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\Adsense\Resource;
19
20use Google\Service\Adsense\Account;
21use Google\Service\Adsense\AdBlockingRecoveryTag;
22use Google\Service\Adsense\ListAccountsResponse;
23use Google\Service\Adsense\ListChildAccountsResponse;
24
25/**
26 * The "accounts" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $adsenseService = new Google\Service\Adsense(...);
30 * $accounts = $adsenseService->accounts;
31 * </code>
32 */
33class Accounts extends \Google\Service\Resource
34{
35 /**
36 * Gets information about the selected AdSense account. (accounts.get)
37 *
38 * @param string $name Required. Account to get information about. Format:
39 * accounts/{account}
40 * @param array $optParams Optional parameters.
41 * @return Account
42 * @throws \Google\Service\Exception
43 */
44 public function get($name, $optParams = [])
45 {
46 $params = ['name' => $name];
47 $params = array_merge($params, $optParams);
48 return $this->call('get', [$params], Account::class);
49 }
50 /**
51 * Gets the ad blocking recovery tag of an account.
52 * (accounts.getAdBlockingRecoveryTag)
53 *
54 * @param string $name Required. The name of the account to get the tag for.
55 * Format: accounts/{account}
56 * @param array $optParams Optional parameters.
57 * @return AdBlockingRecoveryTag
58 * @throws \Google\Service\Exception
59 */
60 public function getAdBlockingRecoveryTag($name, $optParams = [])
61 {
62 $params = ['name' => $name];
63 $params = array_merge($params, $optParams);
64 return $this->call('getAdBlockingRecoveryTag', [$params], AdBlockingRecoveryTag::class);
65 }
66 /**
67 * Lists all accounts available to this user. (accounts.listAccounts)
68 *
69 * @param array $optParams Optional parameters.
70 *
71 * @opt_param int pageSize The maximum number of accounts to include in the
72 * response, used for paging. If unspecified, at most 10000 accounts will be
73 * returned. The maximum value is 10000; values above 10000 will be coerced to
74 * 10000.
75 * @opt_param string pageToken A page token, received from a previous
76 * `ListAccounts` call. Provide this to retrieve the subsequent page. When
77 * paginating, all other parameters provided to `ListAccounts` must match the
78 * call that provided the page token.
79 * @return ListAccountsResponse
80 * @throws \Google\Service\Exception
81 */
82 public function listAccounts($optParams = [])
83 {
84 $params = [];
85 $params = array_merge($params, $optParams);
86 return $this->call('list', [$params], ListAccountsResponse::class);
87 }
88 /**
89 * Lists all accounts directly managed by the given AdSense account.
90 * (accounts.listChildAccounts)
91 *
92 * @param string $parent Required. The parent account, which owns the child
93 * accounts. Format: accounts/{account}
94 * @param array $optParams Optional parameters.
95 *
96 * @opt_param int pageSize The maximum number of accounts to include in the
97 * response, used for paging. If unspecified, at most 10000 accounts will be
98 * returned. The maximum value is 10000; values above 10000 will be coerced to
99 * 10000.
100 * @opt_param string pageToken A page token, received from a previous
101 * `ListChildAccounts` call. Provide this to retrieve the subsequent page. When
102 * paginating, all other parameters provided to `ListChildAccounts` must match
103 * the call that provided the page token.
104 * @return ListChildAccountsResponse
105 * @throws \Google\Service\Exception
106 */
107 public function listChildAccounts($parent, $optParams = [])
108 {
109 $params = ['parent' => $parent];
110 $params = array_merge($params, $optParams);
111 return $this->call('listChildAccounts', [$params], ListChildAccountsResponse::class);
112 }
113}
114
115// Adding a class alias for backwards compatibility with the previous class name.
116class_alias(Accounts::class, 'Google_Service_Adsense_Resource_Accounts');
Note: See TracBrowser for help on using the repository browser.