source: vendor/google/apiclient-services/src/ShoppingContent/Resource/Recommendations.php

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

Upload project files

  • Property mode set to 100644
File size: 3.2 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\ShoppingContent\Resource;
19
20use Google\Service\ShoppingContent\GenerateRecommendationsResponse;
21use Google\Service\ShoppingContent\ReportInteractionRequest;
22
23/**
24 * The "recommendations" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $contentService = new Google\Service\ShoppingContent(...);
28 * $recommendations = $contentService->recommendations;
29 * </code>
30 */
31class Recommendations extends \Google\Service\Resource
32{
33 /**
34 * Generates recommendations for a merchant. (recommendations.generate)
35 *
36 * @param string $merchantId Required. The ID of the account to fetch
37 * recommendations for.
38 * @param array $optParams Optional parameters.
39 *
40 * @opt_param string allowedTag Optional. List of allowed tags. Tags are a set
41 * of predefined strings that describe the category that individual
42 * recommendation types belong to. User can specify zero or more tags in this
43 * field to indicate what categories of recommendations they want to receive.
44 * Current list of supported tags: - TREND
45 * @opt_param string languageCode Optional. Language code of the client. If not
46 * set, the result will be in default language (English). This language code
47 * affects all fields prefixed with "localized". This should be set to ISO 639-1
48 * country code. List of currently verified supported language code: en, fr, cs,
49 * da, de, es, it, nl, no, pl, pt, pt, fi, sv, vi, tr, th, ko, zh-CN, zh-TW, ja,
50 * id, hi
51 * @return GenerateRecommendationsResponse
52 * @throws \Google\Service\Exception
53 */
54 public function generate($merchantId, $optParams = [])
55 {
56 $params = ['merchantId' => $merchantId];
57 $params = array_merge($params, $optParams);
58 return $this->call('generate', [$params], GenerateRecommendationsResponse::class);
59 }
60 /**
61 * Reports an interaction on a recommendation for a merchant.
62 * (recommendations.reportInteraction)
63 *
64 * @param string $merchantId Required. The ID of the account that wants to
65 * report an interaction.
66 * @param ReportInteractionRequest $postBody
67 * @param array $optParams Optional parameters.
68 * @throws \Google\Service\Exception
69 */
70 public function reportInteraction($merchantId, ReportInteractionRequest $postBody, $optParams = [])
71 {
72 $params = ['merchantId' => $merchantId, 'postBody' => $postBody];
73 $params = array_merge($params, $optParams);
74 return $this->call('reportInteraction', [$params]);
75 }
76}
77
78// Adding a class alias for backwards compatibility with the previous class name.
79class_alias(Recommendations::class, 'Google_Service_ShoppingContent_Resource_Recommendations');
Note: See TracBrowser for help on using the repository browser.