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\MyBusinessVerifications\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\MyBusinessVerifications\CompleteVerificationRequest;
|
---|
21 | use Google\Service\MyBusinessVerifications\CompleteVerificationResponse;
|
---|
22 | use Google\Service\MyBusinessVerifications\ListVerificationsResponse;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "verifications" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $mybusinessverificationsService = new Google\Service\MyBusinessVerifications(...);
|
---|
29 | * $verifications = $mybusinessverificationsService->locations_verifications;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class LocationsVerifications extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Completes a `PENDING` verification. It is only necessary for non `AUTO`
|
---|
36 | * verification methods. `AUTO` verification request is instantly `VERIFIED`
|
---|
37 | * upon creation. (verifications.complete)
|
---|
38 | *
|
---|
39 | * @param string $name Required. Resource name of the verification to complete.
|
---|
40 | * @param CompleteVerificationRequest $postBody
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | * @return CompleteVerificationResponse
|
---|
43 | * @throws \Google\Service\Exception
|
---|
44 | */
|
---|
45 | public function complete($name, CompleteVerificationRequest $postBody, $optParams = [])
|
---|
46 | {
|
---|
47 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
48 | $params = array_merge($params, $optParams);
|
---|
49 | return $this->call('complete', [$params], CompleteVerificationResponse::class);
|
---|
50 | }
|
---|
51 | /**
|
---|
52 | * List verifications of a location, ordered by create time.
|
---|
53 | * (verifications.listLocationsVerifications)
|
---|
54 | *
|
---|
55 | * @param string $parent Required. Resource name of the location that
|
---|
56 | * verification requests belong to.
|
---|
57 | * @param array $optParams Optional parameters.
|
---|
58 | *
|
---|
59 | * @opt_param int pageSize How many verification to include per page. Minimum is
|
---|
60 | * 1, and the default and maximum page size is 100.
|
---|
61 | * @opt_param string pageToken If specified, returns the next page of
|
---|
62 | * verifications.
|
---|
63 | * @return ListVerificationsResponse
|
---|
64 | * @throws \Google\Service\Exception
|
---|
65 | */
|
---|
66 | public function listLocationsVerifications($parent, $optParams = [])
|
---|
67 | {
|
---|
68 | $params = ['parent' => $parent];
|
---|
69 | $params = array_merge($params, $optParams);
|
---|
70 | return $this->call('list', [$params], ListVerificationsResponse::class);
|
---|
71 | }
|
---|
72 | }
|
---|
73 |
|
---|
74 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
75 | class_alias(LocationsVerifications::class, 'Google_Service_MyBusinessVerifications_Resource_LocationsVerifications');
|
---|