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\AuthorizedBuyersMarketplace\Resource;
19
20use Google\Service\AuthorizedBuyersMarketplace\ListFinalizedDealsResponse;
21
22/**
23 * The "finalizedDeals" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $authorizedbuyersmarketplaceService = new Google\Service\AuthorizedBuyersMarketplace(...);
27 *   $finalizedDeals = $authorizedbuyersmarketplaceService->finalizedDeals;
28 *  </code>
29 */
30class BiddersFinalizedDeals extends \Google\Service\Resource
31{
32  /**
33   * Lists finalized deals. Use the URL path
34   * "/v1/buyers/{accountId}/finalizedDeals" to list finalized deals for the
35   * current buyer and its clients. Bidders can use the URL path
36   * "/v1/bidders/{accountId}/finalizedDeals" to list finalized deals for the
37   * bidder, its buyers and all their clients.
38   * (finalizedDeals.listBiddersFinalizedDeals)
39   *
40   * @param string $parent Required. The buyer to list the finalized deals for, in
41   * the format: `buyers/{accountId}`. When used to list finalized deals for a
42   * bidder, its buyers and clients, in the format `bidders/{accountId}`.
43   * @param array $optParams Optional parameters.
44   *
45   * @opt_param string filter Optional query string using the [Cloud API list
46   * filtering syntax](https://developers.google.com/authorized-
47   * buyers/apis/guides/v2/list-filters) Supported columns for filtering are: *
48   * deal.displayName * deal.dealType * deal.createTime * deal.updateTime *
49   * deal.flightStartTime * deal.flightEndTime * dealServingStatus
50   * @opt_param string orderBy An optional query string to sort finalized deals
51   * using the [Cloud API sorting
52   * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).
53   * If no sort order is specified, results will be returned in an arbitrary
54   * order. Supported columns for sorting are: * deal.displayName *
55   * deal.createTime * deal.updateTime * deal.flightStartTime * deal.flightEndTime
56   * * rtbMetrics.bidRequests7Days * rtbMetrics.bids7Days *
57   * rtbMetrics.adImpressions7Days * rtbMetrics.bidRate7Days *
58   * rtbMetrics.filteredBidRate7Days * rtbMetrics.mustBidRateCurrentMonth Example:
59   * 'deal.displayName, deal.updateTime desc'
60   * @opt_param int pageSize Requested page size. The server may return fewer
61   * results than requested. If requested more than 500, the server will return
62   * 500 results per page. If unspecified, the server will pick a default page
63   * size of 100.
64   * @opt_param string pageToken The page token as returned from
65   * ListFinalizedDealsResponse.
66   * @return ListFinalizedDealsResponse
67   */
68  public function listBiddersFinalizedDeals($parent, $optParams = [])
69  {
70    $params = ['parent' => $parent];
71    $params = array_merge($params, $optParams);
72    return $this->call('list', [$params], ListFinalizedDealsResponse::class);
73  }
74}
75
76// Adding a class alias for backwards compatibility with the previous class name.
77class_alias(BiddersFinalizedDeals::class, 'Google_Service_AuthorizedBuyersMarketplace_Resource_BiddersFinalizedDeals');
78