source: vendor/google/apiclient-services/src/AdExchangeBuyer/Resource/Accounts.php

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

Upload project files

  • Property mode set to 100644
File size: 3.0 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\AdExchangeBuyer\Resource;
19
20use Google\Service\AdExchangeBuyer\Account;
21use Google\Service\AdExchangeBuyer\AccountsList;
22
23/**
24 * The "accounts" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $adexchangebuyerService = new Google\Service\AdExchangeBuyer(...);
28 * $accounts = $adexchangebuyerService->accounts;
29 * </code>
30 */
31class Accounts extends \Google\Service\Resource
32{
33 /**
34 * Gets one account by ID. (accounts.get)
35 *
36 * @param int $id The account id
37 * @param array $optParams Optional parameters.
38 * @return Account
39 */
40 public function get($id, $optParams = [])
41 {
42 $params = ['id' => $id];
43 $params = array_merge($params, $optParams);
44 return $this->call('get', [$params], Account::class);
45 }
46 /**
47 * Retrieves the authenticated user's list of accounts. (accounts.listAccounts)
48 *
49 * @param array $optParams Optional parameters.
50 * @return AccountsList
51 */
52 public function listAccounts($optParams = [])
53 {
54 $params = [];
55 $params = array_merge($params, $optParams);
56 return $this->call('list', [$params], AccountsList::class);
57 }
58 /**
59 * Updates an existing account. This method supports patch semantics.
60 * (accounts.patch)
61 *
62 * @param int $id The account id
63 * @param Account $postBody
64 * @param array $optParams Optional parameters.
65 *
66 * @opt_param bool confirmUnsafeAccountChange Confirmation for erasing bidder
67 * and cookie matching urls.
68 * @return Account
69 */
70 public function patch($id, Account $postBody, $optParams = [])
71 {
72 $params = ['id' => $id, 'postBody' => $postBody];
73 $params = array_merge($params, $optParams);
74 return $this->call('patch', [$params], Account::class);
75 }
76 /**
77 * Updates an existing account. (accounts.update)
78 *
79 * @param int $id The account id
80 * @param Account $postBody
81 * @param array $optParams Optional parameters.
82 *
83 * @opt_param bool confirmUnsafeAccountChange Confirmation for erasing bidder
84 * and cookie matching urls.
85 * @return Account
86 */
87 public function update($id, Account $postBody, $optParams = [])
88 {
89 $params = ['id' => $id, 'postBody' => $postBody];
90 $params = array_merge($params, $optParams);
91 return $this->call('update', [$params], Account::class);
92 }
93}
94
95// Adding a class alias for backwards compatibility with the previous class name.
96class_alias(Accounts::class, 'Google_Service_AdExchangeBuyer_Resource_Accounts');
Note: See TracBrowser for help on using the repository browser.