<?php
namespace PortalPeople\GetAddressAutocomplete\Api;

interface AddressAutocompleteInterface
{
    /**
     * Search for addresses by postcode or text
     *
     * @param string $searchTerm
     * @return array
     */
    public function searchAddresses($searchTerm);

    /**
     * Get complete address details
     *
     * @param string $addressId
     * @return array
     */
    public function getAddressDetails($addressId);

    /**
     * Validate and save address to quote
     *
     * @param string $postcode
     * @param int $udprn
     * @param string $organisation
     * @param string $building
     * @param string $street
     * @param string $city
     * @param string $county
     * @return bool
     */
    public function saveAddress($postcode, $udprn, $organisation = '', $building = '', $street = '', $city = '', $county = '');
}
