/mods/_standard/calendar/lib/vendor/google/apiclient-services/Google/Service/ShoppingContent/Resource/Orders.php

https://github.com/cindyli/ATutor · PHP · 275 lines · 94 code · 1 blank · 180 comment · 0 complexity · 8a97d1073f8a5f066ece9993fa1fedf3 MD5 · raw file

  1. <?php
  2. /*
  3. * Copyright 2016 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. /**
  18. * The "orders" collection of methods.
  19. * Typical usage is:
  20. * <code>
  21. * $contentService = new Google_Service_ShoppingContent(...);
  22. * $orders = $contentService->orders;
  23. * </code>
  24. */
  25. class Google_Service_ShoppingContent_Resource_Orders extends Google_Service_Resource
  26. {
  27. /**
  28. * Marks an order as acknowledged. (orders.acknowledge)
  29. *
  30. * @param string $merchantId The ID of the managing account.
  31. * @param string $orderId The ID of the order.
  32. * @param Google_Service_ShoppingContent_OrdersAcknowledgeRequest $postBody
  33. * @param array $optParams Optional parameters.
  34. * @return Google_Service_ShoppingContent_OrdersAcknowledgeResponse
  35. */
  36. public function acknowledge($merchantId, $orderId, Google_Service_ShoppingContent_OrdersAcknowledgeRequest $postBody, $optParams = array())
  37. {
  38. $params = array('merchantId' => $merchantId, 'orderId' => $orderId, 'postBody' => $postBody);
  39. $params = array_merge($params, $optParams);
  40. return $this->call('acknowledge', array($params), "Google_Service_ShoppingContent_OrdersAcknowledgeResponse");
  41. }
  42. /**
  43. * Sandbox only. Moves a test order from state "inProgress" to state
  44. * "pendingShipment". (orders.advancetestorder)
  45. *
  46. * @param string $merchantId The ID of the managing account.
  47. * @param string $orderId The ID of the test order to modify.
  48. * @param array $optParams Optional parameters.
  49. * @return Google_Service_ShoppingContent_OrdersAdvanceTestOrderResponse
  50. */
  51. public function advancetestorder($merchantId, $orderId, $optParams = array())
  52. {
  53. $params = array('merchantId' => $merchantId, 'orderId' => $orderId);
  54. $params = array_merge($params, $optParams);
  55. return $this->call('advancetestorder', array($params), "Google_Service_ShoppingContent_OrdersAdvanceTestOrderResponse");
  56. }
  57. /**
  58. * Cancels all line items in an order. (orders.cancel)
  59. *
  60. * @param string $merchantId The ID of the managing account.
  61. * @param string $orderId The ID of the order to cancel.
  62. * @param Google_Service_ShoppingContent_OrdersCancelRequest $postBody
  63. * @param array $optParams Optional parameters.
  64. * @return Google_Service_ShoppingContent_OrdersCancelResponse
  65. */
  66. public function cancel($merchantId, $orderId, Google_Service_ShoppingContent_OrdersCancelRequest $postBody, $optParams = array())
  67. {
  68. $params = array('merchantId' => $merchantId, 'orderId' => $orderId, 'postBody' => $postBody);
  69. $params = array_merge($params, $optParams);
  70. return $this->call('cancel', array($params), "Google_Service_ShoppingContent_OrdersCancelResponse");
  71. }
  72. /**
  73. * Cancels a line item. (orders.cancellineitem)
  74. *
  75. * @param string $merchantId The ID of the managing account.
  76. * @param string $orderId The ID of the order.
  77. * @param Google_Service_ShoppingContent_OrdersCancelLineItemRequest $postBody
  78. * @param array $optParams Optional parameters.
  79. * @return Google_Service_ShoppingContent_OrdersCancelLineItemResponse
  80. */
  81. public function cancellineitem($merchantId, $orderId, Google_Service_ShoppingContent_OrdersCancelLineItemRequest $postBody, $optParams = array())
  82. {
  83. $params = array('merchantId' => $merchantId, 'orderId' => $orderId, 'postBody' => $postBody);
  84. $params = array_merge($params, $optParams);
  85. return $this->call('cancellineitem', array($params), "Google_Service_ShoppingContent_OrdersCancelLineItemResponse");
  86. }
  87. /**
  88. * Sandbox only. Creates a test order. (orders.createtestorder)
  89. *
  90. * @param string $merchantId The ID of the managing account.
  91. * @param Google_Service_ShoppingContent_OrdersCreateTestOrderRequest $postBody
  92. * @param array $optParams Optional parameters.
  93. * @return Google_Service_ShoppingContent_OrdersCreateTestOrderResponse
  94. */
  95. public function createtestorder($merchantId, Google_Service_ShoppingContent_OrdersCreateTestOrderRequest $postBody, $optParams = array())
  96. {
  97. $params = array('merchantId' => $merchantId, 'postBody' => $postBody);
  98. $params = array_merge($params, $optParams);
  99. return $this->call('createtestorder', array($params), "Google_Service_ShoppingContent_OrdersCreateTestOrderResponse");
  100. }
  101. /**
  102. * Retrieves or modifies multiple orders in a single request.
  103. * (orders.custombatch)
  104. *
  105. * @param Google_Service_ShoppingContent_OrdersCustomBatchRequest $postBody
  106. * @param array $optParams Optional parameters.
  107. * @return Google_Service_ShoppingContent_OrdersCustomBatchResponse
  108. */
  109. public function custombatch(Google_Service_ShoppingContent_OrdersCustomBatchRequest $postBody, $optParams = array())
  110. {
  111. $params = array('postBody' => $postBody);
  112. $params = array_merge($params, $optParams);
  113. return $this->call('custombatch', array($params), "Google_Service_ShoppingContent_OrdersCustomBatchResponse");
  114. }
  115. /**
  116. * Retrieves an order from your Merchant Center account. (orders.get)
  117. *
  118. * @param string $merchantId The ID of the managing account.
  119. * @param string $orderId The ID of the order.
  120. * @param array $optParams Optional parameters.
  121. * @return Google_Service_ShoppingContent_Order
  122. */
  123. public function get($merchantId, $orderId, $optParams = array())
  124. {
  125. $params = array('merchantId' => $merchantId, 'orderId' => $orderId);
  126. $params = array_merge($params, $optParams);
  127. return $this->call('get', array($params), "Google_Service_ShoppingContent_Order");
  128. }
  129. /**
  130. * Retrieves an order using merchant order id. (orders.getbymerchantorderid)
  131. *
  132. * @param string $merchantId The ID of the managing account.
  133. * @param string $merchantOrderId The merchant order id to be looked for.
  134. * @param array $optParams Optional parameters.
  135. * @return Google_Service_ShoppingContent_OrdersGetByMerchantOrderIdResponse
  136. */
  137. public function getbymerchantorderid($merchantId, $merchantOrderId, $optParams = array())
  138. {
  139. $params = array('merchantId' => $merchantId, 'merchantOrderId' => $merchantOrderId);
  140. $params = array_merge($params, $optParams);
  141. return $this->call('getbymerchantorderid', array($params), "Google_Service_ShoppingContent_OrdersGetByMerchantOrderIdResponse");
  142. }
  143. /**
  144. * Sandbox only. Retrieves an order template that can be used to quickly create
  145. * a new order in sandbox. (orders.gettestordertemplate)
  146. *
  147. * @param string $merchantId The ID of the managing account.
  148. * @param string $templateName The name of the template to retrieve.
  149. * @param array $optParams Optional parameters.
  150. * @return Google_Service_ShoppingContent_OrdersGetTestOrderTemplateResponse
  151. */
  152. public function gettestordertemplate($merchantId, $templateName, $optParams = array())
  153. {
  154. $params = array('merchantId' => $merchantId, 'templateName' => $templateName);
  155. $params = array_merge($params, $optParams);
  156. return $this->call('gettestordertemplate', array($params), "Google_Service_ShoppingContent_OrdersGetTestOrderTemplateResponse");
  157. }
  158. /**
  159. * Lists the orders in your Merchant Center account. (orders.listOrders)
  160. *
  161. * @param string $merchantId The ID of the managing account.
  162. * @param array $optParams Optional parameters.
  163. *
  164. * @opt_param bool acknowledged Obtains orders that match the acknowledgement
  165. * status. When set to true, obtains orders that have been acknowledged. When
  166. * false, obtains orders that have not been acknowledged. We recommend using
  167. * this filter set to false, in conjunction with the acknowledge call, such that
  168. * only un-acknowledged orders are returned.
  169. * @opt_param string maxResults The maximum number of orders to return in the
  170. * response, used for paging. The default value is 25 orders per page, and the
  171. * maximum allowed value is 250 orders per page. Known issue: All List calls
  172. * will return all Orders without limit regardless of the value of this field.
  173. * @opt_param string orderBy The ordering of the returned list. The only
  174. * supported value are placedDate desc and placedDate asc for now, which returns
  175. * orders sorted by placement date. "placedDate desc" stands for listing orders
  176. * by placement date, from oldest to most recent. "placedDate asc" stands for
  177. * listing orders by placement date, from most recent to oldest. In future
  178. * releases we'll support other sorting criteria.
  179. * @opt_param string pageToken The token returned by the previous request.
  180. * @opt_param string placedDateEnd Obtains orders placed before this date
  181. * (exclusively), in ISO 8601 format.
  182. * @opt_param string placedDateStart Obtains orders placed after this date
  183. * (inclusively), in ISO 8601 format.
  184. * @opt_param string statuses Obtains orders that match any of the specified
  185. * statuses. Multiple values can be specified with comma separation.
  186. * Additionally, please note that active is a shortcut for pendingShipment and
  187. * partiallyShipped, and completed is a shortcut for shipped ,
  188. * partiallyDelivered, delivered, partiallyReturned, returned, and canceled.
  189. * @return Google_Service_ShoppingContent_OrdersListResponse
  190. */
  191. public function listOrders($merchantId, $optParams = array())
  192. {
  193. $params = array('merchantId' => $merchantId);
  194. $params = array_merge($params, $optParams);
  195. return $this->call('list', array($params), "Google_Service_ShoppingContent_OrdersListResponse");
  196. }
  197. /**
  198. * Refund a portion of the order, up to the full amount paid. (orders.refund)
  199. *
  200. * @param string $merchantId The ID of the managing account.
  201. * @param string $orderId The ID of the order to refund.
  202. * @param Google_Service_ShoppingContent_OrdersRefundRequest $postBody
  203. * @param array $optParams Optional parameters.
  204. * @return Google_Service_ShoppingContent_OrdersRefundResponse
  205. */
  206. public function refund($merchantId, $orderId, Google_Service_ShoppingContent_OrdersRefundRequest $postBody, $optParams = array())
  207. {
  208. $params = array('merchantId' => $merchantId, 'orderId' => $orderId, 'postBody' => $postBody);
  209. $params = array_merge($params, $optParams);
  210. return $this->call('refund', array($params), "Google_Service_ShoppingContent_OrdersRefundResponse");
  211. }
  212. /**
  213. * Returns a line item. (orders.returnlineitem)
  214. *
  215. * @param string $merchantId The ID of the managing account.
  216. * @param string $orderId The ID of the order.
  217. * @param Google_Service_ShoppingContent_OrdersReturnLineItemRequest $postBody
  218. * @param array $optParams Optional parameters.
  219. * @return Google_Service_ShoppingContent_OrdersReturnLineItemResponse
  220. */
  221. public function returnlineitem($merchantId, $orderId, Google_Service_ShoppingContent_OrdersReturnLineItemRequest $postBody, $optParams = array())
  222. {
  223. $params = array('merchantId' => $merchantId, 'orderId' => $orderId, 'postBody' => $postBody);
  224. $params = array_merge($params, $optParams);
  225. return $this->call('returnlineitem', array($params), "Google_Service_ShoppingContent_OrdersReturnLineItemResponse");
  226. }
  227. /**
  228. * Marks line item(s) as shipped. (orders.shiplineitems)
  229. *
  230. * @param string $merchantId The ID of the managing account.
  231. * @param string $orderId The ID of the order.
  232. * @param Google_Service_ShoppingContent_OrdersShipLineItemsRequest $postBody
  233. * @param array $optParams Optional parameters.
  234. * @return Google_Service_ShoppingContent_OrdersShipLineItemsResponse
  235. */
  236. public function shiplineitems($merchantId, $orderId, Google_Service_ShoppingContent_OrdersShipLineItemsRequest $postBody, $optParams = array())
  237. {
  238. $params = array('merchantId' => $merchantId, 'orderId' => $orderId, 'postBody' => $postBody);
  239. $params = array_merge($params, $optParams);
  240. return $this->call('shiplineitems', array($params), "Google_Service_ShoppingContent_OrdersShipLineItemsResponse");
  241. }
  242. /**
  243. * Updates the merchant order ID for a given order.
  244. * (orders.updatemerchantorderid)
  245. *
  246. * @param string $merchantId The ID of the managing account.
  247. * @param string $orderId The ID of the order.
  248. * @param Google_Service_ShoppingContent_OrdersUpdateMerchantOrderIdRequest $postBody
  249. * @param array $optParams Optional parameters.
  250. * @return Google_Service_ShoppingContent_OrdersUpdateMerchantOrderIdResponse
  251. */
  252. public function updatemerchantorderid($merchantId, $orderId, Google_Service_ShoppingContent_OrdersUpdateMerchantOrderIdRequest $postBody, $optParams = array())
  253. {
  254. $params = array('merchantId' => $merchantId, 'orderId' => $orderId, 'postBody' => $postBody);
  255. $params = array_merge($params, $optParams);
  256. return $this->call('updatemerchantorderid', array($params), "Google_Service_ShoppingContent_OrdersUpdateMerchantOrderIdResponse");
  257. }
  258. /**
  259. * Updates a shipment's status, carrier, and/or tracking ID.
  260. * (orders.updateshipment)
  261. *
  262. * @param string $merchantId The ID of the managing account.
  263. * @param string $orderId The ID of the order.
  264. * @param Google_Service_ShoppingContent_OrdersUpdateShipmentRequest $postBody
  265. * @param array $optParams Optional parameters.
  266. * @return Google_Service_ShoppingContent_OrdersUpdateShipmentResponse
  267. */
  268. public function updateshipment($merchantId, $orderId, Google_Service_ShoppingContent_OrdersUpdateShipmentRequest $postBody, $optParams = array())
  269. {
  270. $params = array('merchantId' => $merchantId, 'orderId' => $orderId, 'postBody' => $postBody);
  271. $params = array_merge($params, $optParams);
  272. return $this->call('updateshipment', array($params), "Google_Service_ShoppingContent_OrdersUpdateShipmentResponse");
  273. }
  274. }