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 |
|
---|
18 | namespace Google\Service\ShoppingContent\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\ShoppingContent\CollectionStatus;
|
---|
21 | use 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 | */
|
---|
31 | class 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 | * @throws \Google\Service\Exception
|
---|
44 | */
|
---|
45 | public function get($merchantId, $collectionId, $optParams = [])
|
---|
46 | {
|
---|
47 | $params = ['merchantId' => $merchantId, 'collectionId' => $collectionId];
|
---|
48 | $params = array_merge($params, $optParams);
|
---|
49 | return $this->call('get', [$params], CollectionStatus::class);
|
---|
50 | }
|
---|
51 | /**
|
---|
52 | * Lists the statuses of the collections in your Merchant Center account.
|
---|
53 | * (collectionstatuses.listCollectionstatuses)
|
---|
54 | *
|
---|
55 | * @param string $merchantId Required. The ID of the account that contains the
|
---|
56 | * collection. This account cannot be a multi-client account.
|
---|
57 | * @param array $optParams Optional parameters.
|
---|
58 | *
|
---|
59 | * @opt_param int pageSize The maximum number of collection statuses to return
|
---|
60 | * in the response, used for paging. Defaults to 50; values above 1000 will be
|
---|
61 | * coerced to 1000.
|
---|
62 | * @opt_param string pageToken Token (if provided) to retrieve the subsequent
|
---|
63 | * page. All other parameters must match the original call that provided the
|
---|
64 | * page token.
|
---|
65 | * @return ListCollectionStatusesResponse
|
---|
66 | * @throws \Google\Service\Exception
|
---|
67 | */
|
---|
68 | public function listCollectionstatuses($merchantId, $optParams = [])
|
---|
69 | {
|
---|
70 | $params = ['merchantId' => $merchantId];
|
---|
71 | $params = array_merge($params, $optParams);
|
---|
72 | return $this->call('list', [$params], ListCollectionStatusesResponse::class);
|
---|
73 | }
|
---|
74 | }
|
---|
75 |
|
---|
76 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
77 | class_alias(Collectionstatuses::class, 'Google_Service_ShoppingContent_Resource_Collectionstatuses');
|
---|