updateAutomaticImprovements method
- AutomaticImprovements request,
- String name, {
- String? updateMask,
- String? $fields,
Updates the automatic improvements of an account.
request
- The metadata request object.
Request parameters:
name
- Identifier. The resource name of the automatic improvements.
Format: accounts/{account}/automaticImprovements
.
Value must have pattern ^accounts/\[^/\]+/automaticImprovements$
.
updateMask
- Required. List of fields being updated. The following
fields are supported (in both snake_case
and lowerCamelCase
): -
item_updates
- item_updates.account_level_settings
-
image_improvements
- image_improvements.account_level_settings
-
shipping_improvements
-
shipping_improvements.allow_shipping_improvements
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a AutomaticImprovements.
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<AutomaticImprovements> updateAutomaticImprovements(
AutomaticImprovements request,
core.String name, {
core.String? updateMask,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (updateMask != null) 'updateMask': [updateMask],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'accounts/v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'PATCH',
body: body_,
queryParams: queryParams_,
);
return AutomaticImprovements.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}