MessageInterface.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\GiftMessage\Api\Data;
  7. /**
  8. * Interface MessageInterface
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface MessageInterface 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 GIFT_MESSAGE_ID = 'gift_message_id';
  18. const CUSTOMER_ID = 'customer_id';
  19. const SENDER = 'sender';
  20. const RECIPIENT = 'recipient';
  21. const MESSAGE = 'message';
  22. /**#@-*/
  23. /**
  24. * Return the gift message ID.
  25. *
  26. * @return int|null Gift message ID. Otherwise, null.
  27. */
  28. public function getGiftMessageId();
  29. /**
  30. * Set the gift message ID.
  31. *
  32. * @param int|null $id
  33. * @return $this
  34. */
  35. public function setGiftMessageId($id);
  36. /**
  37. * Return the customer ID.
  38. *
  39. * @return int|null Customer ID. Otherwise, null.
  40. */
  41. public function getCustomerId();
  42. /**
  43. * Set the customer ID.
  44. *
  45. * @param int|null $id
  46. * @return $this
  47. */
  48. public function setCustomerId($id);
  49. /**
  50. * Return the sender name.
  51. *
  52. * @return string Sender name.
  53. */
  54. public function getSender();
  55. /**
  56. * Set the sender name.
  57. *
  58. * @param string $sender
  59. * @return $this
  60. */
  61. public function setSender($sender);
  62. /**
  63. * Return the recipient name.
  64. *
  65. * @return string Recipient name.
  66. */
  67. public function getRecipient();
  68. /**
  69. * Get the recipient name.
  70. *
  71. * @param string $recipient
  72. * @return $this
  73. */
  74. public function setRecipient($recipient);
  75. /**
  76. * Return the message text.
  77. *
  78. * @return string Message text.
  79. */
  80. public function getMessage();
  81. /**
  82. * Set the message text.
  83. *
  84. * @param string $message
  85. * @return $this
  86. */
  87. public function setMessage($message);
  88. /**
  89. * Retrieve existing extension attributes object or create a new one.
  90. *
  91. * @return \Magento\GiftMessage\Api\Data\MessageExtensionInterface|null
  92. */
  93. public function getExtensionAttributes();
  94. /**
  95. * Set an extension attributes object.
  96. *
  97. * @param \Magento\GiftMessage\Api\Data\MessageExtensionInterface $extensionAttributes
  98. * @return $this
  99. */
  100. public function setExtensionAttributes(
  101. \Magento\GiftMessage\Api\Data\MessageExtensionInterface $extensionAttributes
  102. );
  103. }