from pyuspostalservice.endpoints.base.base_endpoint import USPSEndpoint
from pyuspostalservice.endpoints.usps.AddressesAddressEndpoint import AddressEndpoint
from pyuspostalservice.endpoints.usps.AddressesCityStateEndpoint import CityStateEndpoint
from pyuspostalservice.endpoints.usps.AddressesZIPcodeEndpoint import ZIPcodeEndpoint


class AddressesEndpoint(
    USPSEndpoint,
):
    def __init__(self, client, parent_endpoint=None) -> None:
        USPSEndpoint.__init__(self, client, "addresses/v3", parent_endpoint=parent_endpoint)
        self.address = self._register_child_endpoint(AddressEndpoint(client, parent_endpoint=self))
        self.city_state = self._register_child_endpoint(CityStateEndpoint(client, parent_endpoint=self))
        self.zipcode = self._register_child_endpoint(ZIPcodeEndpoint(client, parent_endpoint=self))
