private function createExampleProduct($offer_id) { $product = new Google_Service_ShoppingContent_Product(); $product->setOfferId($offer_id); $product->setTitle('A Tale of Two Cities'); $product->setDescription('A classic novel about the French Revolution'); $product->setLink('http://my-book-shop.com/tale-of-two-cities.html'); $product->setImageLink('http://my-book-shop.com/tale-of-two-cities.jpg'); $product->setContentLanguage('en'); $product->setTargetCountry('US'); $product->setChannel('online'); $product->setAvailability('in stock'); $product->setCondition('new'); $product->setGoogleProductCategory('Media > Books'); $product->setGtin('9780007350896'); $price = new Google_Service_ShoppingContent_Price(); $price->setValue('2.50'); $price->setCurrency('USD'); $product->setPrice($price); $shipping_price = new Google_Service_ShoppingContent_Price(); $shipping_price->setValue('0.99'); $shipping_price->setCurrency('USD'); $shipping = new Google_Service_ShoppingContent_ProductShipping(); $shipping->setPrice($shipping_price); $shipping->setCountry('US'); $shipping->setService('Standard shipping'); $product->setShipping(array($shipping)); $shipping_weight = new Google_Service_ShoppingContent_ProductShippingWeight(); $shipping_weight->setValue(200); $shipping_weight->setUnit('grams'); $product->setShippingWeight($shipping_weight); return $product; }