[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\AdExchangeBuyerII\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\AdExchangeBuyerII\ListProposalsResponse;
|
---|
| 21 | use Google\Service\AdExchangeBuyerII\PauseProposalDealsRequest;
|
---|
| 22 | use Google\Service\AdExchangeBuyerII\Proposal;
|
---|
| 23 | use Google\Service\AdExchangeBuyerII\ResumeProposalDealsRequest;
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * The "finalizedProposals" collection of methods.
|
---|
| 27 | * Typical usage is:
|
---|
| 28 | * <code>
|
---|
| 29 | * $adexchangebuyer2Service = new Google\Service\AdExchangeBuyerII(...);
|
---|
| 30 | * $finalizedProposals = $adexchangebuyer2Service->accounts_finalizedProposals;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class AccountsFinalizedProposals extends \Google\Service\Resource
|
---|
| 34 | {
|
---|
| 35 | /**
|
---|
| 36 | * List finalized proposals, regardless if a proposal is being renegotiated. A
|
---|
| 37 | * filter expression (PQL query) may be specified to filter the results. The
|
---|
| 38 | * notes will not be returned.
|
---|
| 39 | * (finalizedProposals.listAccountsFinalizedProposals)
|
---|
| 40 | *
|
---|
| 41 | * @param string $accountId Account ID of the buyer.
|
---|
| 42 | * @param array $optParams Optional parameters.
|
---|
| 43 | *
|
---|
| 44 | * @opt_param string filter An optional PQL filter query used to query for
|
---|
| 45 | * proposals. Nested repeated fields, such as proposal.deals.targetingCriterion,
|
---|
| 46 | * cannot be filtered.
|
---|
| 47 | * @opt_param string filterSyntax Syntax the filter is written in. Current
|
---|
| 48 | * implementation defaults to PQL but in the future it will be LIST_FILTER.
|
---|
| 49 | * @opt_param int pageSize Requested page size. The server may return fewer
|
---|
| 50 | * results than requested. If unspecified, the server will pick an appropriate
|
---|
| 51 | * default.
|
---|
| 52 | * @opt_param string pageToken The page token as returned from
|
---|
| 53 | * ListProposalsResponse.
|
---|
| 54 | * @return ListProposalsResponse
|
---|
| 55 | * @throws \Google\Service\Exception
|
---|
| 56 | */
|
---|
| 57 | public function listAccountsFinalizedProposals($accountId, $optParams = [])
|
---|
| 58 | {
|
---|
| 59 | $params = ['accountId' => $accountId];
|
---|
| 60 | $params = array_merge($params, $optParams);
|
---|
| 61 | return $this->call('list', [$params], ListProposalsResponse::class);
|
---|
| 62 | }
|
---|
| 63 | /**
|
---|
| 64 | * Update given deals to pause serving. This method will set the
|
---|
| 65 | * `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true for all
|
---|
| 66 | * listed deals in the request. Currently, this method only applies to PG and PD
|
---|
| 67 | * deals. For PA deals, call accounts.proposals.pause endpoint. It is a no-op to
|
---|
| 68 | * pause already-paused deals. It is an error to call PauseProposalDeals for
|
---|
| 69 | * deals which are not part of the proposal of proposal_id or which are not
|
---|
| 70 | * finalized or renegotiating. (finalizedProposals.pause)
|
---|
| 71 | *
|
---|
| 72 | * @param string $accountId Account ID of the buyer.
|
---|
| 73 | * @param string $proposalId The proposal_id of the proposal containing the
|
---|
| 74 | * deals.
|
---|
| 75 | * @param PauseProposalDealsRequest $postBody
|
---|
| 76 | * @param array $optParams Optional parameters.
|
---|
| 77 | * @return Proposal
|
---|
| 78 | * @throws \Google\Service\Exception
|
---|
| 79 | */
|
---|
| 80 | public function pause($accountId, $proposalId, PauseProposalDealsRequest $postBody, $optParams = [])
|
---|
| 81 | {
|
---|
| 82 | $params = ['accountId' => $accountId, 'proposalId' => $proposalId, 'postBody' => $postBody];
|
---|
| 83 | $params = array_merge($params, $optParams);
|
---|
| 84 | return $this->call('pause', [$params], Proposal::class);
|
---|
| 85 | }
|
---|
| 86 | /**
|
---|
| 87 | * Update given deals to resume serving. This method will set the
|
---|
| 88 | * `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to false for all
|
---|
| 89 | * listed deals in the request. Currently, this method only applies to PG and PD
|
---|
| 90 | * deals. For PA deals, call accounts.proposals.resume endpoint. It is a no-op
|
---|
| 91 | * to resume running deals or deals paused by the other party. It is an error to
|
---|
| 92 | * call ResumeProposalDeals for deals which are not part of the proposal of
|
---|
| 93 | * proposal_id or which are not finalized or renegotiating.
|
---|
| 94 | * (finalizedProposals.resume)
|
---|
| 95 | *
|
---|
| 96 | * @param string $accountId Account ID of the buyer.
|
---|
| 97 | * @param string $proposalId The proposal_id of the proposal containing the
|
---|
| 98 | * deals.
|
---|
| 99 | * @param ResumeProposalDealsRequest $postBody
|
---|
| 100 | * @param array $optParams Optional parameters.
|
---|
| 101 | * @return Proposal
|
---|
| 102 | * @throws \Google\Service\Exception
|
---|
| 103 | */
|
---|
| 104 | public function resume($accountId, $proposalId, ResumeProposalDealsRequest $postBody, $optParams = [])
|
---|
| 105 | {
|
---|
| 106 | $params = ['accountId' => $accountId, 'proposalId' => $proposalId, 'postBody' => $postBody];
|
---|
| 107 | $params = array_merge($params, $optParams);
|
---|
| 108 | return $this->call('resume', [$params], Proposal::class);
|
---|
| 109 | }
|
---|
| 110 | }
|
---|
| 111 |
|
---|
| 112 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 113 | class_alias(AccountsFinalizedProposals::class, 'Google_Service_AdExchangeBuyerII_Resource_AccountsFinalizedProposals');
|
---|