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\AddressValidation\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\AddressValidation\GoogleMapsAddressvalidationV1ProvideValidationFeedbackRequest;
|
---|
21 | use Google\Service\AddressValidation\GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse;
|
---|
22 | use Google\Service\AddressValidation\GoogleMapsAddressvalidationV1ValidateAddressRequest;
|
---|
23 | use Google\Service\AddressValidation\GoogleMapsAddressvalidationV1ValidateAddressResponse;
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * The "v1" collection of methods.
|
---|
27 | * Typical usage is:
|
---|
28 | * <code>
|
---|
29 | * $addressvalidationService = new Google\Service\AddressValidation(...);
|
---|
30 | * $v1 = $addressvalidationService->v1;
|
---|
31 | * </code>
|
---|
32 | */
|
---|
33 | class V1 extends \Google\Service\Resource
|
---|
34 | {
|
---|
35 | /**
|
---|
36 | * Feedback about the outcome of the sequence of validation attempts. This
|
---|
37 | * should be the last call made after a sequence of validation calls for the
|
---|
38 | * same address, and should be called once the transaction is concluded. This
|
---|
39 | * should only be sent once for the sequence of `ValidateAddress` requests
|
---|
40 | * needed to validate an address fully. (v1.provideValidationFeedback)
|
---|
41 | *
|
---|
42 | * @param GoogleMapsAddressvalidationV1ProvideValidationFeedbackRequest $postBody
|
---|
43 | * @param array $optParams Optional parameters.
|
---|
44 | * @return GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse
|
---|
45 | * @throws \Google\Service\Exception
|
---|
46 | */
|
---|
47 | public function provideValidationFeedback(GoogleMapsAddressvalidationV1ProvideValidationFeedbackRequest $postBody, $optParams = [])
|
---|
48 | {
|
---|
49 | $params = ['postBody' => $postBody];
|
---|
50 | $params = array_merge($params, $optParams);
|
---|
51 | return $this->call('provideValidationFeedback', [$params], GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse::class);
|
---|
52 | }
|
---|
53 | /**
|
---|
54 | * Validates an address. (v1.validateAddress)
|
---|
55 | *
|
---|
56 | * @param GoogleMapsAddressvalidationV1ValidateAddressRequest $postBody
|
---|
57 | * @param array $optParams Optional parameters.
|
---|
58 | * @return GoogleMapsAddressvalidationV1ValidateAddressResponse
|
---|
59 | * @throws \Google\Service\Exception
|
---|
60 | */
|
---|
61 | public function validateAddress(GoogleMapsAddressvalidationV1ValidateAddressRequest $postBody, $optParams = [])
|
---|
62 | {
|
---|
63 | $params = ['postBody' => $postBody];
|
---|
64 | $params = array_merge($params, $optParams);
|
---|
65 | return $this->call('validateAddress', [$params], GoogleMapsAddressvalidationV1ValidateAddressResponse::class);
|
---|
66 | }
|
---|
67 | }
|
---|
68 |
|
---|
69 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
70 | class_alias(V1::class, 'Google_Service_AddressValidation_Resource_V1');
|
---|