CartTotalManagementInterface.php 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Quote\Api;
  7. /**
  8. * Bundled API to collect totals for cart based on shipping/payment methods and additional data.
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface CartTotalManagementInterface
  13. {
  14. /**
  15. * Set shipping/billing methods and additional data for cart and collect totals.
  16. *
  17. * @param int $cartId The cart ID.
  18. * @param \Magento\Quote\Api\Data\PaymentInterface Payment method data.
  19. * @param string $shippingCarrierCode The carrier code.
  20. * @param string $shippingMethodCode The shipping method code.
  21. * @param \Magento\Quote\Api\Data\TotalsAdditionalDataInterface $additionalData Additional data to collect totals.
  22. * @return \Magento\Quote\Api\Data\TotalsInterface Quote totals data.
  23. */
  24. public function collectTotals(
  25. $cartId,
  26. \Magento\Quote\Api\Data\PaymentInterface $paymentMethod,
  27. $shippingCarrierCode = null,
  28. $shippingMethodCode = null,
  29. \Magento\Quote\Api\Data\TotalsAdditionalDataInterface $additionalData = null
  30. );
  31. }