diff --git a/apps/api_web/lib/api_web/controllers/prediction_controller.ex b/apps/api_web/lib/api_web/controllers/prediction_controller.ex index b2f055be..60db84f9 100644 --- a/apps/api_web/lib/api_web/controllers/prediction_controller.ex +++ b/apps/api_web/lib/api_web/controllers/prediction_controller.ex @@ -312,6 +312,17 @@ defmodule ApiWeb.PredictionController do ) status(:string, "Status of the schedule", example: "Approaching") + + revenue_status( + :string, + """ + | Value | Description | + |-----------------|-------------| + | `"REVENUE"` | Indicates that the associated trip is accepting passengers. | + | `"NON_REVENUE"` | Indicates that the associated trip is not accepting passengers. | + """, + example: "REVENUE" + ) end direction_id_attribute() diff --git a/apps/api_web/lib/api_web/controllers/trip_controller.ex b/apps/api_web/lib/api_web/controllers/trip_controller.ex index 55b7ccf1..9fa12731 100644 --- a/apps/api_web/lib/api_web/controllers/trip_controller.ex +++ b/apps/api_web/lib/api_web/controllers/trip_controller.ex @@ -247,6 +247,17 @@ defmodule ApiWeb.TripController do """, example: 1 ) + + revenue_status( + :string, + """ + | Value | Description | + |-----------------|-------------| + | `"REVENUE"` | Indicates that the associated trip is accepting passengers. | + | `"NON_REVENUE"` | Indicates that the associated trip is not accepting passengers. | + """, + example: "REVENUE" + ) end direction_id_attribute() diff --git a/apps/api_web/lib/api_web/controllers/vehicle_controller.ex b/apps/api_web/lib/api_web/controllers/vehicle_controller.ex index 7f15f9c8..3f180d57 100644 --- a/apps/api_web/lib/api_web/controllers/vehicle_controller.ex +++ b/apps/api_web/lib/api_web/controllers/vehicle_controller.ex @@ -271,6 +271,17 @@ defmodule ApiWeb.VehicleController do } ] ) + + revenue_status( + :string, + """ + | Value | Description | + |-----------------|-------------| + | `"REVENUE"` | Indicates that the associated trip is accepting passengers. | + | `"NON_REVENUE"` | Indicates that the associated trip is not accepting passengers. | + """, + example: "REVENUE" + ) end direction_id_attribute() diff --git a/apps/api_web/test/api_web/controllers/vehicle_controller_test.exs b/apps/api_web/test/api_web/controllers/vehicle_controller_test.exs index ca1d2a37..ce79796b 100644 --- a/apps/api_web/test/api_web/controllers/vehicle_controller_test.exs +++ b/apps/api_web/test/api_web/controllers/vehicle_controller_test.exs @@ -341,7 +341,8 @@ defmodule ApiWeb.VehicleControllerTest do "current_stop_sequence" => nil, "updated_at" => nil, "occupancy_status" => nil, - "carriages" => [] + "carriages" => [], + "revenue" => "REVENUE" } } end