WeeeAdjustmentAttribute.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Weee\Model\ProductRender;
  7. use Magento\Weee\Api\Data\ProductRender\WeeeAdjustmentAttributeInterface;
  8. /**
  9. * Price interface.
  10. * @api
  11. * @since 100.2.0
  12. */
  13. class WeeeAdjustmentAttribute extends \Magento\Framework\Model\AbstractExtensibleModel implements
  14. WeeeAdjustmentAttributeInterface
  15. {
  16. /**
  17. * @inheritdoc
  18. * @since 100.2.0
  19. */
  20. public function setAttributeCode($attributeCode)
  21. {
  22. $this->setData('attribute_code', $attributeCode);
  23. }
  24. /**
  25. * @inheritdoc
  26. * @since 100.2.0
  27. */
  28. public function getAttributeCode()
  29. {
  30. return $this->getData('attribute_code');
  31. }
  32. /**
  33. * @inheritdoc
  34. * @since 100.2.0
  35. */
  36. public function setAmount($amount)
  37. {
  38. $this->setData('amount', $amount);
  39. }
  40. /**
  41. * @inheritdoc
  42. * @since 100.2.0
  43. */
  44. public function getAmount()
  45. {
  46. return $this->getData('amount');
  47. }
  48. /**
  49. * @inheritdoc
  50. * @since 100.2.0
  51. */
  52. public function getTaxAmount()
  53. {
  54. return $this->getData('tax_amount');
  55. }
  56. /**
  57. * @inheritdoc
  58. * @since 100.2.0
  59. */
  60. public function setTaxAmount($taxAmount)
  61. {
  62. $this->setData('tax_amount', $taxAmount);
  63. }
  64. /**
  65. * @inheritdoc
  66. * @since 100.2.0
  67. */
  68. public function setAmountExclTax($amountExclTax)
  69. {
  70. $this->setData('amount_excl_tax', $amountExclTax);
  71. }
  72. /**
  73. * @inheritdoc
  74. * @since 100.2.0
  75. */
  76. public function getAmountExclTax()
  77. {
  78. return $this->getData('amount_excl_tax');
  79. }
  80. /**
  81. * @inheritdoc
  82. * @since 100.2.0
  83. */
  84. public function setTaxAmountInclTax($amountInclTax)
  85. {
  86. $this->setData('tax_amount_incl_tax', $amountInclTax);
  87. }
  88. /**
  89. * @inheritdoc
  90. * @since 100.2.0
  91. */
  92. public function getTaxAmountInclTax()
  93. {
  94. return $this->getData('tax_amount_incl_tax');
  95. }
  96. /**
  97. * @inheritdoc
  98. * @since 100.2.0
  99. */
  100. public function getExtensionAttributes()
  101. {
  102. $extensionAttributes = $this->_getExtensionAttributes();
  103. if (!$extensionAttributes) {
  104. return $this->extensionAttributesFactory->create(WeeeAdjustmentAttributeInterface::class);
  105. }
  106. return $extensionAttributes;
  107. }
  108. /**
  109. * @inheritdoc
  110. * @since 100.2.0
  111. */
  112. public function setExtensionAttributes(
  113. \Magento\Weee\Api\Data\ProductRender\WeeeAdjustmentAttributeExtensionInterface $extensionAttributes
  114. ) {
  115. $this->_setExtensionAttributes($extensionAttributes);
  116. }
  117. }