Module: Google::Maps::FleetEngine::V1::VehicleService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb

Overview

Path helper methods for the VehicleService API.

Instance Method Summary collapse

Instance Method Details

#vehicle_path(provider:, vehicle:) ⇒ ::String

Create a fully-qualified Vehicle resource string.

The resource will be in the following format:

providers/{provider}/vehicles/{vehicle}

Parameters:

  • provider (String)
  • vehicle (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


38
39
40
41
42
# File 'lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb', line 38

def vehicle_path provider:, vehicle:
  raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/"

  "providers/#{provider}/vehicles/#{vehicle}"
end