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\CollectionStatus;
21use Google\Service\ShoppingContent\ListCollectionStatusesResponse;
22
23/**
24 * The "collectionstatuses" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $contentService = new Google\Service\ShoppingContent(...);
28 *   $collectionstatuses = $contentService->collectionstatuses;
29 *  </code>
30 */
31class Collectionstatuses extends \Google\Service\Resource
32{
33  /**
34   * Gets the status of a collection from your Merchant Center account.
35   * (collectionstatuses.get)
36   *
37   * @param string $merchantId Required. The ID of the account that contains the
38   * collection. This account cannot be a multi-client account.
39   * @param string $collectionId Required. The collectionId of the collection.
40   * CollectionId is the same as the REST ID of the collection.
41   * @param array $optParams Optional parameters.
42   * @return CollectionStatus
43   */
44  public function get($merchantId, $collectionId, $optParams = [])
45  {
46    $params = ['merchantId' => $merchantId, 'collectionId' => $collectionId];
47    $params = array_merge($params, $optParams);
48    return $this->call('get', [$params], CollectionStatus::class);
49  }
50  /**
51   * Lists the statuses of the collections in your Merchant Center account.
52   * (collectionstatuses.listCollectionstatuses)
53   *
54   * @param string $merchantId Required. The ID of the account that contains the
55   * collection. This account cannot be a multi-client account.
56   * @param array $optParams Optional parameters.
57   *
58   * @opt_param int pageSize The maximum number of collection statuses to return
59   * in the response, used for paging. Defaults to 50; values above 1000 will be
60   * coerced to 1000.
61   * @opt_param string pageToken Token (if provided) to retrieve the subsequent
62   * page. All other parameters must match the original call that provided the
63   * page token.
64   * @return ListCollectionStatusesResponse
65   */
66  public function listCollectionstatuses($merchantId, $optParams = [])
67  {
68    $params = ['merchantId' => $merchantId];
69    $params = array_merge($params, $optParams);
70    return $this->call('list', [$params], ListCollectionStatusesResponse::class);
71  }
72}
73
74// Adding a class alias for backwards compatibility with the previous class name.
75class_alias(Collectionstatuses::class, 'Google_Service_ShoppingContent_Resource_Collectionstatuses');
76