MyBusinessVerifications.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. namespace Google\Service;
  18. use Google\Client;
  19. /**
  20. * Service definition for MyBusinessVerifications (v1).
  21. *
  22. * <p>
  23. * The My Business Verifications API provides an interface for taking
  24. * verifications related actions for locations.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://developers.google.com/my-business/" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class MyBusinessVerifications extends \Google\Service
  34. {
  35. public $locations;
  36. public $locations_verifications;
  37. public $verificationTokens;
  38. /**
  39. * Constructs the internal representation of the MyBusinessVerifications
  40. * service.
  41. *
  42. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  43. * config array to pass to a new Client instance.
  44. * @param string $rootUrl The root URL used for requests to the service.
  45. */
  46. public function __construct($clientOrConfig = [], $rootUrl = null)
  47. {
  48. parent::__construct($clientOrConfig);
  49. $this->rootUrl = $rootUrl ?: 'https://mybusinessverifications.googleapis.com/';
  50. $this->servicePath = '';
  51. $this->batchPath = 'batch';
  52. $this->version = 'v1';
  53. $this->serviceName = 'mybusinessverifications';
  54. $this->locations = new MyBusinessVerifications\Resource\Locations(
  55. $this,
  56. $this->serviceName,
  57. 'locations',
  58. [
  59. 'methods' => [
  60. 'fetchVerificationOptions' => [
  61. 'path' => 'v1/{+location}:fetchVerificationOptions',
  62. 'httpMethod' => 'POST',
  63. 'parameters' => [
  64. 'location' => [
  65. 'location' => 'path',
  66. 'type' => 'string',
  67. 'required' => true,
  68. ],
  69. ],
  70. ],'getVoiceOfMerchantState' => [
  71. 'path' => 'v1/{+name}/VoiceOfMerchantState',
  72. 'httpMethod' => 'GET',
  73. 'parameters' => [
  74. 'name' => [
  75. 'location' => 'path',
  76. 'type' => 'string',
  77. 'required' => true,
  78. ],
  79. ],
  80. ],'verify' => [
  81. 'path' => 'v1/{+name}:verify',
  82. 'httpMethod' => 'POST',
  83. 'parameters' => [
  84. 'name' => [
  85. 'location' => 'path',
  86. 'type' => 'string',
  87. 'required' => true,
  88. ],
  89. ],
  90. ],
  91. ]
  92. ]
  93. );
  94. $this->locations_verifications = new MyBusinessVerifications\Resource\LocationsVerifications(
  95. $this,
  96. $this->serviceName,
  97. 'verifications',
  98. [
  99. 'methods' => [
  100. 'complete' => [
  101. 'path' => 'v1/{+name}:complete',
  102. 'httpMethod' => 'POST',
  103. 'parameters' => [
  104. 'name' => [
  105. 'location' => 'path',
  106. 'type' => 'string',
  107. 'required' => true,
  108. ],
  109. ],
  110. ],'list' => [
  111. 'path' => 'v1/{+parent}/verifications',
  112. 'httpMethod' => 'GET',
  113. 'parameters' => [
  114. 'parent' => [
  115. 'location' => 'path',
  116. 'type' => 'string',
  117. 'required' => true,
  118. ],
  119. 'pageSize' => [
  120. 'location' => 'query',
  121. 'type' => 'integer',
  122. ],
  123. 'pageToken' => [
  124. 'location' => 'query',
  125. 'type' => 'string',
  126. ],
  127. ],
  128. ],
  129. ]
  130. ]
  131. );
  132. $this->verificationTokens = new MyBusinessVerifications\Resource\VerificationTokens(
  133. $this,
  134. $this->serviceName,
  135. 'verificationTokens',
  136. [
  137. 'methods' => [
  138. 'generate' => [
  139. 'path' => 'v1/verificationTokens:generate',
  140. 'httpMethod' => 'POST',
  141. 'parameters' => [],
  142. ],
  143. ]
  144. ]
  145. );
  146. }
  147. }
  148. // Adding a class alias for backwards compatibility with the previous class name.
  149. class_alias(MyBusinessVerifications::class, 'Google_Service_MyBusinessVerifications');