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\MyBusinessVerifications\Resource;
19
20use Google\Service\MyBusinessVerifications\FetchVerificationOptionsRequest;
21use Google\Service\MyBusinessVerifications\FetchVerificationOptionsResponse;
22use Google\Service\MyBusinessVerifications\VerifyLocationRequest;
23use Google\Service\MyBusinessVerifications\VerifyLocationResponse;
24use Google\Service\MyBusinessVerifications\VoiceOfMerchantState;
25
26/**
27 * The "locations" collection of methods.
28 * Typical usage is:
29 *  <code>
30 *   $mybusinessverificationsService = new Google\Service\MyBusinessVerifications(...);
31 *   $locations = $mybusinessverificationsService->locations;
32 *  </code>
33 */
34class Locations extends \Google\Service\Resource
35{
36  /**
37   * Reports all eligible verification options for a location in a specific
38   * language. (locations.fetchVerificationOptions)
39   *
40   * @param string $location Required. The location to verify.
41   * @param FetchVerificationOptionsRequest $postBody
42   * @param array $optParams Optional parameters.
43   * @return FetchVerificationOptionsResponse
44   */
45  public function fetchVerificationOptions($location, FetchVerificationOptionsRequest $postBody, $optParams = [])
46  {
47    $params = ['location' => $location, 'postBody' => $postBody];
48    $params = array_merge($params, $optParams);
49    return $this->call('fetchVerificationOptions', [$params], FetchVerificationOptionsResponse::class);
50  }
51  /**
52   * Gets the VoiceOfMerchant state. (locations.getVoiceOfMerchantState)
53   *
54   * @param string $name Required. Resource name of the location.
55   * @param array $optParams Optional parameters.
56   * @return VoiceOfMerchantState
57   */
58  public function getVoiceOfMerchantState($name, $optParams = [])
59  {
60    $params = ['name' => $name];
61    $params = array_merge($params, $optParams);
62    return $this->call('getVoiceOfMerchantState', [$params], VoiceOfMerchantState::class);
63  }
64  /**
65   * Starts the verification process for a location. (locations.verify)
66   *
67   * @param string $name Required. Resource name of the location to verify.
68   * @param VerifyLocationRequest $postBody
69   * @param array $optParams Optional parameters.
70   * @return VerifyLocationResponse
71   */
72  public function verify($name, VerifyLocationRequest $postBody, $optParams = [])
73  {
74    $params = ['name' => $name, 'postBody' => $postBody];
75    $params = array_merge($params, $optParams);
76    return $this->call('verify', [$params], VerifyLocationResponse::class);
77  }
78}
79
80// Adding a class alias for backwards compatibility with the previous class name.
81class_alias(Locations::class, 'Google_Service_MyBusinessVerifications_Resource_Locations');
82