ManufacturerCenter.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. namespace Google\Service;
  18. use Google\Client;
  19. /**
  20. * Service definition for ManufacturerCenter (v1).
  21. *
  22. * <p>
  23. * Public API for managing Manufacturer Center related data.</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://developers.google.com/manufacturers/" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class ManufacturerCenter extends \Google\Service
  33. {
  34. /** Manage your product listings for Google Manufacturer Center. */
  35. const MANUFACTURERCENTER =
  36. "https://www.googleapis.com/auth/manufacturercenter";
  37. public $accounts_languages_productCertifications;
  38. public $accounts_products;
  39. public $rootUrlTemplate;
  40. /**
  41. * Constructs the internal representation of the ManufacturerCenter service.
  42. *
  43. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  44. * config array to pass to a new Client instance.
  45. * @param string $rootUrl The root URL used for requests to the service.
  46. */
  47. public function __construct($clientOrConfig = [], $rootUrl = null)
  48. {
  49. parent::__construct($clientOrConfig);
  50. $this->rootUrl = $rootUrl ?: 'https://manufacturers.googleapis.com/';
  51. $this->rootUrlTemplate = $rootUrl ?: 'https://manufacturers.UNIVERSE_DOMAIN/';
  52. $this->servicePath = '';
  53. $this->batchPath = 'batch';
  54. $this->version = 'v1';
  55. $this->serviceName = 'manufacturers';
  56. $this->accounts_languages_productCertifications = new ManufacturerCenter\Resource\AccountsLanguagesProductCertifications(
  57. $this,
  58. $this->serviceName,
  59. 'productCertifications',
  60. [
  61. 'methods' => [
  62. 'delete' => [
  63. 'path' => 'v1/{+name}',
  64. 'httpMethod' => 'DELETE',
  65. 'parameters' => [
  66. 'name' => [
  67. 'location' => 'path',
  68. 'type' => 'string',
  69. 'required' => true,
  70. ],
  71. ],
  72. ],'get' => [
  73. 'path' => 'v1/{+name}',
  74. 'httpMethod' => 'GET',
  75. 'parameters' => [
  76. 'name' => [
  77. 'location' => 'path',
  78. 'type' => 'string',
  79. 'required' => true,
  80. ],
  81. ],
  82. ],'list' => [
  83. 'path' => 'v1/{+parent}/productCertifications',
  84. 'httpMethod' => 'GET',
  85. 'parameters' => [
  86. 'parent' => [
  87. 'location' => 'path',
  88. 'type' => 'string',
  89. 'required' => true,
  90. ],
  91. 'pageSize' => [
  92. 'location' => 'query',
  93. 'type' => 'integer',
  94. ],
  95. 'pageToken' => [
  96. 'location' => 'query',
  97. 'type' => 'string',
  98. ],
  99. ],
  100. ],'patch' => [
  101. 'path' => 'v1/{+name}',
  102. 'httpMethod' => 'PATCH',
  103. 'parameters' => [
  104. 'name' => [
  105. 'location' => 'path',
  106. 'type' => 'string',
  107. 'required' => true,
  108. ],
  109. 'updateMask' => [
  110. 'location' => 'query',
  111. 'type' => 'string',
  112. ],
  113. ],
  114. ],
  115. ]
  116. ]
  117. );
  118. $this->accounts_products = new ManufacturerCenter\Resource\AccountsProducts(
  119. $this,
  120. $this->serviceName,
  121. 'products',
  122. [
  123. 'methods' => [
  124. 'delete' => [
  125. 'path' => 'v1/{+parent}/products/{+name}',
  126. 'httpMethod' => 'DELETE',
  127. 'parameters' => [
  128. 'parent' => [
  129. 'location' => 'path',
  130. 'type' => 'string',
  131. 'required' => true,
  132. ],
  133. 'name' => [
  134. 'location' => 'path',
  135. 'type' => 'string',
  136. 'required' => true,
  137. ],
  138. ],
  139. ],'get' => [
  140. 'path' => 'v1/{+parent}/products/{+name}',
  141. 'httpMethod' => 'GET',
  142. 'parameters' => [
  143. 'parent' => [
  144. 'location' => 'path',
  145. 'type' => 'string',
  146. 'required' => true,
  147. ],
  148. 'name' => [
  149. 'location' => 'path',
  150. 'type' => 'string',
  151. 'required' => true,
  152. ],
  153. 'include' => [
  154. 'location' => 'query',
  155. 'type' => 'string',
  156. 'repeated' => true,
  157. ],
  158. ],
  159. ],'list' => [
  160. 'path' => 'v1/{+parent}/products',
  161. 'httpMethod' => 'GET',
  162. 'parameters' => [
  163. 'parent' => [
  164. 'location' => 'path',
  165. 'type' => 'string',
  166. 'required' => true,
  167. ],
  168. 'include' => [
  169. 'location' => 'query',
  170. 'type' => 'string',
  171. 'repeated' => true,
  172. ],
  173. 'pageSize' => [
  174. 'location' => 'query',
  175. 'type' => 'integer',
  176. ],
  177. 'pageToken' => [
  178. 'location' => 'query',
  179. 'type' => 'string',
  180. ],
  181. ],
  182. ],'update' => [
  183. 'path' => 'v1/{+parent}/products/{+name}',
  184. 'httpMethod' => 'PUT',
  185. 'parameters' => [
  186. 'parent' => [
  187. 'location' => 'path',
  188. 'type' => 'string',
  189. 'required' => true,
  190. ],
  191. 'name' => [
  192. 'location' => 'path',
  193. 'type' => 'string',
  194. 'required' => true,
  195. ],
  196. ],
  197. ],
  198. ]
  199. ]
  200. );
  201. }
  202. }
  203. // Adding a class alias for backwards compatibility with the previous class name.
  204. class_alias(ManufacturerCenter::class, 'Google_Service_ManufacturerCenter');