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\ListRepricingProductReportsResponse; 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 ProductstatusesRepricingreports extends \Google\Service\Resource 31{ 32 /** 33 * Lists the metrics report for a given Repricing product. 34 * (repricingreports.listProductstatusesRepricingreports) 35 * 36 * @param string $merchantId Required. Id of the merchant who owns the Repricing 37 * rule. 38 * @param string $productId Required. Id of the Repricing product. Also known as 39 * the [REST_ID](https://developers.google.com/shopping- 40 * content/reference/rest/v2.1/products#Product.FIELDS.id) 41 * @param array $optParams Optional parameters. 42 * 43 * @opt_param string endDate Gets Repricing reports on and before this date in 44 * the merchant's timezone. You can only retrieve data up to 7 days ago 45 * (default) or earlier. Format is YYYY-MM-DD. 46 * @opt_param int pageSize Maximum number of days of reports to return. There 47 * can be more than one rule report returned per day. For example, if 3 rule 48 * types got applied to the same product within a 24-hour period, then a 49 * page_size of 1 will return 3 rule reports. The page size defaults to 50 and 50 * values above 1000 are coerced to 1000. This service may return fewer days of 51 * reports than this value, for example, if the time between your start and end 52 * date is less than the page size. 53 * @opt_param string pageToken Token (if provided) to retrieve the subsequent 54 * page. All other parameters must match the original call that provided the 55 * page token. 56 * @opt_param string ruleId Id of the Repricing rule. If specified, only gets 57 * this rule's reports. 58 * @opt_param string startDate Gets Repricing reports on and after this date in 59 * the merchant's timezone, up to one year ago. Do not use a start date later 60 * than 7 days ago (default). Format is YYYY-MM-DD. 61 * @return ListRepricingProductReportsResponse 62 */ 63 public function listProductstatusesRepricingreports($merchantId, $productId, $optParams = []) 64 { 65 $params = ['merchantId' => $merchantId, 'productId' => $productId]; 66 $params = array_merge($params, $optParams); 67 return $this->call('list', [$params], ListRepricingProductReportsResponse::class); 68 } 69} 70 71// Adding a class alias for backwards compatibility with the previous class name. 72class_alias(ProductstatusesRepricingreports::class, 'Google_Service_ShoppingContent_Resource_ProductstatusesRepricingreports'); 73