source: vendor/google/apiclient-services/src/DisplayVideo/Resource/AdvertisersInsertionOrders.php@ f9c482b

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

Upload new project files

  • Property mode set to 100644
File size: 10.3 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\DisplayVideo\Resource;
19
20use Google\Service\DisplayVideo\BulkListInsertionOrderAssignedTargetingOptionsResponse;
21use Google\Service\DisplayVideo\DisplayvideoEmpty;
22use Google\Service\DisplayVideo\InsertionOrder;
23use Google\Service\DisplayVideo\ListInsertionOrdersResponse;
24
25/**
26 * The "insertionOrders" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $displayvideoService = new Google\Service\DisplayVideo(...);
30 * $insertionOrders = $displayvideoService->advertisers_insertionOrders;
31 * </code>
32 */
33class AdvertisersInsertionOrders extends \Google\Service\Resource
34{
35 /**
36 * Creates a new insertion order. Returns the newly created insertion order if
37 * successful. (insertionOrders.create)
38 *
39 * @param string $advertiserId Output only. The unique ID of the advertiser the
40 * insertion order belongs to.
41 * @param InsertionOrder $postBody
42 * @param array $optParams Optional parameters.
43 * @return InsertionOrder
44 * @throws \Google\Service\Exception
45 */
46 public function create($advertiserId, InsertionOrder $postBody, $optParams = [])
47 {
48 $params = ['advertiserId' => $advertiserId, 'postBody' => $postBody];
49 $params = array_merge($params, $optParams);
50 return $this->call('create', [$params], InsertionOrder::class);
51 }
52 /**
53 * Deletes an insertion order. Returns error code `NOT_FOUND` if the insertion
54 * order does not exist. The insertion order should be archived first, i.e. set
55 * entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.
56 * (insertionOrders.delete)
57 *
58 * @param string $advertiserId The ID of the advertiser this insertion order
59 * belongs to.
60 * @param string $insertionOrderId The ID of the insertion order to delete.
61 * @param array $optParams Optional parameters.
62 * @return DisplayvideoEmpty
63 * @throws \Google\Service\Exception
64 */
65 public function delete($advertiserId, $insertionOrderId, $optParams = [])
66 {
67 $params = ['advertiserId' => $advertiserId, 'insertionOrderId' => $insertionOrderId];
68 $params = array_merge($params, $optParams);
69 return $this->call('delete', [$params], DisplayvideoEmpty::class);
70 }
71 /**
72 * Gets an insertion order. Returns error code `NOT_FOUND` if the insertion
73 * order does not exist. (insertionOrders.get)
74 *
75 * @param string $advertiserId Required. The ID of the advertiser this insertion
76 * order belongs to.
77 * @param string $insertionOrderId Required. The ID of the insertion order to
78 * fetch.
79 * @param array $optParams Optional parameters.
80 * @return InsertionOrder
81 * @throws \Google\Service\Exception
82 */
83 public function get($advertiserId, $insertionOrderId, $optParams = [])
84 {
85 $params = ['advertiserId' => $advertiserId, 'insertionOrderId' => $insertionOrderId];
86 $params = array_merge($params, $optParams);
87 return $this->call('get', [$params], InsertionOrder::class);
88 }
89 /**
90 * Lists insertion orders in an advertiser. The order is defined by the order_by
91 * parameter. If a filter by entity_status is not specified, insertion orders
92 * with `ENTITY_STATUS_ARCHIVED` will not be included in the results.
93 * (insertionOrders.listAdvertisersInsertionOrders)
94 *
95 * @param string $advertiserId Required. The ID of the advertiser to list
96 * insertion orders for.
97 * @param array $optParams Optional parameters.
98 *
99 * @opt_param string filter Allows filtering by insertion order fields.
100 * Supported syntax: * Filter expressions are made up of one or more
101 * restrictions. * Restrictions can be combined by `AND` or `OR` logical
102 * operators. A sequence of restrictions implicitly uses `AND`. * A restriction
103 * has the form of `{field} {operator} {value}`. * The `updateTime` field must
104 * use the `GREATER THAN OR EQUAL TO (>=)` or `LESS THAN OR EQUAL TO (<=)`
105 * operators. * All other fields must use the `EQUALS (=)` operator. Supported
106 * fields: * `campaignId` * `displayName` * `entityStatus` * `updateTime` (input
107 * in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All insertion
108 * orders under a campaign: `campaignId="1234"` * All `ENTITY_STATUS_ACTIVE` or
109 * `ENTITY_STATUS_PAUSED` insertion orders under an advertiser:
110 * `(entityStatus="ENTITY_STATUS_ACTIVE" OR
111 * entityStatus="ENTITY_STATUS_PAUSED")` * All insertion orders with an update
112 * time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601):
113 * `updateTime<="2020-11-04T18:54:47Z"` * All insertion orders with an update
114 * time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601):
115 * `updateTime>="2020-11-04T18:54:47Z"` The length of this field should be no
116 * more than 500 characters. Reference our [filter `LIST` requests](/display-
117 * video/api/guides/how-tos/filters) guide for more information.
118 * @opt_param string orderBy Field by which to sort the list. Acceptable values
119 * are: * "displayName" (default) * "entityStatus" * "updateTime" The default
120 * sorting order is ascending. To specify descending order for a field, a suffix
121 * "desc" should be added to the field name. Example: `displayName desc`.
122 * @opt_param int pageSize Requested page size. Must be between `1` and `100`.
123 * If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT`
124 * if an invalid value is specified.
125 * @opt_param string pageToken A token identifying a page of results the server
126 * should return. Typically, this is the value of next_page_token returned from
127 * the previous call to `ListInsertionOrders` method. If not specified, the
128 * first page of results will be returned.
129 * @return ListInsertionOrdersResponse
130 * @throws \Google\Service\Exception
131 */
132 public function listAdvertisersInsertionOrders($advertiserId, $optParams = [])
133 {
134 $params = ['advertiserId' => $advertiserId];
135 $params = array_merge($params, $optParams);
136 return $this->call('list', [$params], ListInsertionOrdersResponse::class);
137 }
138 /**
139 * Lists assigned targeting options of an insertion order across targeting
140 * types. (insertionOrders.listAssignedTargetingOptions)
141 *
142 * @param string $advertiserId Required. The ID of the advertiser the insertion
143 * order belongs to.
144 * @param string $insertionOrderId Required. The ID of the insertion order to
145 * list assigned targeting options for.
146 * @param array $optParams Optional parameters.
147 *
148 * @opt_param string filter Allows filtering by assigned targeting option
149 * fields. Supported syntax: * Filter expressions are made up of one or more
150 * restrictions. * Restrictions can be combined by the logical operator `OR`. *
151 * A restriction has the form of `{field} {operator} {value}`. * All fields must
152 * use the `EQUALS (=)` operator. Supported fields: * `targetingType` *
153 * `inheritance` Examples: * `AssignedTargetingOption` resources of targeting
154 * type `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` or `TARGETING_TYPE_CHANNEL`:
155 * `targetingType="TARGETING_TYPE_PROXIMITY_LOCATION_LIST" OR
156 * targetingType="TARGETING_TYPE_CHANNEL"` * `AssignedTargetingOption` resources
157 * with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER`:
158 * `inheritance="NOT_INHERITED" OR inheritance="INHERITED_FROM_PARTNER"` The
159 * length of this field should be no more than 500 characters. Reference our
160 * [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for
161 * more information.
162 * @opt_param string orderBy Field by which to sort the list. Acceptable values
163 * are: * `targetingType` (default) The default sorting order is ascending. To
164 * specify descending order for a field, a suffix "desc" should be added to the
165 * field name. Example: `targetingType desc`.
166 * @opt_param int pageSize Requested page size. The size must be an integer
167 * between `1` and `5000`. If unspecified, the default is `5000`. Returns error
168 * code `INVALID_ARGUMENT` if an invalid value is specified.
169 * @opt_param string pageToken A token that lets the client fetch the next page
170 * of results. Typically, this is the value of next_page_token returned from the
171 * previous call to `BulkListInsertionOrderAssignedTargetingOptions` method. If
172 * not specified, the first page of results will be returned.
173 * @return BulkListInsertionOrderAssignedTargetingOptionsResponse
174 * @throws \Google\Service\Exception
175 */
176 public function listAssignedTargetingOptions($advertiserId, $insertionOrderId, $optParams = [])
177 {
178 $params = ['advertiserId' => $advertiserId, 'insertionOrderId' => $insertionOrderId];
179 $params = array_merge($params, $optParams);
180 return $this->call('listAssignedTargetingOptions', [$params], BulkListInsertionOrderAssignedTargetingOptionsResponse::class);
181 }
182 /**
183 * Updates an existing insertion order. Returns the updated insertion order if
184 * successful. (insertionOrders.patch)
185 *
186 * @param string $advertiserId Output only. The unique ID of the advertiser the
187 * insertion order belongs to.
188 * @param string $insertionOrderId Output only. The unique ID of the insertion
189 * order. Assigned by the system.
190 * @param InsertionOrder $postBody
191 * @param array $optParams Optional parameters.
192 *
193 * @opt_param string updateMask Required. The mask to control which fields to
194 * update.
195 * @return InsertionOrder
196 * @throws \Google\Service\Exception
197 */
198 public function patch($advertiserId, $insertionOrderId, InsertionOrder $postBody, $optParams = [])
199 {
200 $params = ['advertiserId' => $advertiserId, 'insertionOrderId' => $insertionOrderId, 'postBody' => $postBody];
201 $params = array_merge($params, $optParams);
202 return $this->call('patch', [$params], InsertionOrder::class);
203 }
204}
205
206// Adding a class alias for backwards compatibility with the previous class name.
207class_alias(AdvertisersInsertionOrders::class, 'Google_Service_DisplayVideo_Resource_AdvertisersInsertionOrders');
Note: See TracBrowser for help on using the repository browser.