Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingSummary
- Inherits:
-
Object
- Object
- Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingSummary
- 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
-
#legs ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingSummaryLeg>
The legs of the trip.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleMapsPlacesV1RoutingSummary
constructor
A new instance of GoogleMapsPlacesV1RoutingSummary.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleMapsPlacesV1RoutingSummary
Returns a new instance of GoogleMapsPlacesV1RoutingSummary.
2168 2169 2170 |
# File 'lib/google/apis/places_v1/classes.rb', line 2168 def initialize(**args) update!(**args) end |
Instance Attribute Details
#legs ⇒ Array<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
2166 2167 2168 |
# File 'lib/google/apis/places_v1/classes.rb', line 2166 def legs @legs end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2173 2174 2175 |
# File 'lib/google/apis/places_v1/classes.rb', line 2173 def update!(**args) @legs = args[:legs] if args.key?(:legs) end |