Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/ioki/model/webhooks/admin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Ioki
module Model
module Webhooks
class Admin < Base
attribute :locale, type: :string, on: [:create, :read, :update]
attribute :type, type: :string
attribute :id, type: :string
attribute :created_at, type: :date_time
Expand Down
2 changes: 2 additions & 0 deletions lib/ioki/model/webhooks/cancellation_statement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ module Ioki
module Model
module Webhooks
class CancellationStatement < Base
attribute :suitable_for_single_rides, type: :boolean, on: [:create, :read, :update]
attribute :suitable_for_ride_series, type: :boolean, on: [:create, :read, :update]
attribute :type, type: :string
attribute :id, type: :string
attribute :created_at, type: :date_time
Expand Down
7 changes: 7 additions & 0 deletions lib/ioki/model/webhooks/nested_vehicle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ module Ioki
module Model
module Webhooks
class NestedVehicle < Base
attribute :wheelchair_bays, type: :integer, on: [:create, :read, :update]
attribute :walker_bays, type: :integer, on: [:create, :read, :update]
attribute :storage_spaces, type: :integer, on: [:create, :read, :update]
attribute :phone_number, type: :string, on: [:create, :read, :update]
attribute :external_id, type: :string, on: [:create, :read, :update]
attribute :description, type: :string, on: [:create, :read, :update]
attribute :autonomous, type: :boolean, on: [:create, :read, :update]
attribute :type, type: :string
attribute :id, type: :string
attribute :created_at, type: :date_time
Expand Down
2 changes: 2 additions & 0 deletions lib/ioki/model/webhooks/personal_discount.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ module Ioki
module Model
module Webhooks
class PersonalDiscount < Base
attribute :fixed_price_per_ride, type: :object, on: [:create, :read, :update], class_name: 'Money'
attribute :fixed_price_per_passenger, type: :object, on: [:create, :read, :update], class_name: 'Money'
attribute :type, type: :string
attribute :id, type: :string
attribute :created_at, type: :date_time
Expand Down
1 change: 1 addition & 0 deletions lib/ioki/model/webhooks/place.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Ioki
module Model
module Webhooks
class Place < Base
attribute :version, type: :integer, on: [:create, :read, :update]
attribute :type, type: :string
attribute :id, type: :string
attribute :created_at, type: :date_time
Expand Down
5 changes: 4 additions & 1 deletion lib/ioki/model/webhooks/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ module Ioki
module Model
module Webhooks
class Product < Base
attribute :product_ride_options, type: :array, on: [:create, :read, :update]
attribute :passenger_types, type: :array, on: [:create, :read, :update]
attribute :passenger_options, type: :array, on: [:create, :read, :update]
attribute :type, type: :string
attribute :id, type: :string
attribute :created_at, type: :date_time
Expand All @@ -12,7 +15,7 @@ class Product < Base
attribute :description, type: :string
attribute :name, type: :string
attribute :provider_id, type: :string
attribute :ride_options, type: :object
deprecated_attribute :ride_options, type: :object
attribute :service_time_info, type: :string
attribute :bounding_box, type: :object, class_name: 'BoundingBox'
end
Expand Down
13 changes: 7 additions & 6 deletions lib/ioki/model/webhooks/rating.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ module Ioki
module Model
module Webhooks
class Rating < Base
attribute :rating_line_items, type: :array, on: [:create, :read, :update]
attribute :type, type: :string
attribute :id, type: :string
attribute :created_at, type: :date_time
attribute :updated_at, type: :date_time
attribute :version, type: :integer
attribute :comment, type: :string
attribute :driver_rating, type: :integer
deprecated_attribute :driver_rating, type: :integer
attribute :editable, type: :boolean
attribute :punctuality_rating, type: :integer
attribute :ride_rating, type: :integer
attribute :service_rating, type: :integer
attribute :vehicle_rating, type: :integer
attribute :waiting_time_rating, type: :integer
deprecated_attribute :punctuality_rating, type: :integer
deprecated_attribute :ride_rating, type: :integer
deprecated_attribute :service_rating, type: :integer
deprecated_attribute :vehicle_rating, type: :integer
deprecated_attribute :waiting_time_rating, type: :integer
end
end
end
Expand Down
5 changes: 4 additions & 1 deletion lib/ioki/model/webhooks/ride.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ module Ioki
module Model
module Webhooks
class Ride < Base
attribute :options, type: :array, on: [:create, :read, :update]
attribute :passenger_note_to_driver, type: :string, on: [:create, :read, :update]
attribute :vehicle_approached_dropoff_at, type: :string, on: [:create, :read, :update]
attribute :type, type: :string
attribute :id, type: :string
attribute :created_at, type: :date_time
Expand All @@ -16,7 +19,7 @@ class Ride < Base
attribute :estimated_direct_distance, type: :integer
attribute :estimated_direct_duration, type: :integer
attribute :passenger_accepted_at, type: :date_time
attribute :payment_state, type: :string
deprecated_attribute :payment_state, type: :string
attribute :picked_up_at, type: :date_time
attribute :product_id, type: :string
attribute :state, type: :string
Expand Down
11 changes: 6 additions & 5 deletions lib/ioki/model/webhooks/ride_passenger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ module Ioki
module Model
module Webhooks
class RidePassenger < Base
attribute :bahncard, type: :boolean
attribute :blue_badge, type: :boolean
attribute :public_transport_ticket, type: :boolean
attribute :options, type: :array, on: [:create, :read, :update]
deprecated_attribute :bahncard, type: :boolean
deprecated_attribute :blue_badge, type: :boolean
deprecated_attribute :public_transport_ticket, type: :boolean
attribute :type, type: :string
attribute :walker, type: :boolean
attribute :wheelchair, type: :boolean
deprecated_attribute :walker, type: :boolean
deprecated_attribute :wheelchair, type: :boolean
end
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/ioki/model/webhooks/station.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Ioki
module Model
module Webhooks
class Station < Base
attribute :product_id, type: :string, on: [:create, :read, :update]
attribute :type, type: :string
attribute :id, type: :string
attribute :created_at, type: :date_time
Expand Down
10 changes: 8 additions & 2 deletions lib/ioki/model/webhooks/task_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ module Ioki
module Model
module Webhooks
class TaskList < Base
attribute :start_location, type: :object, on: [:create, :read, :update], class_name: ['Place', 'Station']
attribute :end_location, type: :object, on: [:create, :read, :update], class_name: ['Place', 'Station']
attribute :service_starts_at, type: :string, on: [:create, :read, :update]
attribute :service_ends_at, type: :string, on: [:create, :read, :update]
attribute :line_id, type: :string, on: [:create, :read, :update]
attribute :current, type: :boolean, on: [:create, :read, :update]
attribute :type, type: :string
attribute :id, type: :string
attribute :created_at, type: :date_time
Expand All @@ -18,9 +24,9 @@ class TaskList < Base
attribute :current_journey, type: :object, class_name: 'Journey'
attribute :deactivations, type: :array, class_name: 'Deactivation'
attribute :driver, type: :object, class_name: 'Driver'
attribute :end_place, type: :object, class_name: 'Place'
deprecated_attribute :end_place, type: :object, class_name: 'Place'
attribute :pauses, type: :array, class_name: 'Pause'
attribute :start_place, type: :object, class_name: 'Place'
deprecated_attribute :start_place, type: :object, class_name: 'Place'
attribute :tasks, type: :array, class_name: 'Task'
attribute :vehicle, type: :object, class_name: 'Vehicle'
end
Expand Down
1 change: 1 addition & 0 deletions lib/ioki/model/webhooks/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Ioki
module Model
module Webhooks
class User < Base
attribute :last_activity_at, type: :string, on: [:create, :read, :update]
attribute :type, type: :string
attribute :id, type: :string
attribute :created_at, type: :date_time
Expand Down
3 changes: 3 additions & 0 deletions lib/ioki/model/webhooks/vehicle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ module Ioki
module Model
module Webhooks
class Vehicle < Base
attribute :wheelchair_bays, type: :integer, on: [:create, :read, :update]
attribute :walker_bays, type: :integer, on: [:create, :read, :update]
attribute :storage_spaces, type: :integer, on: [:create, :read, :update]
attribute :type, type: :string
attribute :id, type: :string
attribute :created_at, type: :date_time
Expand Down