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\DatafeedStatus;
21use Google\Service\ShoppingContent\DatafeedstatusesCustomBatchRequest;
22use Google\Service\ShoppingContent\DatafeedstatusesCustomBatchResponse;
23use Google\Service\ShoppingContent\DatafeedstatusesListResponse;
24
25/**
26 * The "datafeedstatuses" collection of methods.
27 * Typical usage is:
28 *  <code>
29 *   $contentService = new Google\Service\ShoppingContent(...);
30 *   $datafeedstatuses = $contentService->datafeedstatuses;
31 *  </code>
32 */
33class Datafeedstatuses extends \Google\Service\Resource
34{
35  /**
36   * Gets multiple Merchant Center datafeed statuses in a single request.
37   * (datafeedstatuses.custombatch)
38   *
39   * @param DatafeedstatusesCustomBatchRequest $postBody
40   * @param array $optParams Optional parameters.
41   * @return DatafeedstatusesCustomBatchResponse
42   */
43  public function custombatch(DatafeedstatusesCustomBatchRequest $postBody, $optParams = [])
44  {
45    $params = ['postBody' => $postBody];
46    $params = array_merge($params, $optParams);
47    return $this->call('custombatch', [$params], DatafeedstatusesCustomBatchResponse::class);
48  }
49  /**
50   * Retrieves the status of a datafeed from your Merchant Center account.
51   * (datafeedstatuses.get)
52   *
53   * @param string $merchantId The ID of the account that manages the datafeed.
54   * This account cannot be a multi-client account.
55   * @param string $datafeedId The ID of the datafeed.
56   * @param array $optParams Optional parameters.
57   *
58   * @opt_param string country The country for which to get the datafeed status.
59   * If this parameter is provided then language must also be provided. Note that
60   * this parameter is required for feeds targeting multiple countries and
61   * languages, since a feed may have a different status for each target.
62   * @opt_param string language The language for which to get the datafeed status.
63   * If this parameter is provided then country must also be provided. Note that
64   * this parameter is required for feeds targeting multiple countries and
65   * languages, since a feed may have a different status for each target.
66   * @return DatafeedStatus
67   */
68  public function get($merchantId, $datafeedId, $optParams = [])
69  {
70    $params = ['merchantId' => $merchantId, 'datafeedId' => $datafeedId];
71    $params = array_merge($params, $optParams);
72    return $this->call('get', [$params], DatafeedStatus::class);
73  }
74  /**
75   * Lists the statuses of the datafeeds in your Merchant Center account.
76   * (datafeedstatuses.listDatafeedstatuses)
77   *
78   * @param string $merchantId The ID of the account that manages the datafeeds.
79   * This account cannot be a multi-client account.
80   * @param array $optParams Optional parameters.
81   *
82   * @opt_param string maxResults The maximum number of products to return in the
83   * response, used for paging.
84   * @opt_param string pageToken The token returned by the previous request.
85   * @return DatafeedstatusesListResponse
86   */
87  public function listDatafeedstatuses($merchantId, $optParams = [])
88  {
89    $params = ['merchantId' => $merchantId];
90    $params = array_merge($params, $optParams);
91    return $this->call('list', [$params], DatafeedstatusesListResponse::class);
92  }
93}
94
95// Adding a class alias for backwards compatibility with the previous class name.
96class_alias(Datafeedstatuses::class, 'Google_Service_ShoppingContent_Resource_Datafeedstatuses');
97