OrderApiInterface.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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\OrderRequest;
  8. use Temando\Shipping\Rest\Response\Document\SaveOrderInterface;
  9. /**
  10. * The Temando Order API interface defines the supported subset of operations
  11. * as available at the Temando API.
  12. *
  13. * @package Temando\Shipping\Rest
  14. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  15. * @author Sebastian Ertner <sebastian.ertner@netresearch.de>
  16. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  17. * @link http://www.temando.com/
  18. */
  19. interface OrderApiInterface
  20. {
  21. const ACTION_CREATE = 'create';
  22. const ACTION_ALLOCATE_PICKUP = 'allocate';
  23. const ACTION_ALLOCATE_SHIPMENT = 'allocate';
  24. const ACTION_UPDATE = 'update';
  25. /**
  26. * Create order.
  27. *
  28. * @param OrderRequest $request
  29. * @return SaveOrderInterface
  30. * @throws AdapterException
  31. */
  32. public function createOrder(OrderRequest $request);
  33. /**
  34. * Update order.
  35. *
  36. * @param OrderRequest $request
  37. * @return SaveOrderInterface
  38. * @throws AdapterException
  39. */
  40. public function updateOrder(OrderRequest $request);
  41. }