TotalSegmentInterface.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Quote\Api\Data;
  7. /**
  8. * Interface TotalsInterface
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface TotalSegmentInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  13. {
  14. /**#@+
  15. * Constants defined for keys of array, makes typos less likely
  16. */
  17. const CODE = 'code';
  18. const TITLE = 'title';
  19. const VALUE = 'value';
  20. const AREA = 'area';
  21. /**#@-*/
  22. /**
  23. * Total code
  24. *
  25. * @return string
  26. */
  27. public function getCode();
  28. /**
  29. * Set total code
  30. *
  31. * @param string $code
  32. * @return $this
  33. */
  34. public function setCode($code);
  35. /**
  36. * Get total title
  37. *
  38. * @return string|null
  39. */
  40. public function getTitle();
  41. /**
  42. * Set total title
  43. *
  44. * @param string|null $title
  45. * @return $this
  46. */
  47. public function setTitle($title = null);
  48. /**
  49. * Get total value
  50. *
  51. * @return float
  52. */
  53. public function getValue();
  54. /**
  55. * Set total value
  56. *
  57. * @param float $value
  58. * @return $this
  59. */
  60. public function setValue($value);
  61. /**
  62. * Get display area code.
  63. *
  64. * @return string|null
  65. */
  66. public function getArea();
  67. /**
  68. * Set display area code
  69. *
  70. * @param string|null $area
  71. * @return $this
  72. */
  73. public function setArea($area = null);
  74. /**
  75. * Retrieve existing extension attributes object or create a new one.
  76. *
  77. * @return \Magento\Quote\Api\Data\TotalSegmentExtensionInterface|null
  78. */
  79. public function getExtensionAttributes();
  80. /**
  81. * Set an extension attributes object.
  82. *
  83. * @param \Magento\Quote\Api\Data\TotalSegmentExtensionInterface $extensionAttributes
  84. * @return $this
  85. */
  86. public function setExtensionAttributes(
  87. \Magento\Quote\Api\Data\TotalSegmentExtensionInterface $extensionAttributes
  88. );
  89. }