ModuleConfigInterface.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Model\Config;
  6. /**
  7. * Temando Config Interface
  8. *
  9. * @package Temando\Shipping\Model
  10. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  11. * @author Sebastian Ertner <sebastian.ertner@netresearch.de>
  12. * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  13. * @link https://www.temando.com/
  14. */
  15. interface ModuleConfigInterface
  16. {
  17. /**
  18. * Check if shipping module is enabled in checkout.
  19. *
  20. * @param int $storeId
  21. *
  22. * @return bool
  23. */
  24. public function isEnabled($storeId = null);
  25. /**
  26. * Check if merchant registered an account at Temando.
  27. *
  28. * @return bool
  29. */
  30. public function isRegistered();
  31. /**
  32. * Obtain store information settings.
  33. *
  34. * @param int $storeId
  35. *
  36. * @return \Magento\Framework\DataObject
  37. */
  38. public function getStoreInformation($storeId = null);
  39. /**
  40. * Obtain shipping origin settings.
  41. *
  42. * @param int $storeId
  43. *
  44. * @return \Magento\Framework\DataObject
  45. */
  46. public function getShippingOrigin($storeId = null);
  47. /**
  48. * @param int $storeId
  49. *
  50. * @return string
  51. */
  52. public function getWeightUnit($storeId = null);
  53. /**
  54. * Obtain Register Account Url.
  55. *
  56. * @return string
  57. */
  58. public function getRegisterAccountUrl();
  59. /**
  60. * Obtain Shipping Portal Url.
  61. *
  62. * @return string
  63. */
  64. public function getShippingPortalUrl();
  65. /**
  66. * Check whether stream events as whole should be processed or not.
  67. *
  68. * @return bool
  69. */
  70. public function isSyncEnabled();
  71. /**
  72. * Save new stream event processing configuration.
  73. *
  74. * @param string $value
  75. */
  76. public function saveSyncEnabled($value);
  77. /**
  78. * Check whether shipment events should be processed or not.
  79. *
  80. * @return bool
  81. */
  82. public function isSyncShipmentEnabled();
  83. /**
  84. * Save new stream event processing configuration.
  85. *
  86. * @param string $value
  87. */
  88. public function saveSyncShipmentEnabled($value);
  89. /**
  90. * Check whether order events should be processed or not.
  91. *
  92. * @return bool
  93. */
  94. public function isSyncOrderEnabled();
  95. /**
  96. * Save new stream event processing configuration.
  97. *
  98. * @param string $value
  99. */
  100. public function saveSyncOrderEnabled($value);
  101. /**
  102. * Multiple streams may exists. Obtain the stream ID to request events from.
  103. *
  104. * @return string
  105. */
  106. public function getStreamId();
  107. /**
  108. * Obtain checkout fields definition.
  109. *
  110. * @return string
  111. */
  112. public function getCheckoutFieldsDefinition();
  113. /**
  114. * Save checkout fields definition.
  115. *
  116. * @param string $fieldsDefinition
  117. * @return void
  118. */
  119. public function saveCheckoutFieldsDefinition($fieldsDefinition);
  120. /**
  121. * Check if RMA feature is enabled.
  122. *
  123. * @return bool
  124. */
  125. public function isRmaEnabled();
  126. /**
  127. * Check if RMA module is installed.
  128. *
  129. * @return bool
  130. */
  131. public function isRmaAvailable();
  132. /**
  133. * Check if collection points feature is enabled in config.
  134. *
  135. * @param int $storeId
  136. *
  137. * @return bool
  138. */
  139. public function isCollectionPointsEnabled($storeId = null);
  140. /**
  141. * Obtain country codes enabled for collection point deliveries.
  142. *
  143. * @param int $storeId
  144. *
  145. * @return string[]
  146. */
  147. public function getCollectionPointDeliveryCountries($storeId = null);
  148. /**
  149. * Check if click and collect feature is enabled in config.
  150. *
  151. * @param int $storeId
  152. *
  153. * @return bool
  154. */
  155. public function isClickAndCollectEnabled($storeId = null);
  156. }