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\ListRepricingRuleReportsResponse;
21
22/**
23 * The "repricingreports" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $contentService = new Google\Service\ShoppingContent(...);
27 *   $repricingreports = $contentService->repricingreports;
28 *  </code>
29 */
30class RepricingrulesRepricingreports extends \Google\Service\Resource
31{
32  /**
33   * Lists the metrics report for a given Repricing rule.
34   * (repricingreports.listRepricingrulesRepricingreports)
35   *
36   * @param string $merchantId Required. Id of the merchant who owns the Repricing
37   * rule.
38   * @param string $ruleId Required. Id of the Repricing rule.
39   * @param array $optParams Optional parameters.
40   *
41   * @opt_param string endDate Gets Repricing reports on and before this date in
42   * the merchant's timezone. You can only retrieve data up to 7 days ago
43   * (default) or earlier. Format: YYYY-MM-DD.
44   * @opt_param int pageSize Maximum number of daily reports to return. Each
45   * report includes data from a single 24-hour period. The page size defaults to
46   * 50 and values above 1000 are coerced to 1000. This service may return fewer
47   * days than this value, for example, if the time between your start and end
48   * date is less than page size.
49   * @opt_param string pageToken Token (if provided) to retrieve the subsequent
50   * page. All other parameters must match the original call that provided the
51   * page token.
52   * @opt_param string startDate Gets Repricing reports on and after this date in
53   * the merchant's timezone, up to one year ago. Do not use a start date later
54   * than 7 days ago (default). Format: YYYY-MM-DD.
55   * @return ListRepricingRuleReportsResponse
56   */
57  public function listRepricingrulesRepricingreports($merchantId, $ruleId, $optParams = [])
58  {
59    $params = ['merchantId' => $merchantId, 'ruleId' => $ruleId];
60    $params = array_merge($params, $optParams);
61    return $this->call('list', [$params], ListRepricingRuleReportsResponse::class);
62  }
63}
64
65// Adding a class alias for backwards compatibility with the previous class name.
66class_alias(RepricingrulesRepricingreports::class, 'Google_Service_ShoppingContent_Resource_RepricingrulesRepricingreports');
67