class Gdsapi::Methods::GetAvailableTrips

Private Instance Methods

parse(body) click to toggle source

Parsing routine to be executed while performing action Actually, does nothing @param [Array] body - parsed JSON payload from GDS @return [Array] set of available dates for given trip

# File lib/gdsapi/methods/get_available_trips.rb, line 12
def parse(body)
  body
end
path() click to toggle source
# File lib/gdsapi/methods/get_available_trips.rb, line 16
def path
  'available_trips'
end
permitted_params() click to toggle source

Query params :arrival [String] - GDS arrival point id (required) :departure [String] - GDS departure point id (required) :tickets [Number] - number of tickets for trip (required) :mode [Number] - transport type (optional, buses are: 1,8) :dates [String] - dates for trip (required, format: yyyy-mm-dd, delimiter: ';') :return_only_branded [Boolean] - returns data only for branded trips if true

# File lib/gdsapi/methods/get_available_trips.rb, line 27
def permitted_params
  %i(arrival departure tickets mode dates return_only_branded)
end