CommentCreation.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sales\Model\Order\Invoice;
  7. use Magento\Sales\Api\Data\InvoiceCommentCreationInterface;
  8. /**
  9. * Class InvoiceCommentCreation
  10. */
  11. class CommentCreation implements InvoiceCommentCreationInterface
  12. {
  13. /**
  14. * @var string
  15. */
  16. private $comment;
  17. /**
  18. * @var int
  19. */
  20. private $isVisibleOnFront;
  21. /**
  22. * @var \Magento\Sales\Api\Data\InvoiceCommentCreationExtensionInterface
  23. */
  24. private $extensionAttributes;
  25. /**
  26. * Gets the comment for the invoice.
  27. *
  28. * @return string Comment.
  29. */
  30. public function getComment()
  31. {
  32. return $this->comment;
  33. }
  34. /**
  35. * Sets the comment for the invoice.
  36. *
  37. * @param string $comment
  38. * @return $this
  39. */
  40. public function setComment($comment)
  41. {
  42. $this->comment = $comment;
  43. return $this;
  44. }
  45. /**
  46. * Gets the is-visible-on-storefront flag value for the invoice.
  47. *
  48. * @return int Is-visible-on-storefront flag value.
  49. */
  50. public function getIsVisibleOnFront()
  51. {
  52. return $this->isVisibleOnFront;
  53. }
  54. /**
  55. * Sets the is-visible-on-storefront flag value for the invoice.
  56. *
  57. * @param int $isVisibleOnFront
  58. * @return $this
  59. */
  60. public function setIsVisibleOnFront($isVisibleOnFront)
  61. {
  62. $this->isVisibleOnFront = $isVisibleOnFront;
  63. return $this;
  64. }
  65. /**
  66. * Retrieve existing extension attributes object or create a new one.
  67. *
  68. * @return \Magento\Sales\Api\Data\InvoiceCommentCreationExtensionInterface|null
  69. */
  70. public function getExtensionAttributes()
  71. {
  72. return $this->extensionAttributes;
  73. }
  74. /**
  75. * Set an extension attributes object.
  76. *
  77. * @param \Magento\Sales\Api\Data\InvoiceCommentCreationExtensionInterface $extensionAttributes
  78. * @return $this
  79. */
  80. public function setExtensionAttributes(
  81. \Magento\Sales\Api\Data\InvoiceCommentCreationExtensionInterface $extensionAttributes
  82. ) {
  83. $this->extensionAttributes = $extensionAttributes;
  84. return $this;
  85. }
  86. }