Skip to content

Commit

Permalink
Add OfferedSolution and PublicTransportStop model
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-ioki committed Jun 3, 2024
1 parent 248c4ba commit 6b697ed
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 0 deletions.
43 changes: 43 additions & 0 deletions lib/ioki/model/operator/offered_solution.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# frozen_string_literal: true

module Ioki
module Model
module Operator
class OfferedSolution < Base
attribute :type,
on: :read,
type: :string

attribute :id,
on: :read,
type: :string

attribute :created_at,
on: :read,
type: :date_time

attribute :updated_at,
on: :read,
type: :date_time

attribute :bookable,
on: :read,
type: :boolean

attribute :solution_type,
on: :read,
type: :string

attribute :fare,
on: :read,
type: :object,
class_name: 'Fare'

attribute :hops,
on: :read,
type: :array,
class_name: 'Hop'
end
end
end
end
85 changes: 85 additions & 0 deletions lib/ioki/model/operator/public_transport_stop.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# frozen_string_literal: true

module Ioki
module Model
module Operator
class PublicTransportStop < Base
attribute :type,
on: :read,
type: :string

attribute :city,
type: :string,
on: :read

attribute :country,
type: :string,
on: :read

attribute :county,
type: :string,
on: :read

attribute :current_arrival,
type: :string,
on: :read

attribute :current_departure,
type: :string,
on: :read

attribute :current_platform,
type: :string,
on: :read

attribute :dhid,
type: :string,
on: :read

attribute :display_times,
type: :array,
on: :read

attribute :hafas_ext_id,
type: :array,
on: :read

attribute :lat,
type: :float,
on: :read

attribute :lng,
type: :float,
on: :read

attribute :location_name,
type: :array,
on: :read

attribute :postal_code,
type: :array,
on: :read

attribute :scheduled_arrival,
type: :string,
on: :read

attribute :scheduled_departure,
type: :string,
on: :read

attribute :scheduled_platform,
type: :string,
on: :read

attribute :street_name,
type: :string,
on: :read

attribute :street_number,
type: :string,
on: :read
end
end
end
end

0 comments on commit 6b697ed

Please sign in to comment.