source: vendor/google/apiclient-services/src/Dfareporting/Resource/DynamicTargetingKeys.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: 4.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\Dfareporting\Resource;
19
20use Google\Service\Dfareporting\DynamicTargetingKey;
21use Google\Service\Dfareporting\DynamicTargetingKeysListResponse;
22
23/**
24 * The "dynamicTargetingKeys" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $dfareportingService = new Google\Service\Dfareporting(...);
28 * $dynamicTargetingKeys = $dfareportingService->dynamicTargetingKeys;
29 * </code>
30 */
31class DynamicTargetingKeys extends \Google\Service\Resource
32{
33 /**
34 * Deletes an existing dynamic targeting key. (dynamicTargetingKeys.delete)
35 *
36 * @param string $profileId User profile ID associated with this request.
37 * @param string $objectId ID of the object of this dynamic targeting key. This
38 * is a required field.
39 * @param string $name Required. Name of this dynamic targeting key. This is a
40 * required field. Must be less than 256 characters long and cannot contain
41 * commas. All characters are converted to lowercase.
42 * @param string $objectType Required. Type of the object of this dynamic
43 * targeting key. This is a required field.
44 * @param array $optParams Optional parameters.
45 * @throws \Google\Service\Exception
46 */
47 public function delete($profileId, $objectId, $name, $objectType, $optParams = [])
48 {
49 $params = ['profileId' => $profileId, 'objectId' => $objectId, 'name' => $name, 'objectType' => $objectType];
50 $params = array_merge($params, $optParams);
51 return $this->call('delete', [$params]);
52 }
53 /**
54 * Inserts a new dynamic targeting key. Keys must be created at the advertiser
55 * level before being assigned to the advertiser's ads, creatives, or
56 * placements. There is a maximum of 1000 keys per advertiser, out of which a
57 * maximum of 20 keys can be assigned per ad, creative, or placement.
58 * (dynamicTargetingKeys.insert)
59 *
60 * @param string $profileId User profile ID associated with this request.
61 * @param DynamicTargetingKey $postBody
62 * @param array $optParams Optional parameters.
63 * @return DynamicTargetingKey
64 * @throws \Google\Service\Exception
65 */
66 public function insert($profileId, DynamicTargetingKey $postBody, $optParams = [])
67 {
68 $params = ['profileId' => $profileId, 'postBody' => $postBody];
69 $params = array_merge($params, $optParams);
70 return $this->call('insert', [$params], DynamicTargetingKey::class);
71 }
72 /**
73 * Retrieves a list of dynamic targeting keys.
74 * (dynamicTargetingKeys.listDynamicTargetingKeys)
75 *
76 * @param string $profileId User profile ID associated with this request.
77 * @param array $optParams Optional parameters.
78 *
79 * @opt_param string advertiserId Select only dynamic targeting keys whose
80 * object has this advertiser ID.
81 * @opt_param string names Select only dynamic targeting keys exactly matching
82 * these names.
83 * @opt_param string objectId Select only dynamic targeting keys with this
84 * object ID.
85 * @opt_param string objectType Select only dynamic targeting keys with this
86 * object type.
87 * @return DynamicTargetingKeysListResponse
88 * @throws \Google\Service\Exception
89 */
90 public function listDynamicTargetingKeys($profileId, $optParams = [])
91 {
92 $params = ['profileId' => $profileId];
93 $params = array_merge($params, $optParams);
94 return $this->call('list', [$params], DynamicTargetingKeysListResponse::class);
95 }
96}
97
98// Adding a class alias for backwards compatibility with the previous class name.
99class_alias(DynamicTargetingKeys::class, 'Google_Service_Dfareporting_Resource_DynamicTargetingKeys');
Note: See TracBrowser for help on using the repository browser.