ice\Exception */ public function insert($merchantId, Product $postBody, $optParams = []) { $params = ['merchantId' => $merchantId, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('insert', [$params], Product::class); } /** * Lists the products in your Merchant Center account. The response might * contain fewer items than specified by maxResults. Rely on nextPageToken to * determine if there are more items to be requested. (products.listProducts) * * @param string $merchantId The ID of the account that contains the products. * This account cannot be a multi-client account. * @param array $optParams Optional parameters. * * @opt_param string maxResults The maximum number of products to return in the * response, used for paging. The default value is 25. The maximum value is 250. * @opt_param string pageToken The token returned by the previous request. * @return ProductsListResponse * @throws \Google\Service\Exception */ public function listProducts($merchantId, $optParams = []) { $params = ['merchantId' => $merchantId]; $params = array_merge($params, $optParams); return $this->call('list', [$params], ProductsListResponse::class); } /** * Updates an existing product in your Merchant Center account. Only updates * attributes provided in the request. (products.update) * * @param string $merchantId The ID of the account that contains the product. * This account cannot be a multi-client account. * @param string $productId The REST ID of the product for which to update. * @param Product $postBody * @param array $optParams Optional parameters. * * @opt_param string updateMask The comma-separated list of product attributes * to be updated. Example: `"title,salePrice"`. Attributes specified in the * update mask without a value specified in the body will be deleted from the * product. *You must specify the update mask to delete attributes.* Only top- * level product attributes can be updated. If not defined, product attributes * with set values will be updated and other attributes will stay unchanged. * @return Product * @throws \Google\Service\Exception */ public function update($merchantId, $productId, Product $postBody, $optParams = []) { $params = ['merchantId' => $merchantId, 'productId' => $productId, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('update', [$params], Product::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(Products::class, 'Google_Service_ShoppingContent_Resource_Products');