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\Localservices\Resource;
19
20use Google\Service\Localservices\GoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse;
21
22/**
23 * The "detailedLeadReports" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $localservicesService = new Google\Service\Localservices(...);
27 *   $detailedLeadReports = $localservicesService->detailedLeadReports;
28 *  </code>
29 */
30class DetailedLeadReports extends \Google\Service\Resource
31{
32  /**
33   * Get detailed lead reports containing leads that have been received by all
34   * linked GLS accounts. Caller needs to provide their manager customer id and
35   * the associated auth credential that allows them read permissions on their
36   * linked accounts. (detailedLeadReports.search)
37   *
38   * @param array $optParams Optional parameters.
39   *
40   * @opt_param int endDate.day Day of a month. Must be from 1 to 31 and valid for
41   * the year and month, or 0 to specify a year by itself or a year and month
42   * where the day isn't significant.
43   * @opt_param int endDate.month Month of a year. Must be from 1 to 12, or 0 to
44   * specify a year without a month and day.
45   * @opt_param int endDate.year Year of the date. Must be from 1 to 9999, or 0 to
46   * specify a date without a year.
47   * @opt_param int pageSize The maximum number of accounts to return. If the page
48   * size is unset, page size will default to 1000. Maximum page_size is 10000.
49   * Optional.
50   * @opt_param string pageToken The `next_page_token` value returned from a
51   * previous request to SearchDetailedLeadReports that indicates where listing
52   * should continue. Optional.
53   * @opt_param string query A query string for searching for account reports.
54   * Caller must provide a customer id of their MCC account with an associated
55   * Gaia Mint that allows read permission on their linked accounts. Search
56   * expressions are case insensitive. Example query: | Query | Description |
57   * |-------------------------|-----------------------------------------------| |
58   * manager_customer_id:123 | Get Detailed Lead Report for Manager with id | | |
59   * 123. | Required.
60   * @opt_param int startDate.day Day of a month. Must be from 1 to 31 and valid
61   * for the year and month, or 0 to specify a year by itself or a year and month
62   * where the day isn't significant.
63   * @opt_param int startDate.month Month of a year. Must be from 1 to 12, or 0 to
64   * specify a year without a month and day.
65   * @opt_param int startDate.year Year of the date. Must be from 1 to 9999, or 0
66   * to specify a date without a year.
67   * @return GoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse
68   */
69  public function search($optParams = [])
70  {
71    $params = [];
72    $params = array_merge($params, $optParams);
73    return $this->call('search', [$params], GoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse::class);
74  }
75}
76
77// Adding a class alias for backwards compatibility with the previous class name.
78class_alias(DetailedLeadReports::class, 'Google_Service_Localservices_Resource_DetailedLeadReports');
79