source: vendor/google/apiclient-services/src/CloudSupport/Resource/CustomersCasesComments.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

  • Property mode set to 100644
File size: 2.6 KB
Line 
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\CloudSupport\Resource;
19
20use Google\Service\CloudSupport\Comment;
21use Google\Service\CloudSupport\ListCommentsResponse;
22
23/**
24 * The "comments" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $cloudsupportService = new Google\Service\CloudSupport(...);
28 * $comments = $cloudsupportService->customers_cases_comments;
29 * </code>
30 */
31class CustomersCasesComments extends \Google\Service\Resource
32{
33 /**
34 * Add a new comment to the specified Case. The comment object must have the
35 * following fields set: body. (comments.create)
36 *
37 * @param string $parent Required. The resource name of Case to which this
38 * comment should be added.
39 * @param Comment $postBody
40 * @param array $optParams Optional parameters.
41 * @return Comment
42 */
43 public function create($parent, Comment $postBody, $optParams = [])
44 {
45 $params = ['parent' => $parent, 'postBody' => $postBody];
46 $params = array_merge($params, $optParams);
47 return $this->call('create', [$params], Comment::class);
48 }
49 /**
50 * Retrieve all Comments associated with the Case object.
51 * (comments.listCustomersCasesComments)
52 *
53 * @param string $parent Required. The resource name of Case object for which
54 * comments should be listed.
55 * @param array $optParams Optional parameters.
56 *
57 * @opt_param int pageSize The maximum number of comments fetched with each
58 * request. Defaults to 10.
59 * @opt_param string pageToken A token identifying the page of results to
60 * return. If unspecified, the first page is retrieved.
61 * @return ListCommentsResponse
62 */
63 public function listCustomersCasesComments($parent, $optParams = [])
64 {
65 $params = ['parent' => $parent];
66 $params = array_merge($params, $optParams);
67 return $this->call('list', [$params], ListCommentsResponse::class);
68 }
69}
70
71// Adding a class alias for backwards compatibility with the previous class name.
72class_alias(CustomersCasesComments::class, 'Google_Service_CloudSupport_Resource_CustomersCasesComments');
Note: See TracBrowser for help on using the repository browser.