source: vendor/google/apiclient-services/src/DisplayVideo/Resource/InventorySources.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: 7.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\EditInventorySourceReadWriteAccessorsRequest;
21use Google\Service\DisplayVideo\InventorySource;
22use Google\Service\DisplayVideo\InventorySourceAccessors;
23use Google\Service\DisplayVideo\ListInventorySourcesResponse;
24
25/**
26 * The "inventorySources" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $displayvideoService = new Google\Service\DisplayVideo(...);
30 * $inventorySources = $displayvideoService->inventorySources;
31 * </code>
32 */
33class InventorySources extends \Google\Service\Resource
34{
35 /**
36 * Creates a new inventory source. Returns the newly created inventory source if
37 * successful. (inventorySources.create)
38 *
39 * @param InventorySource $postBody
40 * @param array $optParams Optional parameters.
41 *
42 * @opt_param string advertiserId The ID of the advertiser that the request is
43 * being made within.
44 * @opt_param string partnerId The ID of the partner that the request is being
45 * made within.
46 * @return InventorySource
47 * @throws \Google\Service\Exception
48 */
49 public function create(InventorySource $postBody, $optParams = [])
50 {
51 $params = ['postBody' => $postBody];
52 $params = array_merge($params, $optParams);
53 return $this->call('create', [$params], InventorySource::class);
54 }
55 /**
56 * Edits read/write accessors of an inventory source. Returns the updated
57 * read_write_accessors for the inventory source.
58 * (inventorySources.editInventorySourceReadWriteAccessors)
59 *
60 * @param string $inventorySourceId Required. The ID of inventory source to
61 * update.
62 * @param EditInventorySourceReadWriteAccessorsRequest $postBody
63 * @param array $optParams Optional parameters.
64 * @return InventorySourceAccessors
65 * @throws \Google\Service\Exception
66 */
67 public function editInventorySourceReadWriteAccessors($inventorySourceId, EditInventorySourceReadWriteAccessorsRequest $postBody, $optParams = [])
68 {
69 $params = ['inventorySourceId' => $inventorySourceId, 'postBody' => $postBody];
70 $params = array_merge($params, $optParams);
71 return $this->call('editInventorySourceReadWriteAccessors', [$params], InventorySourceAccessors::class);
72 }
73 /**
74 * Gets an inventory source. (inventorySources.get)
75 *
76 * @param string $inventorySourceId Required. The ID of the inventory source to
77 * fetch.
78 * @param array $optParams Optional parameters.
79 *
80 * @opt_param string advertiserId Optional. The ID of the DV360 advertiser to
81 * which the fetched inventory source is permissioned. If the user only has
82 * access to the advertiser and not the parent partner, use this field to
83 * specify the relevant advertiser.
84 * @opt_param string partnerId Required. The ID of the DV360 partner to which
85 * the fetched inventory source is permissioned.
86 * @return InventorySource
87 * @throws \Google\Service\Exception
88 */
89 public function get($inventorySourceId, $optParams = [])
90 {
91 $params = ['inventorySourceId' => $inventorySourceId];
92 $params = array_merge($params, $optParams);
93 return $this->call('get', [$params], InventorySource::class);
94 }
95 /**
96 * Lists inventory sources that are accessible to the current user. The order is
97 * defined by the order_by parameter. If a filter by entity_status is not
98 * specified, inventory sources with entity status `ENTITY_STATUS_ARCHIVED` will
99 * not be included in the results. (inventorySources.listInventorySources)
100 *
101 * @param array $optParams Optional parameters.
102 *
103 * @opt_param string advertiserId The ID of the advertiser that has access to
104 * the inventory source.
105 * @opt_param string filter Allows filtering by inventory source fields.
106 * Supported syntax: * Filter expressions are made up of one or more
107 * restrictions. * Restrictions can be combined by `AND` or `OR` logical
108 * operators. A sequence of restrictions implicitly uses `AND`. * A restriction
109 * has the form of `{field} {operator} {value}`. * All fields must use the
110 * `EQUALS (=)` operator. Supported fields: * `status.entityStatus` *
111 * `commitment` * `deliveryMethod` * `rateDetails.rateType` * `exchange`
112 * Examples: * All active inventory sources:
113 * `status.entityStatus="ENTITY_STATUS_ACTIVE"` * Inventory sources belonging to
114 * Google Ad Manager or Rubicon exchanges:
115 * `exchange="EXCHANGE_GOOGLE_AD_MANAGER" OR exchange="EXCHANGE_RUBICON"` The
116 * length of this field should be no more than 500 characters. Reference our
117 * [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for
118 * more information.
119 * @opt_param string orderBy Field by which to sort the list. Acceptable values
120 * are: * `displayName` (default) The default sorting order is ascending. To
121 * specify descending order for a field, a suffix "desc" should be added to the
122 * field name. For example, `displayName desc`.
123 * @opt_param int pageSize Requested page size. Must be between `1` and `200`.
124 * If unspecified will default to `100`.
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 `ListInventorySources` method. If not specified, the
128 * first page of results will be returned.
129 * @opt_param string partnerId The ID of the partner that has access to the
130 * inventory source.
131 * @return ListInventorySourcesResponse
132 * @throws \Google\Service\Exception
133 */
134 public function listInventorySources($optParams = [])
135 {
136 $params = [];
137 $params = array_merge($params, $optParams);
138 return $this->call('list', [$params], ListInventorySourcesResponse::class);
139 }
140 /**
141 * Updates an existing inventory source. Returns the updated inventory source if
142 * successful. (inventorySources.patch)
143 *
144 * @param string $inventorySourceId Output only. The unique ID of the inventory
145 * source. Assigned by the system.
146 * @param InventorySource $postBody
147 * @param array $optParams Optional parameters.
148 *
149 * @opt_param string advertiserId The ID of the advertiser that the request is
150 * being made within.
151 * @opt_param string partnerId The ID of the partner that the request is being
152 * made within.
153 * @opt_param string updateMask Required. The mask to control which fields to
154 * update.
155 * @return InventorySource
156 * @throws \Google\Service\Exception
157 */
158 public function patch($inventorySourceId, InventorySource $postBody, $optParams = [])
159 {
160 $params = ['inventorySourceId' => $inventorySourceId, 'postBody' => $postBody];
161 $params = array_merge($params, $optParams);
162 return $this->call('patch', [$params], InventorySource::class);
163 }
164}
165
166// Adding a class alias for backwards compatibility with the previous class name.
167class_alias(InventorySources::class, 'Google_Service_DisplayVideo_Resource_InventorySources');
Note: See TracBrowser for help on using the repository browser.