GrandTotalDetails.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Tax\Model\Calculation;
  7. use Magento\Tax\Api\Data\GrandTotalDetailsInterface;
  8. use Magento\Framework\Api\AbstractSimpleObject;
  9. /**
  10. * Grand Total Tax Details Model
  11. */
  12. class GrandTotalDetails extends AbstractSimpleObject implements GrandTotalDetailsInterface
  13. {
  14. /**#@+
  15. * Constants defined for keys of array, makes typos less likely
  16. */
  17. const AMOUNT = 'amount';
  18. const RATES = 'rates';
  19. const GROUP_ID = 'group_id';
  20. /**#@-*/
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function getGroupId()
  25. {
  26. return $this->_get(self::GROUP_ID);
  27. }
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public function setGroupId($id)
  32. {
  33. return $this->setData(self::GROUP_ID, $id);
  34. }
  35. /**
  36. * {@inheritdoc}
  37. */
  38. public function getAmount()
  39. {
  40. return $this->_get(self::AMOUNT);
  41. }
  42. /**
  43. * {@inheritdoc}
  44. */
  45. public function setAmount($amount)
  46. {
  47. return $this->setData(self::AMOUNT, $amount);
  48. }
  49. /**
  50. * {@inheritdoc}
  51. */
  52. public function getRates()
  53. {
  54. return $this->_get(self::RATES);
  55. }
  56. /**
  57. * {@inheritdoc}
  58. */
  59. public function setRates($rates)
  60. {
  61. return $this->setData(self::RATES, $rates);
  62. }
  63. }