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