123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Framework\Pricing\Adjustment;
- use Magento\Framework\Pricing\SaleableInterface;
- /**
- * Interface AdjustmentInterface
- *
- * @api
- * @since 100.0.2
- */
- interface AdjustmentInterface
- {
- /**
- * Get adjustment code
- * (as declared in DI configuration)
- *
- * @return string
- */
- public function getAdjustmentCode();
- /**
- * Define if adjustment is included in base price
- *
- * @return bool
- */
- public function isIncludedInBasePrice();
- /**
- * Define if adjustment is included in display price
- *
- * @return bool
- */
- public function isIncludedInDisplayPrice();
- /**
- * Extract adjustment amount from the given amount value
- *
- * @param float $amount
- * @param SaleableInterface $saleableItem
- * @param null|array $context
- * @return float
- */
- public function extractAdjustment($amount, SaleableInterface $saleableItem, $context = []);
- /**
- * Apply adjustment amount and return result value
- *
- * @param float $amount
- * @param SaleableInterface $saleableItem
- * @param null|array $context
- * @return float
- */
- public function applyAdjustment($amount, SaleableInterface $saleableItem, $context = []);
- /**
- * Check if adjustment should be excluded from calculations along with the given adjustment
- *
- * @param string $adjustmentCode
- * @return bool
- */
- public function isExcludedWith($adjustmentCode);
- /**
- * Return sort order position
- *
- * @return int
- */
- public function getSortOrder();
- }
|