AgreementInterface.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\CheckoutAgreements\Api\Data;
  7. /**
  8. * Interface AgreementInterface
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface AgreementInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  13. {
  14. /**#@+
  15. * Constants for keys of data array. Identical to the name of the getter in snake case
  16. */
  17. const AGREEMENT_ID = 'agreement_id';
  18. const NAME = 'name';
  19. const CONTENT = 'content';
  20. const CONTENT_HEIGHT = 'content_height';
  21. const CHECKBOX_TEXT = 'checkbox_text';
  22. const IS_ACTIVE = 'is_active';
  23. const IS_HTML = 'is_html';
  24. const MODE = 'mode';
  25. /**#@-*/
  26. /**
  27. * Returns the agreement ID.
  28. *
  29. * @return int Agreement ID.
  30. */
  31. public function getAgreementId();
  32. /**
  33. * Sets the agreement ID.
  34. *
  35. * @param int $id
  36. * @return $this
  37. */
  38. public function setAgreementId($id);
  39. /**
  40. * Returns the agreement name.
  41. *
  42. * @return string Agreement name.
  43. */
  44. public function getName();
  45. /**
  46. * Sets the agreement name.
  47. *
  48. * @param string $name
  49. * @return $this
  50. */
  51. public function setName($name);
  52. /**
  53. * Returns the agreement content.
  54. *
  55. * @return string Agreement content.
  56. */
  57. public function getContent();
  58. /**
  59. * Sets the agreement content.
  60. *
  61. * @param string $content
  62. * @return $this
  63. */
  64. public function setContent($content);
  65. /**
  66. * Returns the agreement content height, which is an optional CSS property.
  67. *
  68. * @return string|null Agreement content height. Otherwise, null.
  69. */
  70. public function getContentHeight();
  71. /**
  72. * Sets the agreement content height, which is an optional CSS property.
  73. *
  74. * @param string|null $height
  75. * @return $this
  76. */
  77. public function setContentHeight($height);
  78. /**
  79. * Returns the agreement checkbox text.
  80. *
  81. * @return string Agreement checkbox text.
  82. */
  83. public function getCheckboxText();
  84. /**
  85. * Sets the agreement checkbox text.
  86. *
  87. * @param string $text
  88. * @return $this
  89. */
  90. public function setCheckboxText($text);
  91. /**
  92. * Returns the agreement status.
  93. *
  94. * @return bool Agreement status.
  95. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  96. */
  97. public function getIsActive();
  98. /**
  99. * Sets the agreement status.
  100. *
  101. * @param bool $status
  102. * @return $this
  103. */
  104. public function setIsActive($status);
  105. /**
  106. * Returns the agreement content type.
  107. *
  108. * @return bool * true - HTML.
  109. * * false - plain text.
  110. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  111. */
  112. public function getIsHtml();
  113. /**
  114. * Sets the agreement content type.
  115. * * true - HTML
  116. * * false - plain text
  117. *
  118. * @param bool $isHtml
  119. * @return $this
  120. */
  121. public function setIsHtml($isHtml);
  122. /**
  123. * Returns the agreement applied mode.
  124. *
  125. * @return int
  126. */
  127. public function getMode();
  128. /**
  129. * Sets the agreement applied mode.
  130. *
  131. * @param int $mode
  132. * @return $this
  133. */
  134. public function setMode($mode);
  135. /**
  136. * Retrieve existing extension attributes object or create a new one.
  137. *
  138. * @return \Magento\CheckoutAgreements\Api\Data\AgreementExtensionInterface|null
  139. */
  140. public function getExtensionAttributes();
  141. /**
  142. * Set an extension attributes object.
  143. *
  144. * @param \Magento\CheckoutAgreements\Api\Data\AgreementExtensionInterface $extensionAttributes
  145. * @return $this
  146. */
  147. public function setExtensionAttributes(
  148. \Magento\CheckoutAgreements\Api\Data\AgreementExtensionInterface $extensionAttributes
  149. );
  150. }