struct

Google::Maps::RouteOptimization::SkippedShipment::Reason

Inherits MessagePack::Serializable < JSON::Serializable < Google::Resource < Struct < Value < Object

If we can explain why the shipment was skipped, reasons will be listed here. If the reason is not the same for all vehicles, reason will have more than 1 element. A skipped shipment cannot have duplicate reasons, i.e. where all fields are the same except for exampleVehicleIndex. Example:

SkippedShipment(
  @reasons=[
    Reason(
      @code=DEMAND_EXCEEDS_VEHICLE_CAPACITY
      @example_vehicle_index=1
      @example_exceeded_capacity_type="Apples"
    ),
  ]
)

The skipped shipment is incompatible with all vehicles. The reasons may be different for all vehicles but at least one vehicle's "Apples" capacity would be exceeded (including vehicle 1), at least one vehicle's "Pears" capacity would be exceeded (including vehicle 3) and at least one vehicle's distance limit would be exceeded (including vehicle 1).

Constructors

new(pull : JSON::PullParser)
new(*, __pull_for_json_serializable pull : JSON::PullParser)

Instance methods

code

Code identifying the reason type

example_exceeded_capacity_type

If the reason code is DEMAND_EXCEEDS_VEHICLE_CAPACITY, documents one capacity type that is exceeded

example_vehicle_index

If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle

Nested types