list method

Future<ListProposalsResponse> list(
  1. String accountId, {
  2. String? filter,
  3. String? filterSyntax,
  4. int? pageSize,
  5. String? pageToken,
  6. String? $fields,
})

List proposals.

A filter expression (PQL query) may be specified to filter the results. To retrieve all finalized proposals, regardless if a proposal is being renegotiated, see the FinalizedProposals resource. Note that Bidder/ChildSeat relationships differ from the usual behavior. A Bidder account can only see its child seats' proposals by specifying the ChildSeat's accountId in the request path.

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:

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') +
      '/proposals';

  final _response = await _requester.request(
    _url,
    'GET',
    queryParams: _queryParams,
  );
  return ListProposalsResponse.fromJson(
      _response as core.Map<core.String, core.dynamic>);
}