Module: Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Paths

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

Overview

Path helper methods for the DeliveryService API.

Instance Method Summary collapse

Instance Method Details

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

Create a fully-qualified DeliveryVehicle resource string.

The resource will be in the following format:

providers/{provider}/deliveryVehicles/{vehicle}

Parameters:

  • provider (String)
  • vehicle (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
# File 'lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb', line 39

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

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

#provider_path(provider:) ⇒ ::String

Create a fully-qualified Provider resource string.

The resource will be in the following format:

providers/{provider}

Parameters:

  • provider (String)

Returns:

  • (::String)


55
56
57
# File 'lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb', line 55

def provider_path provider:
  "providers/#{provider}"
end

#task_path(provider:, task:) ⇒ ::String

Create a fully-qualified Task resource string.

The resource will be in the following format:

providers/{provider}/tasks/{task}

Parameters:

  • provider (String)
  • task (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


70
71
72
73
74
# File 'lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb', line 70

def task_path provider:, task:
  raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/"

  "providers/#{provider}/tasks/#{task}"
end

#task_tracking_info_path(provider:, tracking:) ⇒ ::String

Create a fully-qualified TaskTrackingInfo resource string.

The resource will be in the following format:

providers/{provider}/taskTrackingInfo/{tracking}

Parameters:

  • provider (String)
  • tracking (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


87
88
89
90
91
# File 'lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb', line 87

def task_tracking_info_path provider:, tracking:
  raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/"

  "providers/#{provider}/taskTrackingInfo/#{tracking}"
end