source: vendor/google/apiclient-services/src/Merchant/Resource/AccountsProductReviews.php

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

Upload project files

  • Property mode set to 100644
File size: 3.9 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\Merchant\Resource;
19
20use Google\Service\Merchant\ListProductReviewsResponse;
21use Google\Service\Merchant\MerchantapiEmpty;
22use Google\Service\Merchant\ProductReview;
23
24/**
25 * The "productReviews" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $merchantapiService = new Google\Service\Merchant(...);
29 * $productReviews = $merchantapiService->accounts_productReviews;
30 * </code>
31 */
32class AccountsProductReviews extends \Google\Service\Resource
33{
34 /**
35 * Deletes a product review. (productReviews.delete)
36 *
37 * @param string $name Required. The ID of the Product review. Format:
38 * accounts/{account}/productReviews/{productReview}
39 * @param array $optParams Optional parameters.
40 * @return MerchantapiEmpty
41 * @throws \Google\Service\Exception
42 */
43 public function delete($name, $optParams = [])
44 {
45 $params = ['name' => $name];
46 $params = array_merge($params, $optParams);
47 return $this->call('delete', [$params], MerchantapiEmpty::class);
48 }
49 /**
50 * Gets a product review. (productReviews.get)
51 *
52 * @param string $name Required. The ID of the merchant review. Format:
53 * accounts/{account}/productReviews/{productReview}
54 * @param array $optParams Optional parameters.
55 * @return ProductReview
56 * @throws \Google\Service\Exception
57 */
58 public function get($name, $optParams = [])
59 {
60 $params = ['name' => $name];
61 $params = array_merge($params, $optParams);
62 return $this->call('get', [$params], ProductReview::class);
63 }
64 /**
65 * Inserts a product review. (productReviews.insert)
66 *
67 * @param string $parent Required. The account where the product review will be
68 * inserted. Format: accounts/{account}
69 * @param ProductReview $postBody
70 * @param array $optParams Optional parameters.
71 *
72 * @opt_param string dataSource Required. Format:
73 * `accounts/{account}/dataSources/{datasource}`.
74 * @return ProductReview
75 * @throws \Google\Service\Exception
76 */
77 public function insert($parent, ProductReview $postBody, $optParams = [])
78 {
79 $params = ['parent' => $parent, 'postBody' => $postBody];
80 $params = array_merge($params, $optParams);
81 return $this->call('insert', [$params], ProductReview::class);
82 }
83 /**
84 * Lists product reviews. (productReviews.listAccountsProductReviews)
85 *
86 * @param string $parent Required. The account to list product reviews for.
87 * Format: accounts/{account}
88 * @param array $optParams Optional parameters.
89 *
90 * @opt_param int pageSize Optional. The maximum number of products to return.
91 * The service may return fewer than this value.
92 * @opt_param string pageToken Optional. A page token, received from a previous
93 * `ListProductReviews` call. Provide this to retrieve the subsequent page. When
94 * paginating, all other parameters provided to `ListProductReviews` must match
95 * the call that provided the page token.
96 * @return ListProductReviewsResponse
97 * @throws \Google\Service\Exception
98 */
99 public function listAccountsProductReviews($parent, $optParams = [])
100 {
101 $params = ['parent' => $parent];
102 $params = array_merge($params, $optParams);
103 return $this->call('list', [$params], ListProductReviewsResponse::class);
104 }
105}
106
107// Adding a class alias for backwards compatibility with the previous class name.
108class_alias(AccountsProductReviews::class, 'Google_Service_Merchant_Resource_AccountsProductReviews');
Note: See TracBrowser for help on using the repository browser.