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 |
|
---|
18 | namespace Google\Service\Reports\Resource;
|
---|
19 |
|
---|
20 | use 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 | */
|
---|
30 | class 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, based on UTC-8:00
|
---|
40 | * (Pacific Standard Time). The timestamp is in the [ISO 8601
|
---|
41 | * format](https://en.wikipedia.org/wiki/ISO_8601), `yyyy-mm-dd`.
|
---|
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 | * @throws \Google\Service\Exception
|
---|
66 | */
|
---|
67 | public function get($date, $optParams = [])
|
---|
68 | {
|
---|
69 | $params = ['date' => $date];
|
---|
70 | $params = array_merge($params, $optParams);
|
---|
71 | return $this->call('get', [$params], UsageReports::class);
|
---|
72 | }
|
---|
73 | }
|
---|
74 |
|
---|
75 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
76 | class_alias(CustomerUsageReports::class, 'Google_Service_Reports_Resource_CustomerUsageReports');
|
---|