AddressRepositoryInterface.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Model\ResourceModel\Repository;
  6. /**
  7. * Temando Checkout Address Repository Interface.
  8. *
  9. * A checkout address entity is an extension to the quote shipping address. It
  10. * holds additional data needed for rates processing and order manifestation.
  11. *
  12. * This public interface can be used to retrieve and write additional address
  13. * data as collected during checkout.
  14. *
  15. * @package Temando\Shipping\Model
  16. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  17. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  18. * @link http://www.temando.com/
  19. */
  20. interface AddressRepositoryInterface
  21. {
  22. /**
  23. * Load address by entity id.
  24. *
  25. * @param string $addressId
  26. * @return \Temando\Shipping\Api\Data\Checkout\AddressInterface
  27. * @throws \Magento\Framework\Exception\NoSuchEntityException
  28. */
  29. public function getById($addressId);
  30. /**
  31. * Load address by quote address id.
  32. *
  33. * @param string $quoteAddressId
  34. * @return \Temando\Shipping\Api\Data\Checkout\AddressInterface
  35. * @throws \Magento\Framework\Exception\NoSuchEntityException
  36. */
  37. public function getByQuoteAddressId($quoteAddressId);
  38. /**
  39. * Save address.
  40. *
  41. * @param \Temando\Shipping\Api\Data\Checkout\AddressInterface $address
  42. * @return \Temando\Shipping\Api\Data\Checkout\AddressInterface
  43. * @throws \Magento\Framework\Exception\CouldNotSaveException
  44. */
  45. public function save(\Temando\Shipping\Api\Data\Checkout\AddressInterface $address);
  46. /**
  47. * Delete by quote address id.
  48. *
  49. * @param string $addressId
  50. * @return bool true on success
  51. * @throws \Magento\Framework\Exception\CouldNotDeleteException
  52. */
  53. public function deleteByShippingAddressId($addressId);
  54. /**
  55. * Delete entity.
  56. *
  57. * @param \Temando\Shipping\Api\Data\Checkout\AddressInterface $address
  58. * @return bool true on success
  59. * @throws \Magento\Framework\Exception\CouldNotDeleteException
  60. */
  61. public function delete(\Temando\Shipping\Api\Data\Checkout\AddressInterface $address);
  62. }