list method
List finalized proposals, regardless if a proposal is being renegotiated.
A filter expression (PQL query) may be specified to filter the results. The notes will not be returned.
Request parameters:
accountId
- Account ID of the buyer.
filter
- An optional PQL filter query used to query for proposals.
Nested repeated fields, such as proposal.deals.targetingCriterion, cannot
be filtered.
filterSyntax
- Syntax the filter is written in. Current implementation
defaults to PQL but in the future it will be LIST_FILTER.
Possible string values are:
- "FILTER_SYNTAX_UNSPECIFIED" : A placeholder for an undefined filter syntax.
- "PQL" : PQL query syntax. Visit https://developers.google.com/ad-manager/api/pqlreference for PQL documentation and examples.
- "LIST_FILTER" : API list filtering syntax. Read about syntax and usage at https://developers.google.com/authorized-buyers/apis/guides/v2/list-filters.
pageSize
- Requested page size. The server may return fewer results than
requested. If unspecified, the server will pick an appropriate default.
pageToken
- The page token as returned from ListProposalsResponse.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListProposalsResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<ListProposalsResponse> list(
core.String accountId, {
core.String? filter,
core.String? filterSyntax,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (filterSyntax != null) 'filterSyntax': [filterSyntax],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/finalizedProposals';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListProposalsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}