renderaccountissues method
- RenderIssuesRequestPayload request,
- String name, {
- String? languageCode,
- String? timeZone,
- String? $fields,
Provide a list of business's account issues 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 account to fetch issues for. Format:
accounts/{account}
Value must have pattern ^accounts/\[^/\]+$
.
languageCode
- Optional. The [IETF
BCP-47](https://tools.ietf.org/html/bcp47) language code used to localize
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 RenderAccountIssuesResponse.
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<RenderAccountIssuesResponse> renderaccountissues(
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') +
':renderaccountissues';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return RenderAccountIssuesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}