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; 19 20use Google\Client; 21 22/** 23 * Service definition for Localservices (v1). 24 * 25 * <p> 26</p> 27 * 28 * <p> 29 * For more information about this service, see the API 30 * <a href="https://ads.google.com/local-services-ads/" target="_blank">Documentation</a> 31 * </p> 32 * 33 * @author Google, Inc. 34 */ 35class Localservices extends \Google\Service 36{ 37 /** Manage your AdWords campaigns. */ 38 const ADWORDS = 39 "https://www.googleapis.com/auth/adwords"; 40 41 public $accountReports; 42 public $detailedLeadReports; 43 44 /** 45 * Constructs the internal representation of the Localservices service. 46 * 47 * @param Client|array $clientOrConfig The client used to deliver requests, or a 48 * config array to pass to a new Client instance. 49 * @param string $rootUrl The root URL used for requests to the service. 50 */ 51 public function __construct($clientOrConfig = [], $rootUrl = null) 52 { 53 parent::__construct($clientOrConfig); 54 $this->rootUrl = $rootUrl ?: 'https://localservices.googleapis.com/'; 55 $this->servicePath = ''; 56 $this->batchPath = 'batch'; 57 $this->version = 'v1'; 58 $this->serviceName = 'localservices'; 59 60 $this->accountReports = new Localservices\Resource\AccountReports( 61 $this, 62 $this->serviceName, 63 'accountReports', 64 [ 65 'methods' => [ 66 'search' => [ 67 'path' => 'v1/accountReports:search', 68 'httpMethod' => 'GET', 69 'parameters' => [ 70 'endDate.day' => [ 71 'location' => 'query', 72 'type' => 'integer', 73 ], 74 'endDate.month' => [ 75 'location' => 'query', 76 'type' => 'integer', 77 ], 78 'endDate.year' => [ 79 'location' => 'query', 80 'type' => 'integer', 81 ], 82 'pageSize' => [ 83 'location' => 'query', 84 'type' => 'integer', 85 ], 86 'pageToken' => [ 87 'location' => 'query', 88 'type' => 'string', 89 ], 90 'query' => [ 91 'location' => 'query', 92 'type' => 'string', 93 ], 94 'startDate.day' => [ 95 'location' => 'query', 96 'type' => 'integer', 97 ], 98 'startDate.month' => [ 99 'location' => 'query', 100 'type' => 'integer', 101 ], 102 'startDate.year' => [ 103 'location' => 'query', 104 'type' => 'integer', 105 ], 106 ], 107 ], 108 ] 109 ] 110 ); 111 $this->detailedLeadReports = new Localservices\Resource\DetailedLeadReports( 112 $this, 113 $this->serviceName, 114 'detailedLeadReports', 115 [ 116 'methods' => [ 117 'search' => [ 118 'path' => 'v1/detailedLeadReports:search', 119 'httpMethod' => 'GET', 120 'parameters' => [ 121 'endDate.day' => [ 122 'location' => 'query', 123 'type' => 'integer', 124 ], 125 'endDate.month' => [ 126 'location' => 'query', 127 'type' => 'integer', 128 ], 129 'endDate.year' => [ 130 'location' => 'query', 131 'type' => 'integer', 132 ], 133 'pageSize' => [ 134 'location' => 'query', 135 'type' => 'integer', 136 ], 137 'pageToken' => [ 138 'location' => 'query', 139 'type' => 'string', 140 ], 141 'query' => [ 142 'location' => 'query', 143 'type' => 'string', 144 ], 145 'startDate.day' => [ 146 'location' => 'query', 147 'type' => 'integer', 148 ], 149 'startDate.month' => [ 150 'location' => 'query', 151 'type' => 'integer', 152 ], 153 'startDate.year' => [ 154 'location' => 'query', 155 'type' => 'integer', 156 ], 157 ], 158 ], 159 ] 160 ] 161 ); 162 } 163} 164 165// Adding a class alias for backwards compatibility with the previous class name. 166class_alias(Localservices::class, 'Google_Service_Localservices'); 167