diff --git a/lib/ioki/model/webhooks/admin.rb b/lib/ioki/model/webhooks/admin.rb index b3861668..2a944ac6 100644 --- a/lib/ioki/model/webhooks/admin.rb +++ b/lib/ioki/model/webhooks/admin.rb @@ -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 diff --git a/lib/ioki/model/webhooks/cancellation_statement.rb b/lib/ioki/model/webhooks/cancellation_statement.rb index 14000e80..0c7bfd41 100644 --- a/lib/ioki/model/webhooks/cancellation_statement.rb +++ b/lib/ioki/model/webhooks/cancellation_statement.rb @@ -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 diff --git a/lib/ioki/model/webhooks/nested_vehicle.rb b/lib/ioki/model/webhooks/nested_vehicle.rb index 2e90dcc3..ef36691e 100644 --- a/lib/ioki/model/webhooks/nested_vehicle.rb +++ b/lib/ioki/model/webhooks/nested_vehicle.rb @@ -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 diff --git a/lib/ioki/model/webhooks/personal_discount.rb b/lib/ioki/model/webhooks/personal_discount.rb index 0ab60e83..a7a99800 100644 --- a/lib/ioki/model/webhooks/personal_discount.rb +++ b/lib/ioki/model/webhooks/personal_discount.rb @@ -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 diff --git a/lib/ioki/model/webhooks/place.rb b/lib/ioki/model/webhooks/place.rb index 4b121f7e..90119d6b 100644 --- a/lib/ioki/model/webhooks/place.rb +++ b/lib/ioki/model/webhooks/place.rb @@ -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 diff --git a/lib/ioki/model/webhooks/product.rb b/lib/ioki/model/webhooks/product.rb index a9bc771a..e4f964e7 100644 --- a/lib/ioki/model/webhooks/product.rb +++ b/lib/ioki/model/webhooks/product.rb @@ -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 @@ -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 diff --git a/lib/ioki/model/webhooks/rating.rb b/lib/ioki/model/webhooks/rating.rb index c371154c..bf9f9423 100644 --- a/lib/ioki/model/webhooks/rating.rb +++ b/lib/ioki/model/webhooks/rating.rb @@ -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 diff --git a/lib/ioki/model/webhooks/ride.rb b/lib/ioki/model/webhooks/ride.rb index 50558021..ff27db00 100644 --- a/lib/ioki/model/webhooks/ride.rb +++ b/lib/ioki/model/webhooks/ride.rb @@ -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 @@ -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 diff --git a/lib/ioki/model/webhooks/ride_passenger.rb b/lib/ioki/model/webhooks/ride_passenger.rb index 3f0a4bb9..ca6970fb 100644 --- a/lib/ioki/model/webhooks/ride_passenger.rb +++ b/lib/ioki/model/webhooks/ride_passenger.rb @@ -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 diff --git a/lib/ioki/model/webhooks/station.rb b/lib/ioki/model/webhooks/station.rb index ad58977c..aa7ce73c 100644 --- a/lib/ioki/model/webhooks/station.rb +++ b/lib/ioki/model/webhooks/station.rb @@ -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 diff --git a/lib/ioki/model/webhooks/task_list.rb b/lib/ioki/model/webhooks/task_list.rb index 507dfe9b..518e1daa 100644 --- a/lib/ioki/model/webhooks/task_list.rb +++ b/lib/ioki/model/webhooks/task_list.rb @@ -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 @@ -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 diff --git a/lib/ioki/model/webhooks/user.rb b/lib/ioki/model/webhooks/user.rb index 39317db6..4443271e 100644 --- a/lib/ioki/model/webhooks/user.rb +++ b/lib/ioki/model/webhooks/user.rb @@ -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 diff --git a/lib/ioki/model/webhooks/vehicle.rb b/lib/ioki/model/webhooks/vehicle.rb index d3fd53c9..4ab8998c 100644 --- a/lib/ioki/model/webhooks/vehicle.rb +++ b/lib/ioki/model/webhooks/vehicle.rb @@ -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