WsConfigInterface.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Webservice\Config;
  6. /**
  7. * Temando REST API Config Interface
  8. *
  9. * @package Temando\Shipping\Webservice
  10. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  11. * @author Sebastian Ertner <sebastian.ertner@netresearch.de>
  12. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  13. * @link http://www.temando.com/
  14. */
  15. interface WsConfigInterface
  16. {
  17. /**
  18. * Check if webservice communication logging is enabled.
  19. *
  20. * @return bool
  21. */
  22. public function isLoggingEnabled();
  23. /**
  24. * Read URL of Temando Authentication API.
  25. *
  26. * @return string
  27. */
  28. public function getSessionEndpoint();
  29. /**
  30. * Read URL of Temando REST API.
  31. *
  32. * @return string
  33. */
  34. public function getApiEndpoint();
  35. /**
  36. * Save URL of Temando REST API.
  37. *
  38. * @param string $apiEndpoint
  39. * @return void
  40. */
  41. public function saveApiEndpoint($apiEndpoint);
  42. /**
  43. * Obtain the API version to connect to.
  44. *
  45. * @return string
  46. */
  47. public function getApiVersion();
  48. /**
  49. * Read Temando Account Id.
  50. *
  51. * @return string
  52. */
  53. public function getAccountId();
  54. /**
  55. * Read Temando Authentication Token.
  56. *
  57. * @return string
  58. */
  59. public function getBearerToken();
  60. /**
  61. * Read Temando Authentication Token Expiry Timestamp.
  62. *
  63. * @return string
  64. */
  65. public function getBearerTokenExpiry();
  66. /**
  67. * Save new account data.
  68. *
  69. * @param string $accountId
  70. * @param string $bearerToken
  71. * @param string $bearerTokenExpiry
  72. * @return void
  73. */
  74. public function setAccount($accountId, $bearerToken, $bearerTokenExpiry);
  75. /**
  76. * Unset all account data.
  77. *
  78. * @return void
  79. */
  80. public function unsetAccount();
  81. }