BillingAddressManagementInterface.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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. * Interface BillingAddressManagementInterface
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface BillingAddressManagementInterface
  13. {
  14. /**
  15. * Assigns a specified billing address to a specified cart.
  16. *
  17. * @param int $cartId The cart ID.
  18. * @param \Magento\Quote\Api\Data\AddressInterface $address Billing address data.
  19. * @param bool $useForShipping
  20. * @return int Address ID.
  21. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
  22. * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid.
  23. */
  24. public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $address, $useForShipping = false);
  25. /**
  26. * Returns the billing address for a specified quote.
  27. *
  28. * @param int $cartId The cart ID.
  29. * @return \Magento\Quote\Api\Data\AddressInterface Quote billing address object.
  30. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
  31. */
  32. public function get($cartId);
  33. }