<?php
namespace PortalPeople\DisabledPostcodes\Api;

interface DisabledPostcodeManagementInterface
{
    /**
     * Check if postcode is excluded for the current store scope.
     *
     * @param string $postcode
     * @param int|null $storeId
     * @return array
     */
    public function checkPostcode(string $postcode, ?int $storeId = null): array;

    /**
     * @param int|null $storeId
     * @return array
     */
    public function getList(?int $storeId = null): array;

    /**
     * @param int $id
     * @return array
     */
    public function getById(int $id): array;

    /**
     * @param string $postcode
     * @param string $matchType
     * @param int $storeId
     * @param string|null $description
     * @param bool $isActive
     * @return array
     */
    public function create(
        string $postcode,
        string $matchType = 'area',
        int $storeId = 0,
        ?string $description = null,
        bool $isActive = true
    ): array;

    /**
     * @param int $id
     * @param string $postcode
     * @param string $matchType
     * @param int $storeId
     * @param string|null $description
     * @param bool $isActive
     * @return array
     */
    public function update(
        int $id,
        string $postcode,
        string $matchType = 'area',
        int $storeId = 0,
        ?string $description = null,
        bool $isActive = true
    ): array;

    /**
     * @param int $id
     * @return bool
     */
    public function delete(int $id): bool;
}
