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
18namespace Google\Service\ShoppingContent\Resource;
19
20use Google\Service\ShoppingContent\RegionalInventory as RegionalInventoryModel;
21use Google\Service\ShoppingContent\RegionalinventoryCustomBatchRequest;
22use Google\Service\ShoppingContent\RegionalinventoryCustomBatchResponse;
23
24/**
25 * The "regionalinventory" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $contentService = new Google\Service\ShoppingContent(...);
29 *   $regionalinventory = $contentService->regionalinventory;
30 *  </code>
31 */
32class Regionalinventory extends \Google\Service\Resource
33{
34  /**
35   * Updates regional inventory for multiple products or regions in a single
36   * request. (regionalinventory.custombatch)
37   *
38   * @param RegionalinventoryCustomBatchRequest $postBody
39   * @param array $optParams Optional parameters.
40   * @return RegionalinventoryCustomBatchResponse
41   */
42  public function custombatch(RegionalinventoryCustomBatchRequest $postBody, $optParams = [])
43  {
44    $params = ['postBody' => $postBody];
45    $params = array_merge($params, $optParams);
46    return $this->call('custombatch', [$params], RegionalinventoryCustomBatchResponse::class);
47  }
48  /**
49   * Update the regional inventory of a product in your Merchant Center account.
50   * If a regional inventory with the same region ID already exists, this method
51   * updates that entry. (regionalinventory.insert)
52   *
53   * @param string $merchantId The ID of the account that contains the product.
54   * This account cannot be a multi-client account.
55   * @param string $productId The REST ID of the product for which to update the
56   * regional inventory.
57   * @param RegionalInventoryModel $postBody
58   * @param array $optParams Optional parameters.
59   * @return RegionalInventoryModel
60   */
61  public function insert($merchantId, $productId, RegionalInventoryModel $postBody, $optParams = [])
62  {
63    $params = ['merchantId' => $merchantId, 'productId' => $productId, 'postBody' => $postBody];
64    $params = array_merge($params, $optParams);
65    return $this->call('insert', [$params], RegionalInventoryModel::class);
66  }
67}
68
69// Adding a class alias for backwards compatibility with the previous class name.
70class_alias(Regionalinventory::class, 'Google_Service_ShoppingContent_Resource_Regionalinventory');
71