source: vendor/google/apiclient-services/src/Dfareporting/Resource/AdvertiserGroups.php

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

Upload project files

  • Property mode set to 100644
File size: 5.6 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\Dfareporting\Resource;
19
20use Google\Service\Dfareporting\AdvertiserGroup;
21use Google\Service\Dfareporting\AdvertiserGroupsListResponse;
22
23/**
24 * The "advertiserGroups" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $dfareportingService = new Google\Service\Dfareporting(...);
28 * $advertiserGroups = $dfareportingService->advertiserGroups;
29 * </code>
30 */
31class AdvertiserGroups extends \Google\Service\Resource
32{
33 /**
34 * Deletes an existing advertiser group. (advertiserGroups.delete)
35 *
36 * @param string $profileId User profile ID associated with this request.
37 * @param string $id Advertiser group ID.
38 * @param array $optParams Optional parameters.
39 * @throws \Google\Service\Exception
40 */
41 public function delete($profileId, $id, $optParams = [])
42 {
43 $params = ['profileId' => $profileId, 'id' => $id];
44 $params = array_merge($params, $optParams);
45 return $this->call('delete', [$params]);
46 }
47 /**
48 * Gets one advertiser group by ID. (advertiserGroups.get)
49 *
50 * @param string $profileId User profile ID associated with this request.
51 * @param string $id Advertiser group ID.
52 * @param array $optParams Optional parameters.
53 * @return AdvertiserGroup
54 * @throws \Google\Service\Exception
55 */
56 public function get($profileId, $id, $optParams = [])
57 {
58 $params = ['profileId' => $profileId, 'id' => $id];
59 $params = array_merge($params, $optParams);
60 return $this->call('get', [$params], AdvertiserGroup::class);
61 }
62 /**
63 * Inserts a new advertiser group. (advertiserGroups.insert)
64 *
65 * @param string $profileId User profile ID associated with this request.
66 * @param AdvertiserGroup $postBody
67 * @param array $optParams Optional parameters.
68 * @return AdvertiserGroup
69 * @throws \Google\Service\Exception
70 */
71 public function insert($profileId, AdvertiserGroup $postBody, $optParams = [])
72 {
73 $params = ['profileId' => $profileId, 'postBody' => $postBody];
74 $params = array_merge($params, $optParams);
75 return $this->call('insert', [$params], AdvertiserGroup::class);
76 }
77 /**
78 * Retrieves a list of advertiser groups, possibly filtered. This method
79 * supports paging. (advertiserGroups.listAdvertiserGroups)
80 *
81 * @param string $profileId User profile ID associated with this request.
82 * @param array $optParams Optional parameters.
83 *
84 * @opt_param string ids Select only advertiser groups with these IDs.
85 * @opt_param int maxResults Maximum number of results to return.
86 * @opt_param string pageToken Value of the nextPageToken from the previous
87 * result page.
88 * @opt_param string searchString Allows searching for objects by name or ID.
89 * Wildcards (*) are allowed. For example, "advertiser*2015" will return objects
90 * with names like "advertiser group June 2015", "advertiser group April 2015",
91 * or simply "advertiser group 2015". Most of the searches also add wildcards
92 * implicitly at the start and the end of the search string. For example, a
93 * search string of "advertisergroup" will match objects with name "my
94 * advertisergroup", "advertisergroup 2015", or simply "advertisergroup".
95 * @opt_param string sortField Field by which to sort the list.
96 * @opt_param string sortOrder Order of sorted results.
97 * @return AdvertiserGroupsListResponse
98 * @throws \Google\Service\Exception
99 */
100 public function listAdvertiserGroups($profileId, $optParams = [])
101 {
102 $params = ['profileId' => $profileId];
103 $params = array_merge($params, $optParams);
104 return $this->call('list', [$params], AdvertiserGroupsListResponse::class);
105 }
106 /**
107 * Updates an existing advertiser group. This method supports patch semantics.
108 * (advertiserGroups.patch)
109 *
110 * @param string $profileId User profile ID associated with this request.
111 * @param string $id Required. Advertiser Group ID.
112 * @param AdvertiserGroup $postBody
113 * @param array $optParams Optional parameters.
114 * @return AdvertiserGroup
115 * @throws \Google\Service\Exception
116 */
117 public function patch($profileId, $id, AdvertiserGroup $postBody, $optParams = [])
118 {
119 $params = ['profileId' => $profileId, 'id' => $id, 'postBody' => $postBody];
120 $params = array_merge($params, $optParams);
121 return $this->call('patch', [$params], AdvertiserGroup::class);
122 }
123 /**
124 * Updates an existing advertiser group. (advertiserGroups.update)
125 *
126 * @param string $profileId User profile ID associated with this request.
127 * @param AdvertiserGroup $postBody
128 * @param array $optParams Optional parameters.
129 * @return AdvertiserGroup
130 * @throws \Google\Service\Exception
131 */
132 public function update($profileId, AdvertiserGroup $postBody, $optParams = [])
133 {
134 $params = ['profileId' => $profileId, 'postBody' => $postBody];
135 $params = array_merge($params, $optParams);
136 return $this->call('update', [$params], AdvertiserGroup::class);
137 }
138}
139
140// Adding a class alias for backwards compatibility with the previous class name.
141class_alias(AdvertiserGroups::class, 'Google_Service_Dfareporting_Resource_AdvertiserGroups');
Note: See TracBrowser for help on using the repository browser.