Class: Ldbws::Request::GetDeparturesBoard
- Defined in:
- lib/ldbws/request/get_departures_board.rb
Overview
Requests a departure board for a station, filtered by departures to one or many other stations. Corresponds to GetDeparturesBoardRequest in the LDBWS schema.
Parameters
- crs
-
the CRS code of the station you wish to get departures for (required).
- filter_list
-
a list of CRS codes to filter departures (required).
- time_offset
-
the offset from the current time—in minutes—to return departure information (optional).
- time_window
-
how far into the future—relative to
:time_offset—to return service information for (optional).
Direct Known Subclasses
Constant Summary collapse
- SCHEMA =
:nodoc:
Dry::Schema.Params do required(:crs).filled(Types::Crs) required(:filter_list).array(Types::Crs, min_size?: 1) optional(:time_offset).filled(:integer) optional(:time_window).filled(:integer) end
- RESULT_XPATH =
:nodoc:
"DeparturesBoard"- RESULT_TYPE =
:nodoc:
Ldbws::ResponseTypes::DeparturesBoard
Instance Method Summary collapse
-
#to_soap_params ⇒ Object
:nodoc:.
Methods inherited from Base
#from_soap, #initialize, #to_soap
Constructor Details
This class inherits a constructor from Ldbws::Request::Base
Instance Method Details
#to_soap_params ⇒ Object
:nodoc:
30 31 32 33 34 35 36 37 |
# File 'lib/ldbws/request/get_departures_board.rb', line 30 def to_soap_params @params.tap do |params| params[:crs].upcase! params[:filter_list].map! do |value| { crs: value.upcase } end end end |