ModuleConfigInterface.php 3.81 KB
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
<?php
/**
 * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
 */

namespace Temando\Shipping\Model\Config;

/**
 * Temando Config Interface
 *
 * @package Temando\Shipping\Model
 * @author  Christoph Aßmann <christoph.assmann@netresearch.de>
 * @author  Sebastian Ertner <sebastian.ertner@netresearch.de>
 * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 * @link    https://www.temando.com/
 */
interface ModuleConfigInterface
{
    /**
     * Check if shipping module is enabled in checkout.
     *
     * @param int $storeId
     *
     * @return bool
     */
    public function isEnabled($storeId = null);

    /**
     * Check if merchant registered an account at Temando.
     *
     * @return bool
     */
    public function isRegistered();

    /**
     * Obtain store information settings.
     *
     * @param int $storeId
     *
     * @return \Magento\Framework\DataObject
     */
    public function getStoreInformation($storeId = null);

    /**
     * Obtain shipping origin settings.
     *
     * @param int $storeId
     *
     * @return \Magento\Framework\DataObject
     */
    public function getShippingOrigin($storeId = null);

    /**
     * @param int $storeId
     *
     * @return string
     */
    public function getWeightUnit($storeId = null);

    /**
     * Obtain Register Account Url.
     *
     * @return string
     */
    public function getRegisterAccountUrl();

    /**
     * Obtain Shipping Portal Url.
     *
     * @return string
     */
    public function getShippingPortalUrl();

    /**
     * Check whether stream events as whole should be processed or not.
     *
     * @return bool
     */
    public function isSyncEnabled();

    /**
     * Save new stream event processing configuration.
     *
     * @param string $value
     */
    public function saveSyncEnabled($value);

    /**
     * Check whether shipment events should be processed or not.
     *
     * @return bool
     */
    public function isSyncShipmentEnabled();

    /**
     * Save new stream event processing configuration.
     *
     * @param string $value
     */
    public function saveSyncShipmentEnabled($value);

    /**
     * Check whether order events should be processed or not.
     *
     * @return bool
     */
    public function isSyncOrderEnabled();

    /**
     * Save new stream event processing configuration.
     *
     * @param string $value
     */
    public function saveSyncOrderEnabled($value);

    /**
     * Multiple streams may exists. Obtain the stream ID to request events from.
     *
     * @return string
     */
    public function getStreamId();

    /**
     * Obtain checkout fields definition.
     *
     * @return string
     */
    public function getCheckoutFieldsDefinition();

    /**
     * Save checkout fields definition.
     *
     * @param string $fieldsDefinition
     * @return void
     */
    public function saveCheckoutFieldsDefinition($fieldsDefinition);

    /**
     * Check if RMA feature is enabled.
     *
     * @return bool
     */
    public function isRmaEnabled();

    /**
     * Check if RMA module is installed.
     *
     * @return bool
     */
    public function isRmaAvailable();

    /**
     * Check if collection points feature is enabled in config.
     *
     * @param int $storeId
     *
     * @return bool
     */
    public function isCollectionPointsEnabled($storeId = null);

    /**
     * Obtain country codes enabled for collection point deliveries.
     *
     * @param int $storeId
     *
     * @return string[]
     */
    public function getCollectionPointDeliveryCountries($storeId = null);

    /**
     * Check if click and collect feature is enabled in config.
     *
     * @param int $storeId
     *
     * @return bool
     */
    public function isClickAndCollectEnabled($storeId = null);
}