MyBusinessVerifications.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. public $rootUrlTemplate;
  39. /**
  40. * Constructs the internal representation of the MyBusinessVerifications
  41. * service.
  42. *
  43. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  44. * config array to pass to a new Client instance.
  45. * @param string $rootUrl The root URL used for requests to the service.
  46. */
  47. public function __construct($clientOrConfig = [], $rootUrl = null)
  48. {
  49. parent::__construct($clientOrConfig);
  50. $this->rootUrl = $rootUrl ?: 'https://mybusinessverifications.googleapis.com/';
  51. $this->rootUrlTemplate = $rootUrl ?: 'https://mybusinessverifications.UNIVERSE_DOMAIN/';
  52. $this->servicePath = '';
  53. $this->batchPath = 'batch';
  54. $this->version = 'v1';
  55. $this->serviceName = 'mybusinessverifications';
  56. $this->locations = new MyBusinessVerifications\Resource\Locations(
  57. $this,
  58. $this->serviceName,
  59. 'locations',
  60. [
  61. 'methods' => [
  62. 'fetchVerificationOptions' => [
  63. 'path' => 'v1/{+location}:fetchVerificationOptions',
  64. 'httpMethod' => 'POST',
  65. 'parameters' => [
  66. 'location' => [
  67. 'location' => 'path',
  68. 'type' => 'string',
  69. 'required' => true,
  70. ],
  71. ],
  72. ],'getVoiceOfMerchantState' => [
  73. 'path' => 'v1/{+name}/VoiceOfMerchantState',
  74. 'httpMethod' => 'GET',
  75. 'parameters' => [
  76. 'name' => [
  77. 'location' => 'path',
  78. 'type' => 'string',
  79. 'required' => true,
  80. ],
  81. ],
  82. ],'verify' => [
  83. 'path' => 'v1/{+name}:verify',
  84. 'httpMethod' => 'POST',
  85. 'parameters' => [
  86. 'name' => [
  87. 'location' => 'path',
  88. 'type' => 'string',
  89. 'required' => true,
  90. ],
  91. ],
  92. ],
  93. ]
  94. ]
  95. );
  96. $this->locations_verifications = new MyBusinessVerifications\Resource\LocationsVerifications(
  97. $this,
  98. $this->serviceName,
  99. 'verifications',
  100. [
  101. 'methods' => [
  102. 'complete' => [
  103. 'path' => 'v1/{+name}:complete',
  104. 'httpMethod' => 'POST',
  105. 'parameters' => [
  106. 'name' => [
  107. 'location' => 'path',
  108. 'type' => 'string',
  109. 'required' => true,
  110. ],
  111. ],
  112. ],'list' => [
  113. 'path' => 'v1/{+parent}/verifications',
  114. 'httpMethod' => 'GET',
  115. 'parameters' => [
  116. 'parent' => [
  117. 'location' => 'path',
  118. 'type' => 'string',
  119. 'required' => true,
  120. ],
  121. 'pageSize' => [
  122. 'location' => 'query',
  123. 'type' => 'integer',
  124. ],
  125. 'pageToken' => [
  126. 'location' => 'query',
  127. 'type' => 'string',
  128. ],
  129. ],
  130. ],
  131. ]
  132. ]
  133. );
  134. $this->verificationTokens = new MyBusinessVerifications\Resource\VerificationTokens(
  135. $this,
  136. $this->serviceName,
  137. 'verificationTokens',
  138. [
  139. 'methods' => [
  140. 'generate' => [
  141. 'path' => 'v1/verificationTokens:generate',
  142. 'httpMethod' => 'POST',
  143. 'parameters' => [],
  144. ],
  145. ]
  146. ]
  147. );
  148. }
  149. }
  150. // Adding a class alias for backwards compatibility with the previous class name.
  151. class_alias(MyBusinessVerifications::class, 'Google_Service_MyBusinessVerifications');