MerchantReviewAttributes.php 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  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 MerchantReviewAttributes extends \Google\Model
  19. {
  20. /**
  21. * Collection method unspecified.
  22. */
  23. public const COLLECTION_METHOD_COLLECTION_METHOD_UNSPECIFIED = 'COLLECTION_METHOD_UNSPECIFIED';
  24. /**
  25. * The user was not responding to a specific solicitation when they submitted
  26. * the review.
  27. */
  28. public const COLLECTION_METHOD_MERCHANT_UNSOLICITED = 'MERCHANT_UNSOLICITED';
  29. /**
  30. * The user submitted the review in response to a solicitation when the user
  31. * placed an order.
  32. */
  33. public const COLLECTION_METHOD_POINT_OF_SALE = 'POINT_OF_SALE';
  34. /**
  35. * The user submitted the review in response to a solicitation after
  36. * fulfillment of the user's order.
  37. */
  38. public const COLLECTION_METHOD_AFTER_FULFILLMENT = 'AFTER_FULFILLMENT';
  39. /**
  40. * Optional. The method used to collect the review.
  41. *
  42. * @var string
  43. */
  44. public $collectionMethod;
  45. /**
  46. * Required. This should be any freeform text provided by the user and should
  47. * not be truncated. If multiple responses to different questions are
  48. * provided, all responses should be included, with the minimal context for
  49. * the responses to make sense. Context should not be provided if questions
  50. * were left unanswered.
  51. *
  52. * @var string
  53. */
  54. public $content;
  55. /**
  56. * Optional. Set to true if the reviewer should remain anonymous.
  57. *
  58. * @var bool
  59. */
  60. public $isAnonymous;
  61. /**
  62. * Optional. The maximum possible number for the rating. The value of the max
  63. * rating must be greater than the value of the min rating.
  64. *
  65. * @var string
  66. */
  67. public $maxRating;
  68. /**
  69. * Optional. Human-readable display name for the merchant.
  70. *
  71. * @var string
  72. */
  73. public $merchantDisplayName;
  74. /**
  75. * Required. Must be unique and stable across all requests. In other words, if
  76. * a request today and another 90 days ago refer to the same merchant, they
  77. * must have the same id.
  78. *
  79. * @var string
  80. */
  81. public $merchantId;
  82. /**
  83. * Optional. URL to the merchant's main website. Do not use a redirect URL for
  84. * this value. In other words, the value should point directly to the
  85. * merchant's site.
  86. *
  87. * @var string
  88. */
  89. public $merchantLink;
  90. /**
  91. * Optional. URL to the landing page that hosts the reviews for this merchant.
  92. * Do not use a redirect URL.
  93. *
  94. * @var string
  95. */
  96. public $merchantRatingLink;
  97. /**
  98. * Optional. The minimum possible number for the rating. This should be the
  99. * worst possible rating and should not be a value for no rating.
  100. *
  101. * @var string
  102. */
  103. public $minRating;
  104. /**
  105. * Optional. The reviewer's overall rating of the merchant.
  106. *
  107. * @var
  108. */
  109. public $rating;
  110. /**
  111. * Optional. The country where the reviewer made the order defined by ISO
  112. * 3166-1 Alpha-2 Country Code.
  113. *
  114. * @var string
  115. */
  116. public $reviewCountry;
  117. /**
  118. * Optional. The language of the review defined by BCP-47 language code.
  119. *
  120. * @var string
  121. */
  122. public $reviewLanguage;
  123. /**
  124. * Required. The timestamp indicating when the review was written.
  125. *
  126. * @var string
  127. */
  128. public $reviewTime;
  129. /**
  130. * Optional. A permanent, unique identifier for the author of the review in
  131. * the publisher's system.
  132. *
  133. * @var string
  134. */
  135. public $reviewerId;
  136. /**
  137. * Optional. Display name of the review author.
  138. *
  139. * @var string
  140. */
  141. public $reviewerUsername;
  142. /**
  143. * Optional. The title of the review.
  144. *
  145. * @var string
  146. */
  147. public $title;
  148. /**
  149. * Optional. The method used to collect the review.
  150. *
  151. * Accepted values: COLLECTION_METHOD_UNSPECIFIED, MERCHANT_UNSOLICITED,
  152. * POINT_OF_SALE, AFTER_FULFILLMENT
  153. *
  154. * @param self::COLLECTION_METHOD_* $collectionMethod
  155. */
  156. public function setCollectionMethod($collectionMethod)
  157. {
  158. $this->collectionMethod = $collectionMethod;
  159. }
  160. /**
  161. * @return self::COLLECTION_METHOD_*
  162. */
  163. public function getCollectionMethod()
  164. {
  165. return $this->collectionMethod;
  166. }
  167. /**
  168. * Required. This should be any freeform text provided by the user and should
  169. * not be truncated. If multiple responses to different questions are
  170. * provided, all responses should be included, with the minimal context for
  171. * the responses to make sense. Context should not be provided if questions
  172. * were left unanswered.
  173. *
  174. * @param string $content
  175. */
  176. public function setContent($content)
  177. {
  178. $this->content = $content;
  179. }
  180. /**
  181. * @return string
  182. */
  183. public function getContent()
  184. {
  185. return $this->content;
  186. }
  187. /**
  188. * Optional. Set to true if the reviewer should remain anonymous.
  189. *
  190. * @param bool $isAnonymous
  191. */
  192. public function setIsAnonymous($isAnonymous)
  193. {
  194. $this->isAnonymous = $isAnonymous;
  195. }
  196. /**
  197. * @return bool
  198. */
  199. public function getIsAnonymous()
  200. {
  201. return $this->isAnonymous;
  202. }
  203. /**
  204. * Optional. The maximum possible number for the rating. The value of the max
  205. * rating must be greater than the value of the min rating.
  206. *
  207. * @param string $maxRating
  208. */
  209. public function setMaxRating($maxRating)
  210. {
  211. $this->maxRating = $maxRating;
  212. }
  213. /**
  214. * @return string
  215. */
  216. public function getMaxRating()
  217. {
  218. return $this->maxRating;
  219. }
  220. /**
  221. * Optional. Human-readable display name for the merchant.
  222. *
  223. * @param string $merchantDisplayName
  224. */
  225. public function setMerchantDisplayName($merchantDisplayName)
  226. {
  227. $this->merchantDisplayName = $merchantDisplayName;
  228. }
  229. /**
  230. * @return string
  231. */
  232. public function getMerchantDisplayName()
  233. {
  234. return $this->merchantDisplayName;
  235. }
  236. /**
  237. * Required. Must be unique and stable across all requests. In other words, if
  238. * a request today and another 90 days ago refer to the same merchant, they
  239. * must have the same id.
  240. *
  241. * @param string $merchantId
  242. */
  243. public function setMerchantId($merchantId)
  244. {
  245. $this->merchantId = $merchantId;
  246. }
  247. /**
  248. * @return string
  249. */
  250. public function getMerchantId()
  251. {
  252. return $this->merchantId;
  253. }
  254. /**
  255. * Optional. URL to the merchant's main website. Do not use a redirect URL for
  256. * this value. In other words, the value should point directly to the
  257. * merchant's site.
  258. *
  259. * @param string $merchantLink
  260. */
  261. public function setMerchantLink($merchantLink)
  262. {
  263. $this->merchantLink = $merchantLink;
  264. }
  265. /**
  266. * @return string
  267. */
  268. public function getMerchantLink()
  269. {
  270. return $this->merchantLink;
  271. }
  272. /**
  273. * Optional. URL to the landing page that hosts the reviews for this merchant.
  274. * Do not use a redirect URL.
  275. *
  276. * @param string $merchantRatingLink
  277. */
  278. public function setMerchantRatingLink($merchantRatingLink)
  279. {
  280. $this->merchantRatingLink = $merchantRatingLink;
  281. }
  282. /**
  283. * @return string
  284. */
  285. public function getMerchantRatingLink()
  286. {
  287. return $this->merchantRatingLink;
  288. }
  289. /**
  290. * Optional. The minimum possible number for the rating. This should be the
  291. * worst possible rating and should not be a value for no rating.
  292. *
  293. * @param string $minRating
  294. */
  295. public function setMinRating($minRating)
  296. {
  297. $this->minRating = $minRating;
  298. }
  299. /**
  300. * @return string
  301. */
  302. public function getMinRating()
  303. {
  304. return $this->minRating;
  305. }
  306. public function setRating($rating)
  307. {
  308. $this->rating = $rating;
  309. }
  310. public function getRating()
  311. {
  312. return $this->rating;
  313. }
  314. /**
  315. * Optional. The country where the reviewer made the order defined by ISO
  316. * 3166-1 Alpha-2 Country Code.
  317. *
  318. * @param string $reviewCountry
  319. */
  320. public function setReviewCountry($reviewCountry)
  321. {
  322. $this->reviewCountry = $reviewCountry;
  323. }
  324. /**
  325. * @return string
  326. */
  327. public function getReviewCountry()
  328. {
  329. return $this->reviewCountry;
  330. }
  331. /**
  332. * Optional. The language of the review defined by BCP-47 language code.
  333. *
  334. * @param string $reviewLanguage
  335. */
  336. public function setReviewLanguage($reviewLanguage)
  337. {
  338. $this->reviewLanguage = $reviewLanguage;
  339. }
  340. /**
  341. * @return string
  342. */
  343. public function getReviewLanguage()
  344. {
  345. return $this->reviewLanguage;
  346. }
  347. /**
  348. * Required. The timestamp indicating when the review was written.
  349. *
  350. * @param string $reviewTime
  351. */
  352. public function setReviewTime($reviewTime)
  353. {
  354. $this->reviewTime = $reviewTime;
  355. }
  356. /**
  357. * @return string
  358. */
  359. public function getReviewTime()
  360. {
  361. return $this->reviewTime;
  362. }
  363. /**
  364. * Optional. A permanent, unique identifier for the author of the review in
  365. * the publisher's system.
  366. *
  367. * @param string $reviewerId
  368. */
  369. public function setReviewerId($reviewerId)
  370. {
  371. $this->reviewerId = $reviewerId;
  372. }
  373. /**
  374. * @return string
  375. */
  376. public function getReviewerId()
  377. {
  378. return $this->reviewerId;
  379. }
  380. /**
  381. * Optional. Display name of the review author.
  382. *
  383. * @param string $reviewerUsername
  384. */
  385. public function setReviewerUsername($reviewerUsername)
  386. {
  387. $this->reviewerUsername = $reviewerUsername;
  388. }
  389. /**
  390. * @return string
  391. */
  392. public function getReviewerUsername()
  393. {
  394. return $this->reviewerUsername;
  395. }
  396. /**
  397. * Optional. The title of the review.
  398. *
  399. * @param string $title
  400. */
  401. public function setTitle($title)
  402. {
  403. $this->title = $title;
  404. }
  405. /**
  406. * @return string
  407. */
  408. public function getTitle()
  409. {
  410. return $this->title;
  411. }
  412. }
  413. // Adding a class alias for backwards compatibility with the previous class name.
  414. class_alias(MerchantReviewAttributes::class, 'Google_Service_Merchant_MerchantReviewAttributes');