FulfillmentApiInterface.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Rest\Adapter;
  6. use Temando\Shipping\Rest\Exception\AdapterException;
  7. use Temando\Shipping\Rest\Request\FulfillmentRequestInterface;
  8. use Temando\Shipping\Rest\Request\ItemRequestInterface;
  9. use Temando\Shipping\Rest\Request\ListRequestInterface;
  10. use Temando\Shipping\Rest\Response\DataObject\Fulfillment;
  11. /**
  12. * The Temando Fulfillment API interface defines the supported subset of operations
  13. * as available at the Temando API.
  14. *
  15. * @package Temando\Shipping\Rest
  16. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  17. * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  18. * @link https://www.temando.com/
  19. */
  20. interface FulfillmentApiInterface
  21. {
  22. /**
  23. * @param ItemRequestInterface $request
  24. *
  25. * @return Fulfillment
  26. * @throws AdapterException
  27. */
  28. public function getFulfillment(ItemRequestInterface $request);
  29. /**
  30. * @param ListRequestInterface $request
  31. *
  32. * @return Fulfillment[]
  33. * @throws AdapterException
  34. */
  35. public function getFulfillments(ListRequestInterface $request);
  36. /**
  37. * Create fulfillment at the platform.
  38. *
  39. * @param FulfillmentRequestInterface $request
  40. *
  41. * @return Fulfillment
  42. * @throws AdapterException
  43. */
  44. public function createFulfillment(FulfillmentRequestInterface $request);
  45. /**
  46. * Update fulfillment at the platform.
  47. *
  48. * @param FulfillmentRequestInterface $request
  49. *
  50. * @return Fulfillment
  51. * @throws AdapterException
  52. */
  53. public function updateFulfillment(FulfillmentRequestInterface $request);
  54. }