delete method
Deletes a product input from your Merchant Center account.
After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.
Request parameters:
name
- Required. The name of the product input resource to delete.
Format: accounts/{account}/productInputs/{product}
where the last
section product
consists of: content_language~feed_label~offer_id
example for product name is accounts/123/productInputs/en~US~sku123
.
Value must have pattern ^accounts/\[^/\]+/productInputs/\[^/\]+$
.
dataSource
- Required. The primary or supplemental data source from
which the product input should be deleted. Format:
accounts/{account}/dataSources/{datasource}
. For example,
accounts/123456/dataSources/104628
.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Empty.
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<Empty> delete(
core.String name, {
core.String? dataSource,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (dataSource != null) 'dataSource': [dataSource],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'products/v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}