TotalsInformationInterface.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Checkout\Api\Data;
  7. /**
  8. * Interface TotalsInformationInterface
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface TotalsInformationInterface extends \Magento\Framework\Api\CustomAttributesDataInterface
  13. {
  14. /**#@+
  15. * Constants defined for keys of array, makes typos less likely
  16. */
  17. const ADDRESS = 'address';
  18. const SHIPPING_METHOD_CODE = 'shipping_method_code';
  19. const SHIPPING_CARRIER_CODE = 'shipping_carrier_code';
  20. /**#@-*/
  21. /**
  22. * Returns address
  23. *
  24. * @return \Magento\Quote\Api\Data\AddressInterface
  25. */
  26. public function getAddress();
  27. /**
  28. * Set address
  29. *
  30. * @param \Magento\Quote\Api\Data\AddressInterface $address
  31. * @return $this
  32. */
  33. public function setAddress(\Magento\Quote\Api\Data\AddressInterface $address);
  34. /**
  35. * Returns shipping method code
  36. *
  37. * @return string|null
  38. */
  39. public function getShippingMethodCode();
  40. /**
  41. * Set shipping method code
  42. *
  43. * @param string $code
  44. * @return $this
  45. */
  46. public function setShippingMethodCode($code);
  47. /**
  48. * Returns carrier code
  49. *
  50. * @return string|null
  51. */
  52. public function getShippingCarrierCode();
  53. /**
  54. * Set carrier code
  55. *
  56. * @param string $code
  57. * @return $this
  58. */
  59. public function setShippingCarrierCode($code);
  60. /**
  61. * Retrieve existing extension attributes object or create a new one.
  62. *
  63. * @return \Magento\Checkout\Api\Data\TotalsInformationExtensionInterface|null
  64. */
  65. public function getExtensionAttributes();
  66. /**
  67. * Set an extension attributes object.
  68. *
  69. * @param \Magento\Checkout\Api\Data\TotalsInformationExtensionInterface $extensionAttributes
  70. * @return $this
  71. */
  72. public function setExtensionAttributes(
  73. \Magento\Checkout\Api\Data\TotalsInformationExtensionInterface $extensionAttributes
  74. );
  75. }