list method

Future<ListAggregateProductStatusesResponse> list(
  1. String parent, {
  2. String? filter,
  3. int? pageSize,
  4. String? pageToken,
  5. String? $fields,
})

Lists the AggregateProductStatuses resources for your merchant account.

The response might contain fewer items than specified by pageSize. If pageToken was returned in previous request, it can be used to obtain additional results. This method can only be accessed by standalone accounts and sub-accounts of an advanced account. To retrieve product statuses for sub-accounts, you must first call the accounts.listSubaccounts method to obtain a list of sub-accounts, and then call accounts.aggregateProductStatuses.list for each sub-account individually.

Request parameters:

parent - Required. The account to list aggregate product statuses for. Format: accounts/{account} Can only be sub-accounts and standalone accounts. Value must have pattern ^accounts/\[^/\]+$.

filter - Optional. A filter expression that filters the aggregate product statuses. Filtering is only supported by the reporting_context and country field. For example: reporting_context = "SHOPPING_ADS" AND country = "US".

pageSize - Optional. The maximum number of aggregate product statuses to return. The service may return fewer than this value. If unspecified, at most 25 aggregate product statuses are returned. The maximum value is 250; values above 250 are coerced to 250.

pageToken - Optional. A page token, received from a previous ListAggregateProductStatuses call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAggregateProductStatuses must match the call that provided the page token.

$fields - Selector specifying which fields to include in a partial response.

Completes with a ListAggregateProductStatusesResponse.

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<ListAggregateProductStatusesResponse> list(
  core.String parent, {
  core.String? filter,
  core.int? pageSize,
  core.String? pageToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'filter': ?filter == null ? null : [filter],
    'pageSize': ?pageSize == null ? null : ['${pageSize}'],
    'pageToken': ?pageToken == null ? null : [pageToken],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ =
      'issueresolution/v1/' +
      core.Uri.encodeFull('$parent') +
      '/aggregateProductStatuses';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return ListAggregateProductStatusesResponse.fromJson(
    response_ as core.Map<core.String, core.dynamic>,
  );
}