renderproductissues method

Future<RenderProductIssuesResponse> renderproductissues(
  1. RenderIssuesRequestPayload request,
  2. String name, {
  3. String? languageCode,
  4. String? timeZone,
  5. String? $fields,
})

Provide a list of issues for business's product with an issue resolution content and available actions.

This content and actions are meant to be rendered and shown in third-party applications.

request - The metadata request object.

Request parameters:

name - Required. The name of the product to fetch issues for. Format: accounts/{account}/products/{product} Value must have pattern ^accounts/\[^/\]+/products/\[^/\]+$.

languageCode - Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language code used to localize an issue resolution content. If not set, the result will be in default language en-US.

timeZone - Optional. The IANA timezone used to localize times in an issue resolution content. For example 'America/Los_Angeles'. If not set, results will use as a default UTC.

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

Completes with a RenderProductIssuesResponse.

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<RenderProductIssuesResponse> renderproductissues(
  RenderIssuesRequestPayload request,
  core.String name, {
  core.String? languageCode,
  core.String? timeZone,
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if (languageCode != null) 'languageCode': [languageCode],
    if (timeZone != null) 'timeZone': [timeZone],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ =
      'issueresolution/v1/' +
      core.Uri.encodeFull('$name') +
      ':renderproductissues';

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