get method
Gets the product from a Manufacturer Center account, including product issues.
A recently updated product takes around 15 minutes to process. Changes are only visible after it has been processed. While some issues may be available once the product has been processed, other issues may take days to appear.
Request parameters:
parent
- Parent ID in the format accounts/{account_id}
. account_id
-
The ID of the Manufacturer Center account.
Value must have pattern ^accounts/\[^/\]+$
.
name
- Name in the format
{target_country}:{content_language}:{product_id}
. target_country
- The
target country of the product as a CLDR territory code (for example, US).
content_language
- The content language of the product as a two-letter
ISO 639-1 language code (for example, en). product_id
- The ID of the
product. For more information, see
https://support.google.com/manufacturers/answer/6124116#id.
Value must have pattern ^\[^/\]+$
.
include
- The information to be included in the response. Only sections
listed here will be returned.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Product.
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<Product> get(
core.String parent,
core.String name, {
core.List<core.String>? include,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (include != null) 'include': include,
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' +
core.Uri.encodeFull('$parent') +
'/products/' +
core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Product.fromJson(response_ as core.Map<core.String, core.dynamic>);
}