CaseInterface.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Signifyd\Api\Data;
  7. use Magento\Signifyd\Model\SignifydGateway\Gateway;
  8. /**
  9. * Signifyd Case entity interface
  10. *
  11. * @api
  12. * @see https://www.signifyd.com/docs/api/#/reference/cases/retrieve-a-case/get-a-case
  13. * @since 100.2.0
  14. */
  15. interface CaseInterface
  16. {
  17. /**#@+
  18. * Constants for case available statuses
  19. */
  20. const STATUS_OPEN = Gateway::STATUS_OPEN;
  21. const STATUS_PENDING = 'PENDING';
  22. const STATUS_PROCESSING = Gateway::STATUS_PROCESSING;
  23. const STATUS_FLAGGED = Gateway::STATUS_FLAGGED;
  24. const STATUS_DISMISSED = Gateway::STATUS_DISMISSED;
  25. /**#@-*/
  26. /**#@+
  27. * Constants for guarantee available statuses
  28. */
  29. const GUARANTEE_APPROVED = Gateway::GUARANTEE_APPROVED;
  30. const GUARANTEE_DECLINED = Gateway::GUARANTEE_DECLINED;
  31. const GUARANTEE_PENDING = Gateway::GUARANTEE_PENDING;
  32. const GUARANTEE_CANCELED = Gateway::GUARANTEE_CANCELED;
  33. const GUARANTEE_IN_REVIEW = Gateway::GUARANTEE_IN_REVIEW;
  34. const GUARANTEE_UNREQUESTED = Gateway::GUARANTEE_UNREQUESTED;
  35. /**#@-*/
  36. /**#@+
  37. * Constants for case available review dispositions
  38. */
  39. const DISPOSITION_GOOD = Gateway::DISPOSITION_GOOD;
  40. const DISPOSITION_FRAUDULENT = Gateway::DISPOSITION_FRAUDULENT;
  41. const DISPOSITION_UNSET = Gateway::DISPOSITION_UNSET;
  42. /**#@-*/
  43. /**
  44. * Returns local case entity identifier.
  45. *
  46. * @return int
  47. * @since 100.2.0
  48. */
  49. public function getEntityId();
  50. /**
  51. * Sets local case entity id.
  52. *
  53. * @param int $id
  54. * @return $this
  55. * @since 100.2.0
  56. */
  57. public function setEntityId($id);
  58. /**
  59. * Returns Signifyd case identifier.
  60. *
  61. * @return int
  62. * @since 100.2.0
  63. */
  64. public function getCaseId();
  65. /**
  66. * Sets Signifyd case id.
  67. *
  68. * @param int $id
  69. * @return $this
  70. * @since 100.2.0
  71. */
  72. public function setCaseId($id);
  73. /**
  74. * Returns value, which indicates if a guarantee can be requested for a case.
  75. * Returns null if state of guarantee eligible does not set yet.
  76. *
  77. * @return boolean|null
  78. * @since 100.2.0
  79. */
  80. public function isGuaranteeEligible();
  81. /**
  82. * Sets value-indicator about guarantee availability for a case.
  83. *
  84. * @param bool $guaranteeEligible
  85. * @return $this
  86. * @since 100.2.0
  87. */
  88. public function setGuaranteeEligible($guaranteeEligible);
  89. /**
  90. * Returns decision state of the guarantee.
  91. *
  92. * @return string
  93. * @since 100.2.0
  94. */
  95. public function getGuaranteeDisposition();
  96. /**
  97. * Sets decision state of the guarantee.
  98. *
  99. * @param string $disposition
  100. * @return $this
  101. * @since 100.2.0
  102. */
  103. public function setGuaranteeDisposition($disposition);
  104. /**
  105. * Returns case status.
  106. *
  107. * @return string
  108. * @since 100.2.0
  109. */
  110. public function getStatus();
  111. /**
  112. * Sets case status.
  113. *
  114. * @param string $status
  115. * @return $this
  116. * @since 100.2.0
  117. */
  118. public function setStatus($status);
  119. /**
  120. * Returns value, which indicates the likelihood that the order is fraud.
  121. *
  122. * @return int
  123. * @since 100.2.0
  124. */
  125. public function getScore();
  126. /**
  127. * Sets risk level value.
  128. *
  129. * @param int $score
  130. * @return $this
  131. * @since 100.2.0
  132. */
  133. public function setScore($score);
  134. /**
  135. * Get order id for a case.
  136. *
  137. * @return int
  138. * @since 100.2.0
  139. */
  140. public function getOrderId();
  141. /**
  142. * Sets order id for a case.
  143. *
  144. * @param int $orderId
  145. * @return $this
  146. * @since 100.2.0
  147. */
  148. public function setOrderId($orderId);
  149. /**
  150. * Returns data about a team associated with a case.
  151. *
  152. * @return array
  153. * @since 100.2.0
  154. */
  155. public function getAssociatedTeam();
  156. /**
  157. * Sets team data associated with a case.
  158. *
  159. * @param array $team
  160. * @return $this
  161. * @since 100.2.0
  162. */
  163. public function setAssociatedTeam(array $team);
  164. /**
  165. * Returns disposition of an agent's opinion after reviewing the case.
  166. *
  167. * @return string
  168. * @since 100.2.0
  169. */
  170. public function getReviewDisposition();
  171. /**
  172. * Sets case disposition.
  173. *
  174. * @param string $disposition
  175. * @return $this
  176. * @since 100.2.0
  177. */
  178. public function setReviewDisposition($disposition);
  179. /**
  180. * Returns creation datetime for a case.
  181. *
  182. * @return string
  183. * @since 100.2.0
  184. */
  185. public function getCreatedAt();
  186. /**
  187. * Sets creation datetime for a case.
  188. *
  189. * @param string $datetime in DATE_ATOM format
  190. * @return $this
  191. * @since 100.2.0
  192. */
  193. public function setCreatedAt($datetime);
  194. /**
  195. * Returns updating datetime for a case.
  196. *
  197. * @return string
  198. * @since 100.2.0
  199. */
  200. public function getUpdatedAt();
  201. /**
  202. * Sets updating datetime for a case.
  203. *
  204. * @param string $datetime in DATE_ATOM format
  205. * @return $this
  206. * @since 100.2.0
  207. */
  208. public function setUpdatedAt($datetime);
  209. }