public function insertProductBatch($products)
 {
     $entries = array();
     foreach ($products as $key => $product) {
         $entry = new Google_Service_ShoppingContent_ProductsCustomBatchRequestEntry();
         $entry->setMethod('insert');
         $entry->setBatchId($key);
         $entry->setProduct($product);
         $entry->setMerchantId($this->merchant_id);
         $entries[] = $entry;
     }
     $batch_request = new Google_Service_ShoppingContent_ProductsCustomBatchRequest();
     $batch_request->setEntries($entries);
     $batch_response = $this->service->products->custombatch($batch_request);
     printf("Inserted %d products.\n", count($batch_response->entries));
     foreach ($batch_response->entries as $entry) {
         if (empty($entry->getErrors())) {
             $product = $entry->getProduct();
             printf("Inserted product %s with %d warnings\n", $product->getOfferId(), count($product->getWarnings()));
         } else {
             print "There were errors inserting a product:\n";
             foreach ($entry->getErrors()->getErrors() as $error) {
                 printf("\t%s\n", $error->getMessage());
             }
         }
     }
 }