Google_Service_ShoppingContent_Products_Resource

The "products" collection of methods.

Defined (1)

The class is defined in the following location(s).

/includes/api-libs/Google/Service/ShoppingContent.php  
  1. class Google_Service_ShoppingContent_Products_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Retrieves, inserts, and deletes multiple products in a single request. 
  5. * (products.custombatch) 
  6. * @param Google_ProductsCustomBatchRequest $postBody 
  7. * @param array $optParams Optional parameters. 
  8. * @opt_param bool dryRun Flag to run the request in dry-run mode. 
  9. * @return Google_Service_ShoppingContent_ProductsCustomBatchResponse 
  10. */ 
  11. public function custombatch(Google_Service_ShoppingContent_ProductsCustomBatchRequest $postBody, $optParams = array()) 
  12. $params = array('postBody' => $postBody); 
  13. $params = array_merge($params, $optParams); 
  14. return $this->call('custombatch', array($params), "Google_Service_ShoppingContent_ProductsCustomBatchResponse"); 
  15.  
  16. /** 
  17. * Deletes a product from your Merchant Center account. (products.delete) 
  18. * @param string $merchantId The ID of the managing account. 
  19. * @param string $productId The ID of the product. 
  20. * @param array $optParams Optional parameters. 
  21. * @opt_param bool dryRun Flag to run the request in dry-run mode. 
  22. */ 
  23. public function delete($merchantId, $productId, $optParams = array()) 
  24. $params = array('merchantId' => $merchantId, 'productId' => $productId); 
  25. $params = array_merge($params, $optParams); 
  26. return $this->call('delete', array($params)); 
  27.  
  28. /** 
  29. * Retrieves a product from your Merchant Center account. (products.get) 
  30. * @param string $merchantId The ID of the managing account. 
  31. * @param string $productId The ID of the product. 
  32. * @param array $optParams Optional parameters. 
  33. * @return Google_Service_ShoppingContent_Product 
  34. */ 
  35. public function get($merchantId, $productId, $optParams = array()) 
  36. $params = array('merchantId' => $merchantId, 'productId' => $productId); 
  37. $params = array_merge($params, $optParams); 
  38. return $this->call('get', array($params), "Google_Service_ShoppingContent_Product"); 
  39.  
  40. /** 
  41. * Uploads a product to your Merchant Center account. (products.insert) 
  42. * @param string $merchantId The ID of the managing account. 
  43. * @param Google_Product $postBody 
  44. * @param array $optParams Optional parameters. 
  45. * @opt_param bool dryRun Flag to run the request in dry-run mode. 
  46. * @return Google_Service_ShoppingContent_Product 
  47. */ 
  48. public function insert($merchantId, Google_Service_ShoppingContent_Product $postBody, $optParams = array()) 
  49. $params = array('merchantId' => $merchantId, 'postBody' => $postBody); 
  50. $params = array_merge($params, $optParams); 
  51. return $this->call('insert', array($params), "Google_Service_ShoppingContent_Product"); 
  52.  
  53. /** 
  54. * Lists the products in your Merchant Center account. (products.listProducts) 
  55. * @param string $merchantId The ID of the managing account. 
  56. * @param array $optParams Optional parameters. 
  57. * @opt_param string pageToken The token returned by the previous request. 
  58. * @opt_param string maxResults The maximum number of products to return in the 
  59. * response, used for paging. 
  60. * @return Google_Service_ShoppingContent_ProductsListResponse 
  61. */ 
  62. public function listProducts($merchantId, $optParams = array()) 
  63. $params = array('merchantId' => $merchantId); 
  64. $params = array_merge($params, $optParams); 
  65. return $this->call('list', array($params), "Google_Service_ShoppingContent_ProductsListResponse");