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 |
|
---|
18 | namespace Google\Service\RealTimeBidding\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\RealTimeBidding\Buyer;
|
---|
21 | use Google\Service\RealTimeBidding\GetRemarketingTagResponse;
|
---|
22 | use Google\Service\RealTimeBidding\ListBuyersResponse;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "buyers" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $realtimebiddingService = new Google\Service\RealTimeBidding(...);
|
---|
29 | * $buyers = $realtimebiddingService->buyers;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class Buyers extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Gets a buyer account by its name. (buyers.get)
|
---|
36 | *
|
---|
37 | * @param string $name Required. Name of the buyer to get. Format:
|
---|
38 | * `buyers/{buyerId}`
|
---|
39 | * @param array $optParams Optional parameters.
|
---|
40 | * @return Buyer
|
---|
41 | * @throws \Google\Service\Exception
|
---|
42 | */
|
---|
43 | public function get($name, $optParams = [])
|
---|
44 | {
|
---|
45 | $params = ['name' => $name];
|
---|
46 | $params = array_merge($params, $optParams);
|
---|
47 | return $this->call('get', [$params], Buyer::class);
|
---|
48 | }
|
---|
49 | /**
|
---|
50 | * This has been sunset as of October 2023, and will return an error response if
|
---|
51 | * called. For more information, see the release notes:
|
---|
52 | * https://developers.google.com/authorized-buyers/apis/relnotes#real-time-
|
---|
53 | * bidding-api Gets remarketing tag for a buyer. A remarketing tag is a piece of
|
---|
54 | * JavaScript code that can be placed on a web page. When a user visits a page
|
---|
55 | * containing a remarketing tag, Google adds the user to a user list.
|
---|
56 | * (buyers.getRemarketingTag)
|
---|
57 | *
|
---|
58 | * @param string $name Required. To fetch the remarketing tag for an account,
|
---|
59 | * the name must follow the pattern `buyers/{accountId}`, where `{accountId}`
|
---|
60 | * represents the ID of the buyer that owns the remarketing tag. For a bidder
|
---|
61 | * accessing the remarketing tag on behalf of a child seat buyer, `{accountId}`
|
---|
62 | * should represent the ID of the child seat buyer. To fetch the remarketing tag
|
---|
63 | * for a specific user list, the name must follow the pattern
|
---|
64 | * `buyers/{accountId}/userLists/{userListId}`. See UserList.name.
|
---|
65 | * @param array $optParams Optional parameters.
|
---|
66 | * @return GetRemarketingTagResponse
|
---|
67 | * @throws \Google\Service\Exception
|
---|
68 | */
|
---|
69 | public function getRemarketingTag($name, $optParams = [])
|
---|
70 | {
|
---|
71 | $params = ['name' => $name];
|
---|
72 | $params = array_merge($params, $optParams);
|
---|
73 | return $this->call('getRemarketingTag', [$params], GetRemarketingTagResponse::class);
|
---|
74 | }
|
---|
75 | /**
|
---|
76 | * Lists all buyer account information the calling buyer user or service account
|
---|
77 | * is permissioned to manage. (buyers.listBuyers)
|
---|
78 | *
|
---|
79 | * @param array $optParams Optional parameters.
|
---|
80 | *
|
---|
81 | * @opt_param int pageSize The maximum number of buyers to return. If
|
---|
82 | * unspecified, at most 100 buyers will be returned. The maximum value is 500;
|
---|
83 | * values above 500 will be coerced to 500.
|
---|
84 | * @opt_param string pageToken A token identifying a page of results the server
|
---|
85 | * should return. This value is received from a previous `ListBuyers` call in
|
---|
86 | * ListBuyersResponse.nextPageToken.
|
---|
87 | * @return ListBuyersResponse
|
---|
88 | * @throws \Google\Service\Exception
|
---|
89 | */
|
---|
90 | public function listBuyers($optParams = [])
|
---|
91 | {
|
---|
92 | $params = [];
|
---|
93 | $params = array_merge($params, $optParams);
|
---|
94 | return $this->call('list', [$params], ListBuyersResponse::class);
|
---|
95 | }
|
---|
96 | }
|
---|
97 |
|
---|
98 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
99 | class_alias(Buyers::class, 'Google_Service_RealTimeBidding_Resource_Buyers');
|
---|