Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingSummary

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/places_v1/classes.rb,
lib/google/apis/places_v1/representations.rb,
lib/google/apis/places_v1/representations.rb

Overview

The duration and distance from the routing origin to a place in the response, and a second leg from that place to the destination, if requested. Note: Adding routingSummaries in the field mask without also including either the routingParameters.origin parameter or the searchAlongRouteParameters. polyline.encodedPolyline parameter in the request causes an error.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleMapsPlacesV1RoutingSummary

Returns a new instance of GoogleMapsPlacesV1RoutingSummary.



2307
2308
2309
# File 'lib/google/apis/places_v1/classes.rb', line 2307

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#legsArray<Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingSummaryLeg>

The legs of the trip. When you calculate travel duration and distance from a set origin, legs contains a single leg containing the duration and distance from the origin to the destination. When you do a search along route, legs contains two legs: one from the origin to place, and one from the place to the destination. Corresponds to the JSON property legs



2305
2306
2307
# File 'lib/google/apis/places_v1/classes.rb', line 2305

def legs
  @legs
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2312
2313
2314
# File 'lib/google/apis/places_v1/classes.rb', line 2312

def update!(**args)
  @legs = args[:legs] if args.key?(:legs)
end