source: vendor/google/apiclient-services/src/Dfareporting/Resource/CreativeFields.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\CreativeField;
21use Google\Service\Dfareporting\CreativeFieldsListResponse;
22
23/**
24 * The "creativeFields" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $dfareportingService = new Google\Service\Dfareporting(...);
28 * $creativeFields = $dfareportingService->creativeFields;
29 * </code>
30 */
31class CreativeFields extends \Google\Service\Resource
32{
33 /**
34 * Deletes an existing creative field. (creativeFields.delete)
35 *
36 * @param string $profileId User profile ID associated with this request.
37 * @param string $id Creative Field 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 creative field by ID. (creativeFields.get)
49 *
50 * @param string $profileId User profile ID associated with this request.
51 * @param string $id Creative Field ID
52 * @param array $optParams Optional parameters.
53 * @return CreativeField
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], CreativeField::class);
61 }
62 /**
63 * Inserts a new creative field. (creativeFields.insert)
64 *
65 * @param string $profileId User profile ID associated with this request.
66 * @param CreativeField $postBody
67 * @param array $optParams Optional parameters.
68 * @return CreativeField
69 * @throws \Google\Service\Exception
70 */
71 public function insert($profileId, CreativeField $postBody, $optParams = [])
72 {
73 $params = ['profileId' => $profileId, 'postBody' => $postBody];
74 $params = array_merge($params, $optParams);
75 return $this->call('insert', [$params], CreativeField::class);
76 }
77 /**
78 * Retrieves a list of creative fields, possibly filtered. This method supports
79 * paging. (creativeFields.listCreativeFields)
80 *
81 * @param string $profileId User profile ID associated with this request.
82 * @param array $optParams Optional parameters.
83 *
84 * @opt_param string advertiserIds Select only creative fields that belong to
85 * these advertisers.
86 * @opt_param string ids Select only creative fields with these IDs.
87 * @opt_param int maxResults Maximum number of results to return.
88 * @opt_param string pageToken Value of the nextPageToken from the previous
89 * result page.
90 * @opt_param string searchString Allows searching for creative fields by name
91 * or ID. Wildcards (*) are allowed. For example, "creativefield*2015" will
92 * return creative fields with names like "creativefield June 2015",
93 * "creativefield April 2015", or simply "creativefield 2015". Most of the
94 * searches also add wild-cards implicitly at the start and the end of the
95 * search string. For example, a search string of "creativefield" will match
96 * creative fields with the name "my creativefield", "creativefield 2015", or
97 * simply "creativefield".
98 * @opt_param string sortField Field by which to sort the list.
99 * @opt_param string sortOrder Order of sorted results.
100 * @return CreativeFieldsListResponse
101 * @throws \Google\Service\Exception
102 */
103 public function listCreativeFields($profileId, $optParams = [])
104 {
105 $params = ['profileId' => $profileId];
106 $params = array_merge($params, $optParams);
107 return $this->call('list', [$params], CreativeFieldsListResponse::class);
108 }
109 /**
110 * Updates an existing creative field. This method supports patch semantics.
111 * (creativeFields.patch)
112 *
113 * @param string $profileId User profile ID associated with this request.
114 * @param string $id CreativeField ID.
115 * @param CreativeField $postBody
116 * @param array $optParams Optional parameters.
117 * @return CreativeField
118 * @throws \Google\Service\Exception
119 */
120 public function patch($profileId, $id, CreativeField $postBody, $optParams = [])
121 {
122 $params = ['profileId' => $profileId, 'id' => $id, 'postBody' => $postBody];
123 $params = array_merge($params, $optParams);
124 return $this->call('patch', [$params], CreativeField::class);
125 }
126 /**
127 * Updates an existing creative field. (creativeFields.update)
128 *
129 * @param string $profileId User profile ID associated with this request.
130 * @param CreativeField $postBody
131 * @param array $optParams Optional parameters.
132 * @return CreativeField
133 * @throws \Google\Service\Exception
134 */
135 public function update($profileId, CreativeField $postBody, $optParams = [])
136 {
137 $params = ['profileId' => $profileId, 'postBody' => $postBody];
138 $params = array_merge($params, $optParams);
139 return $this->call('update', [$params], CreativeField::class);
140 }
141}
142
143// Adding a class alias for backwards compatibility with the previous class name.
144class_alias(CreativeFields::class, 'Google_Service_Dfareporting_Resource_CreativeFields');
Note: See TracBrowser for help on using the repository browser.