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\Css;
|
---|
21 | use Google\Service\ShoppingContent\LabelIds;
|
---|
22 | use Google\Service\ShoppingContent\ListCssesResponse;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "csses" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $contentService = new Google\Service\ShoppingContent(...);
|
---|
29 | * $csses = $contentService->csses;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class Csses extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Retrieves a single CSS domain by ID. (csses.get)
|
---|
36 | *
|
---|
37 | * @param string $cssGroupId Required. The ID of the managing account. If this
|
---|
38 | * parameter is not the same as [cssDomainId](#cssDomainId), then this ID must
|
---|
39 | * be a CSS group ID and `cssDomainId` must be the ID of a CSS domain affiliated
|
---|
40 | * with this group.
|
---|
41 | * @param string $cssDomainId Required. The ID of the CSS domain to return.
|
---|
42 | * @param array $optParams Optional parameters.
|
---|
43 | * @return Css
|
---|
44 | * @throws \Google\Service\Exception
|
---|
45 | */
|
---|
46 | public function get($cssGroupId, $cssDomainId, $optParams = [])
|
---|
47 | {
|
---|
48 | $params = ['cssGroupId' => $cssGroupId, 'cssDomainId' => $cssDomainId];
|
---|
49 | $params = array_merge($params, $optParams);
|
---|
50 | return $this->call('get', [$params], Css::class);
|
---|
51 | }
|
---|
52 | /**
|
---|
53 | * Lists CSS domains affiliated with a CSS group. (csses.listCsses)
|
---|
54 | *
|
---|
55 | * @param string $cssGroupId Required. The CSS group ID of CSS domains to be
|
---|
56 | * listed.
|
---|
57 | * @param array $optParams Optional parameters.
|
---|
58 | *
|
---|
59 | * @opt_param int pageSize The maximum number of CSS domains to return. The
|
---|
60 | * service may return fewer than this value. If unspecified, at most 50 CSS
|
---|
61 | * domains will be returned. The maximum value is 1000; values above 1000 will
|
---|
62 | * be coerced to 1000.
|
---|
63 | * @opt_param string pageToken A page token, received from a previous
|
---|
64 | * `ListCsses` call. Provide this to retrieve the subsequent page. When
|
---|
65 | * paginating, all other parameters provided to `ListCsses` must match the call
|
---|
66 | * that provided the page token.
|
---|
67 | * @return ListCssesResponse
|
---|
68 | * @throws \Google\Service\Exception
|
---|
69 | */
|
---|
70 | public function listCsses($cssGroupId, $optParams = [])
|
---|
71 | {
|
---|
72 | $params = ['cssGroupId' => $cssGroupId];
|
---|
73 | $params = array_merge($params, $optParams);
|
---|
74 | return $this->call('list', [$params], ListCssesResponse::class);
|
---|
75 | }
|
---|
76 | /**
|
---|
77 | * Updates labels that are assigned to a CSS domain by its CSS group.
|
---|
78 | * (csses.updatelabels)
|
---|
79 | *
|
---|
80 | * @param string $cssGroupId Required. The CSS group ID of the updated CSS
|
---|
81 | * domain.
|
---|
82 | * @param string $cssDomainId Required. The ID of the updated CSS domain.
|
---|
83 | * @param LabelIds $postBody
|
---|
84 | * @param array $optParams Optional parameters.
|
---|
85 | * @return Css
|
---|
86 | * @throws \Google\Service\Exception
|
---|
87 | */
|
---|
88 | public function updatelabels($cssGroupId, $cssDomainId, LabelIds $postBody, $optParams = [])
|
---|
89 | {
|
---|
90 | $params = ['cssGroupId' => $cssGroupId, 'cssDomainId' => $cssDomainId, 'postBody' => $postBody];
|
---|
91 | $params = array_merge($params, $optParams);
|
---|
92 | return $this->call('updatelabels', [$params], Css::class);
|
---|
93 | }
|
---|
94 | }
|
---|
95 |
|
---|
96 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
97 | class_alias(Csses::class, 'Google_Service_ShoppingContent_Resource_Csses');
|
---|