[e3d4e0a] | 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\Dfareporting\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Dfareporting\AdvertiserLandingPagesListResponse;
|
---|
| 21 | use Google\Service\Dfareporting\LandingPage;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "advertiserLandingPages" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $dfareportingService = new Google\Service\Dfareporting(...);
|
---|
| 28 | * $advertiserLandingPages = $dfareportingService->advertiserLandingPages;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class AdvertiserLandingPages extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Gets one landing page by ID. (advertiserLandingPages.get)
|
---|
| 35 | *
|
---|
| 36 | * @param string $profileId User profile ID associated with this request.
|
---|
| 37 | * @param string $id Landing page ID.
|
---|
| 38 | * @param array $optParams Optional parameters.
|
---|
| 39 | * @return LandingPage
|
---|
| 40 | * @throws \Google\Service\Exception
|
---|
| 41 | */
|
---|
| 42 | public function get($profileId, $id, $optParams = [])
|
---|
| 43 | {
|
---|
| 44 | $params = ['profileId' => $profileId, 'id' => $id];
|
---|
| 45 | $params = array_merge($params, $optParams);
|
---|
| 46 | return $this->call('get', [$params], LandingPage::class);
|
---|
| 47 | }
|
---|
| 48 | /**
|
---|
| 49 | * Inserts a new landing page. (advertiserLandingPages.insert)
|
---|
| 50 | *
|
---|
| 51 | * @param string $profileId User profile ID associated with this request.
|
---|
| 52 | * @param LandingPage $postBody
|
---|
| 53 | * @param array $optParams Optional parameters.
|
---|
| 54 | * @return LandingPage
|
---|
| 55 | * @throws \Google\Service\Exception
|
---|
| 56 | */
|
---|
| 57 | public function insert($profileId, LandingPage $postBody, $optParams = [])
|
---|
| 58 | {
|
---|
| 59 | $params = ['profileId' => $profileId, 'postBody' => $postBody];
|
---|
| 60 | $params = array_merge($params, $optParams);
|
---|
| 61 | return $this->call('insert', [$params], LandingPage::class);
|
---|
| 62 | }
|
---|
| 63 | /**
|
---|
| 64 | * Retrieves a list of landing pages.
|
---|
| 65 | * (advertiserLandingPages.listAdvertiserLandingPages)
|
---|
| 66 | *
|
---|
| 67 | * @param string $profileId User profile ID associated with this request.
|
---|
| 68 | * @param array $optParams Optional parameters.
|
---|
| 69 | *
|
---|
| 70 | * @opt_param string advertiserIds Select only landing pages that belong to
|
---|
| 71 | * these advertisers.
|
---|
| 72 | * @opt_param bool archived Select only archived landing pages. Don't set this
|
---|
| 73 | * field to select both archived and non-archived landing pages.
|
---|
| 74 | * @opt_param string campaignIds Select only landing pages that are associated
|
---|
| 75 | * with these campaigns.
|
---|
| 76 | * @opt_param string ids Select only landing pages with these IDs.
|
---|
| 77 | * @opt_param int maxResults Maximum number of results to return.
|
---|
| 78 | * @opt_param string pageToken Value of the nextPageToken from the previous
|
---|
| 79 | * result page.
|
---|
| 80 | * @opt_param string searchString Allows searching for landing pages by name or
|
---|
| 81 | * ID. Wildcards (*) are allowed. For example, "landingpage*2017" will return
|
---|
| 82 | * landing pages with names like "landingpage July 2017", "landingpage March
|
---|
| 83 | * 2017", or simply "landingpage 2017". Most of the searches also add wildcards
|
---|
| 84 | * implicitly at the start and the end of the search string. For example, a
|
---|
| 85 | * search string of "landingpage" will match campaigns with name "my
|
---|
| 86 | * landingpage", "landingpage 2015", or simply "landingpage".
|
---|
| 87 | * @opt_param string sortField Field by which to sort the list.
|
---|
| 88 | * @opt_param string sortOrder Order of sorted results.
|
---|
| 89 | * @opt_param string subaccountId Select only landing pages that belong to this
|
---|
| 90 | * subaccount.
|
---|
| 91 | * @return AdvertiserLandingPagesListResponse
|
---|
| 92 | * @throws \Google\Service\Exception
|
---|
| 93 | */
|
---|
| 94 | public function listAdvertiserLandingPages($profileId, $optParams = [])
|
---|
| 95 | {
|
---|
| 96 | $params = ['profileId' => $profileId];
|
---|
| 97 | $params = array_merge($params, $optParams);
|
---|
| 98 | return $this->call('list', [$params], AdvertiserLandingPagesListResponse::class);
|
---|
| 99 | }
|
---|
| 100 | /**
|
---|
| 101 | * Updates an existing landing page. This method supports patch semantics.
|
---|
| 102 | * (advertiserLandingPages.patch)
|
---|
| 103 | *
|
---|
| 104 | * @param string $profileId User profile ID associated with this request.
|
---|
| 105 | * @param string $id Required. Landing Page ID.
|
---|
| 106 | * @param LandingPage $postBody
|
---|
| 107 | * @param array $optParams Optional parameters.
|
---|
| 108 | * @return LandingPage
|
---|
| 109 | * @throws \Google\Service\Exception
|
---|
| 110 | */
|
---|
| 111 | public function patch($profileId, $id, LandingPage $postBody, $optParams = [])
|
---|
| 112 | {
|
---|
| 113 | $params = ['profileId' => $profileId, 'id' => $id, 'postBody' => $postBody];
|
---|
| 114 | $params = array_merge($params, $optParams);
|
---|
| 115 | return $this->call('patch', [$params], LandingPage::class);
|
---|
| 116 | }
|
---|
| 117 | /**
|
---|
| 118 | * Updates an existing landing page. (advertiserLandingPages.update)
|
---|
| 119 | *
|
---|
| 120 | * @param string $profileId User profile ID associated with this request.
|
---|
| 121 | * @param LandingPage $postBody
|
---|
| 122 | * @param array $optParams Optional parameters.
|
---|
| 123 | * @return LandingPage
|
---|
| 124 | * @throws \Google\Service\Exception
|
---|
| 125 | */
|
---|
| 126 | public function update($profileId, LandingPage $postBody, $optParams = [])
|
---|
| 127 | {
|
---|
| 128 | $params = ['profileId' => $profileId, 'postBody' => $postBody];
|
---|
| 129 | $params = array_merge($params, $optParams);
|
---|
| 130 | return $this->call('update', [$params], LandingPage::class);
|
---|
| 131 | }
|
---|
| 132 | }
|
---|
| 133 |
|
---|
| 134 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 135 | class_alias(AdvertiserLandingPages::class, 'Google_Service_Dfareporting_Resource_AdvertiserLandingPages');
|
---|