class Services::Application::WeatherByAddress

Weather by address

Application service that orchestrates a single use case:

  1. Geocodes the address (latitude, longitude, optional zipcode).

  2. Fetches in parallel: current weather, hourly forecast, daily forecast.

  3. Maps raw responses to domain objects via Acl (Anti-Corruption Layer).

  4. Returns a Result wrapping a WeatherAtLocation domain aggregate plus data-source metadata (cache vs API) for each adapter call.

Dependencies (injected)

Errors

Infrastructure adapter errors are translated to application-layer errors so the presentation layer never depends on infrastructure details (DIP):

Example

service = Services::Application::WeatherByAddress.new
result  = service.call("São Paulo, Brazil")
result.location.latitude               # => -23.55
result.current_weather.temperature_degrees  # => 25.3
result.from_cache?(:geocode)           # => false

Nested constants (defined in weather_by_address/)