source: vendor/google/apiclient-services/src/Adsense/Resource/AccountsReportsSaved.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 12 days ago

Upload new project files

  • Property mode set to 100644
File size: 6.8 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\Adsense\Resource;
19
20use Google\Service\Adsense\HttpBody;
21use Google\Service\Adsense\ListSavedReportsResponse;
22use Google\Service\Adsense\ReportResult;
23
24/**
25 * The "saved" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $adsenseService = new Google\Service\Adsense(...);
29 * $saved = $adsenseService->accounts_reports_saved;
30 * </code>
31 */
32class AccountsReportsSaved extends \Google\Service\Resource
33{
34 /**
35 * Generates a saved report. (saved.generate)
36 *
37 * @param string $name Required. Name of the saved report. Format:
38 * accounts/{account}/reports/{report}
39 * @param array $optParams Optional parameters.
40 *
41 * @opt_param string currencyCode The [ISO-4217 currency
42 * code](https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on
43 * monetary metrics. Defaults to the account's currency if not set.
44 * @opt_param string dateRange Date range of the report, if unset the range will
45 * be considered CUSTOM.
46 * @opt_param int endDate.day Day of a month. Must be from 1 to 31 and valid for
47 * the year and month, or 0 to specify a year by itself or a year and month
48 * where the day isn't significant.
49 * @opt_param int endDate.month Month of a year. Must be from 1 to 12, or 0 to
50 * specify a year without a month and day.
51 * @opt_param int endDate.year Year of the date. Must be from 1 to 9999, or 0 to
52 * specify a date without a year.
53 * @opt_param string languageCode The language to use for translating report
54 * output. If unspecified, this defaults to English ("en"). If the given
55 * language is not supported, report output will be returned in English. The
56 * language is specified as an [IETF BCP-47 language
57 * code](https://en.wikipedia.org/wiki/IETF_language_tag).
58 * @opt_param string reportingTimeZone Timezone in which to generate the report.
59 * If unspecified, this defaults to the account timezone. For more information,
60 * see [changing the time zone of your
61 * reports](https://support.google.com/adsense/answer/9830725).
62 * @opt_param int startDate.day Day of a month. Must be from 1 to 31 and valid
63 * for the year and month, or 0 to specify a year by itself or a year and month
64 * where the day isn't significant.
65 * @opt_param int startDate.month Month of a year. Must be from 1 to 12, or 0 to
66 * specify a year without a month and day.
67 * @opt_param int startDate.year Year of the date. Must be from 1 to 9999, or 0
68 * to specify a date without a year.
69 * @return ReportResult
70 * @throws \Google\Service\Exception
71 */
72 public function generate($name, $optParams = [])
73 {
74 $params = ['name' => $name];
75 $params = array_merge($params, $optParams);
76 return $this->call('generate', [$params], ReportResult::class);
77 }
78 /**
79 * Generates a csv formatted saved report. (saved.generateCsv)
80 *
81 * @param string $name Required. Name of the saved report. Format:
82 * accounts/{account}/reports/{report}
83 * @param array $optParams Optional parameters.
84 *
85 * @opt_param string currencyCode The [ISO-4217 currency
86 * code](https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on
87 * monetary metrics. Defaults to the account's currency if not set.
88 * @opt_param string dateRange Date range of the report, if unset the range will
89 * be considered CUSTOM.
90 * @opt_param int endDate.day Day of a month. Must be from 1 to 31 and valid for
91 * the year and month, or 0 to specify a year by itself or a year and month
92 * where the day isn't significant.
93 * @opt_param int endDate.month Month of a year. Must be from 1 to 12, or 0 to
94 * specify a year without a month and day.
95 * @opt_param int endDate.year Year of the date. Must be from 1 to 9999, or 0 to
96 * specify a date without a year.
97 * @opt_param string languageCode The language to use for translating report
98 * output. If unspecified, this defaults to English ("en"). If the given
99 * language is not supported, report output will be returned in English. The
100 * language is specified as an [IETF BCP-47 language
101 * code](https://en.wikipedia.org/wiki/IETF_language_tag).
102 * @opt_param string reportingTimeZone Timezone in which to generate the report.
103 * If unspecified, this defaults to the account timezone. For more information,
104 * see [changing the time zone of your
105 * reports](https://support.google.com/adsense/answer/9830725).
106 * @opt_param int startDate.day Day of a month. Must be from 1 to 31 and valid
107 * for the year and month, or 0 to specify a year by itself or a year and month
108 * where the day isn't significant.
109 * @opt_param int startDate.month Month of a year. Must be from 1 to 12, or 0 to
110 * specify a year without a month and day.
111 * @opt_param int startDate.year Year of the date. Must be from 1 to 9999, or 0
112 * to specify a date without a year.
113 * @return HttpBody
114 * @throws \Google\Service\Exception
115 */
116 public function generateCsv($name, $optParams = [])
117 {
118 $params = ['name' => $name];
119 $params = array_merge($params, $optParams);
120 return $this->call('generateCsv', [$params], HttpBody::class);
121 }
122 /**
123 * Lists saved reports. (saved.listAccountsReportsSaved)
124 *
125 * @param string $parent Required. The account which owns the collection of
126 * reports. Format: accounts/{account}
127 * @param array $optParams Optional parameters.
128 *
129 * @opt_param int pageSize The maximum number of reports to include in the
130 * response, used for paging. If unspecified, at most 10000 reports will be
131 * returned. The maximum value is 10000; values above 10000 will be coerced to
132 * 10000.
133 * @opt_param string pageToken A page token, received from a previous
134 * `ListSavedReports` call. Provide this to retrieve the subsequent page. When
135 * paginating, all other parameters provided to `ListSavedReports` must match
136 * the call that provided the page token.
137 * @return ListSavedReportsResponse
138 * @throws \Google\Service\Exception
139 */
140 public function listAccountsReportsSaved($parent, $optParams = [])
141 {
142 $params = ['parent' => $parent];
143 $params = array_merge($params, $optParams);
144 return $this->call('list', [$params], ListSavedReportsResponse::class);
145 }
146}
147
148// Adding a class alias for backwards compatibility with the previous class name.
149class_alias(AccountsReportsSaved::class, 'Google_Service_Adsense_Resource_AccountsReportsSaved');
Note: See TracBrowser for help on using the repository browser.