renderproductissues method

Future<RenderProductIssuesResponse> renderproductissues(
  1. RenderProductIssuesRequestPayload request,
  2. String merchantId,
  3. String productId, {
  4. String? languageCode,
  5. String? timeZone,
  6. String? $fields,
})

Provide a list of issues for merchant's product with a support 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:

merchantId - Required. The ID of the account that contains the product.

productId - Required. The REST_ID of the product to fetch issues for.

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

timeZone - Optional. The IANA timezone used to localize times in support 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(
  RenderProductIssuesRequestPayload request,
  core.String merchantId,
  core.String productId, {
  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_ = commons.escapeVariable('$merchantId') +
      '/merchantsupport/renderproductissues/' +
      commons.escapeVariable('$productId');

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