MerchantReview.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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\Merchant;
  18. class MerchantReview extends \Google\Collection
  19. {
  20. protected $collection_key = 'customAttributes';
  21. protected $customAttributesType = CustomAttribute::class;
  22. protected $customAttributesDataType = 'array';
  23. /**
  24. * Output only. The primary data source of the merchant review.
  25. *
  26. * @var string
  27. */
  28. public $dataSource;
  29. protected $merchantReviewAttributesType = MerchantReviewAttributes::class;
  30. protected $merchantReviewAttributesDataType = '';
  31. /**
  32. * Required. The user provided merchant review ID to uniquely identify the
  33. * merchant review.
  34. *
  35. * @var string
  36. */
  37. public $merchantReviewId;
  38. protected $merchantReviewStatusType = MerchantReviewStatus::class;
  39. protected $merchantReviewStatusDataType = '';
  40. /**
  41. * Identifier. The name of the merchant review. Format: `"{merchantreview.name
  42. * =accounts/{account}/merchantReviews/{merchantReview}}"`
  43. *
  44. * @var string
  45. */
  46. public $name;
  47. /**
  48. * Optional. A list of custom (merchant-provided) attributes. It can also be
  49. * used for submitting any attribute of the data specification in its generic
  50. * form (for example, `{ "name": "size type", "value": "regular" }`). This is
  51. * useful for submitting attributes not explicitly exposed by the API, such as
  52. * experimental attributes. Maximum allowed number of characters for each
  53. * custom attribute is 10240 (represents sum of characters for name and
  54. * value). Maximum 2500 custom attributes can be set per product, with total
  55. * size of 102.4kB. Underscores in custom attribute names are replaced by
  56. * spaces upon insertion.
  57. *
  58. * @param CustomAttribute[] $customAttributes
  59. */
  60. public function setCustomAttributes($customAttributes)
  61. {
  62. $this->customAttributes = $customAttributes;
  63. }
  64. /**
  65. * @return CustomAttribute[]
  66. */
  67. public function getCustomAttributes()
  68. {
  69. return $this->customAttributes;
  70. }
  71. /**
  72. * Output only. The primary data source of the merchant review.
  73. *
  74. * @param string $dataSource
  75. */
  76. public function setDataSource($dataSource)
  77. {
  78. $this->dataSource = $dataSource;
  79. }
  80. /**
  81. * @return string
  82. */
  83. public function getDataSource()
  84. {
  85. return $this->dataSource;
  86. }
  87. /**
  88. * Optional. A list of merchant review attributes.
  89. *
  90. * @param MerchantReviewAttributes $merchantReviewAttributes
  91. */
  92. public function setMerchantReviewAttributes(MerchantReviewAttributes $merchantReviewAttributes)
  93. {
  94. $this->merchantReviewAttributes = $merchantReviewAttributes;
  95. }
  96. /**
  97. * @return MerchantReviewAttributes
  98. */
  99. public function getMerchantReviewAttributes()
  100. {
  101. return $this->merchantReviewAttributes;
  102. }
  103. /**
  104. * Required. The user provided merchant review ID to uniquely identify the
  105. * merchant review.
  106. *
  107. * @param string $merchantReviewId
  108. */
  109. public function setMerchantReviewId($merchantReviewId)
  110. {
  111. $this->merchantReviewId = $merchantReviewId;
  112. }
  113. /**
  114. * @return string
  115. */
  116. public function getMerchantReviewId()
  117. {
  118. return $this->merchantReviewId;
  119. }
  120. /**
  121. * Output only. The status of a merchant review, data validation issues, that
  122. * is, information about a merchant review computed asynchronously.
  123. *
  124. * @param MerchantReviewStatus $merchantReviewStatus
  125. */
  126. public function setMerchantReviewStatus(MerchantReviewStatus $merchantReviewStatus)
  127. {
  128. $this->merchantReviewStatus = $merchantReviewStatus;
  129. }
  130. /**
  131. * @return MerchantReviewStatus
  132. */
  133. public function getMerchantReviewStatus()
  134. {
  135. return $this->merchantReviewStatus;
  136. }
  137. /**
  138. * Identifier. The name of the merchant review. Format: `"{merchantreview.name
  139. * =accounts/{account}/merchantReviews/{merchantReview}}"`
  140. *
  141. * @param string $name
  142. */
  143. public function setName($name)
  144. {
  145. $this->name = $name;
  146. }
  147. /**
  148. * @return string
  149. */
  150. public function getName()
  151. {
  152. return $this->name;
  153. }
  154. }
  155. // Adding a class alias for backwards compatibility with the previous class name.
  156. class_alias(MerchantReview::class, 'Google_Service_Merchant_MerchantReview');