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