list method

Future<ListAccountIssuesResponse> list(
  1. String parent, {
  2. String? languageCode,
  3. int? pageSize,
  4. String? pageToken,
  5. String? timeZone,
  6. String? $fields,
})

Lists all account issues of a Merchant Center account.

When called on a multi-client account, this method only returns issues belonging to that account, not its sub-accounts. To retrieve issues for sub-accounts, you must first call the accounts.listSubaccounts method to obtain a list of sub-accounts, and then call accounts.issues.list for each sub-account individually.

Request parameters:

parent - Required. The parent, which owns this collection of issues. Format: accounts/{account} Value must have pattern ^accounts/\[^/\]+$.

languageCode - Optional. The issues in the response will have human-readable fields in the given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), such as en-US or sr-Latn. If not value is provided, en-US will be used.

pageSize - Optional. The maximum number of issues to return. The service may return fewer than this value. If unspecified, at most 50 issues will be returned. The maximum value is 100; values above 100 will be coerced to 100

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

timeZone - Optional. The IANA timezone used to localize times in human-readable fields. For example 'America/Los_Angeles'. If not set, 'America/Los_Angeles' will be used.

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

Completes with a ListAccountIssuesResponse.

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

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

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