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\Reports\Resource; 19 20use Google\Service\Reports\UsageReports; 21 22/** 23 * The "customerUsageReports" collection of methods. 24 * Typical usage is: 25 * <code> 26 * $adminService = new Google\Service\Reports(...); 27 * $customerUsageReports = $adminService->customerUsageReports; 28 * </code> 29 */ 30class CustomerUsageReports extends \Google\Service\Resource 31{ 32 /** 33 * Retrieves a report which is a collection of properties and statistics for a 34 * specific customer's account. For more information, see the Customers Usage 35 * Report guide. For more information about the customer report's parameters, 36 * see the Customers Usage parameters reference guides. 37 * (customerUsageReports.get) 38 * 39 * @param string $date Represents the date the usage occurred. The timestamp is 40 * in the ISO 8601 format, yyyy-mm-dd. We recommend you use your account's time 41 * zone for this. 42 * @param array $optParams Optional parameters. 43 * 44 * @opt_param string customerId The unique ID of the customer to retrieve data 45 * for. 46 * @opt_param string pageToken Token to specify next page. A report with 47 * multiple pages has a `nextPageToken` property in the response. For your 48 * follow-on requests getting all of the report's pages, enter the 49 * `nextPageToken` value in the `pageToken` query string. 50 * @opt_param string parameters The `parameters` query string is a comma- 51 * separated list of event parameters that refine a report's results. The 52 * parameter is associated with a specific application. The application values 53 * for the Customers usage report include `accounts`, `app_maker`, 54 * `apps_scripts`, `calendar`, `classroom`, `cros`, `docs`, `gmail`, `gplus`, 55 * `device_management`, `meet`, and `sites`. A `parameters` query string is in 56 * the CSV form of `app_name1:param_name1, app_name2:param_name2`. *Note:* The 57 * API doesn't accept multiple values of a parameter. If a particular parameter 58 * is supplied more than once in the API request, the API only accepts the last 59 * value of that request parameter. In addition, if an invalid request parameter 60 * is supplied in the API request, the API ignores that request parameter and 61 * returns the response corresponding to the remaining valid request parameters. 62 * An example of an invalid request parameter is one that does not belong to the 63 * application. If no parameters are requested, all parameters are returned. 64 * @return UsageReports 65 */ 66 public function get($date, $optParams = []) 67 { 68 $params = ['date' => $date]; 69 $params = array_merge($params, $optParams); 70 return $this->call('get', [$params], UsageReports::class); 71 } 72} 73 74// Adding a class alias for backwards compatibility with the previous class name. 75class_alias(CustomerUsageReports::class, 'Google_Service_Reports_Resource_CustomerUsageReports'); 76