ShipmentStatusInterface.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Api\Shipment;
  6. /**
  7. * Shipment Status Interface.
  8. *
  9. * A shipment status represents the current progress of booking a label with
  10. * a carrier through the Temando platform. To avoid collisions, all Temando
  11. * shipment status codes are prefixed with 4006.
  12. *
  13. * @api
  14. * @package Temando\Shipping\Api
  15. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  16. * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  17. * @link https://www.temando.com/
  18. */
  19. interface ShipmentStatusInterface
  20. {
  21. const STATUS_PENDING = 40060100;
  22. const STATUS_FULFILLED = 40060200;
  23. const STATUS_CANCELLED = 40060300;
  24. const STATUS_COMPLETING = 40060400;
  25. const STATUS_COMPLETED = 40060450;
  26. const STATUS_ERROR = 40060500;
  27. /**
  28. * Obtain human readable representation of shipment status.
  29. *
  30. * @param int $statusCode
  31. * @return string
  32. */
  33. public function getStatusText(int $statusCode): string;
  34. /**
  35. * Obtain numeric representation of shipment status.
  36. *
  37. * @param string $status
  38. * @return int
  39. */
  40. public function getStatusCode(string $status): int;
  41. }