diff --git a/lib/ioki/model/operator/area.rb b/lib/ioki/model/operator/area.rb index e744e66f..5741ea2b 100644 --- a/lib/ioki/model/operator/area.rb +++ b/lib/ioki/model/operator/area.rb @@ -4,6 +4,7 @@ module Ioki module Model module Operator class Area < Base + attribute :product_id, type: :string, on: [:create, :read, :update] attribute :type, on: :read, type: :string diff --git a/lib/ioki/model/operator/cancellation_reason_with_translations.rb b/lib/ioki/model/operator/cancellation_reason_with_translations.rb index 1a6fc2c8..e90f4a17 100644 --- a/lib/ioki/model/operator/cancellation_reason_with_translations.rb +++ b/lib/ioki/model/operator/cancellation_reason_with_translations.rb @@ -4,6 +4,7 @@ module Ioki module Model module Operator class CancellationReasonWithTranslations < Base + attribute :type, type: :string, on: [:create, :read, :update] attribute :slug, on: :read, type: :string diff --git a/lib/ioki/model/operator/cancellation_statement.rb b/lib/ioki/model/operator/cancellation_statement.rb index 2de226cd..9748f756 100644 --- a/lib/ioki/model/operator/cancellation_statement.rb +++ b/lib/ioki/model/operator/cancellation_statement.rb @@ -36,9 +36,9 @@ class CancellationStatement < Base on: [:create, :read, :update], type: :boolean - attribute :passenger_notification, - on: :read, - type: :string + # attribute :passenger_notification, + # on: :read, + # type: :string attribute :title, on: :read, diff --git a/lib/ioki/model/operator/driver.rb b/lib/ioki/model/operator/driver.rb index f56627f4..a21e5c80 100644 --- a/lib/ioki/model/operator/driver.rb +++ b/lib/ioki/model/operator/driver.rb @@ -4,6 +4,7 @@ module Ioki module Model module Operator class Driver < Base + attribute :password_disclosed, type: :boolean, on: [:create, :read, :update] attribute :type, on: :read, type: :string diff --git a/lib/ioki/model/operator/fleet_state.rb b/lib/ioki/model/operator/fleet_state.rb index 0f991f6a..214a3930 100644 --- a/lib/ioki/model/operator/fleet_state.rb +++ b/lib/ioki/model/operator/fleet_state.rb @@ -4,6 +4,9 @@ module Ioki module Model module Operator class FleetState < Base + attribute :operator_id, type: :string, on: [:create, :read, :update] + attribute :product_id, type: :string, on: [:create, :read, :update] + attribute :vehicle_ids, type: :string, on: [:create, :read, :update] attribute :type, on: :read, type: :string diff --git a/lib/ioki/model/operator/hop.rb b/lib/ioki/model/operator/hop.rb index 79868fc3..06cc299a 100644 --- a/lib/ioki/model/operator/hop.rb +++ b/lib/ioki/model/operator/hop.rb @@ -34,10 +34,10 @@ def self.schema_path type: :object, class_name: ['CalculatedPoint', 'RequestedPoint', 'PublicTransportStop'] - attribute :vehicle, - on: :read, - type: :object, - class_name: 'Vehicle' + # attribute :vehicle, + # on: :read, + # type: :object, + # class_name: 'Vehicle' attribute :details, on: :read, diff --git a/lib/ioki/model/operator/line_stop.rb b/lib/ioki/model/operator/line_stop.rb index cabf5c11..48f943ad 100644 --- a/lib/ioki/model/operator/line_stop.rb +++ b/lib/ioki/model/operator/line_stop.rb @@ -59,9 +59,9 @@ class LineStop < Base on: [:read, :create, :update], type: :string - attribute :version, - on: :read, - type: :integer + # attribute :version, + # on: :read, + # type: :integer end end end diff --git a/lib/ioki/model/operator/multilanguage_string.rb b/lib/ioki/model/operator/multilanguage_string.rb index 60632d70..07bc373f 100644 --- a/lib/ioki/model/operator/multilanguage_string.rb +++ b/lib/ioki/model/operator/multilanguage_string.rb @@ -8,6 +8,20 @@ def self.schema_path 'multilanguage_string' end + attribute :en_bz, type: :string, on: [:create, :read, :update] + attribute :uk, type: :string, on: [:create, :read, :update] + attribute :tr, type: :string, on: [:create, :read, :update] + attribute :da, type: :string, on: [:create, :read, :update] + attribute :ar, type: :string, on: [:create, :read, :update] + attribute :en_jm, type: :string, on: [:create, :read, :update] + attribute :ca, type: :string, on: [:create, :read, :update] + attribute :it, type: :string, on: [:create, :read, :update] + attribute :es, type: :string, on: [:create, :read, :update] + attribute :nl, type: :string, on: [:create, :read, :update] + attribute :de_ch, type: :string, on: [:create, :read, :update] + attribute :fr, type: :string, on: [:create, :read, :update] + attribute :en, type: :string, on: [:create, :read, :update] + attribute :de, type: :string, on: [:create, :read, :update] attribute :type, on: :read, type: :string diff --git a/lib/ioki/model/operator/operator.rb b/lib/ioki/model/operator/operator.rb index c4cdbaee..ee849e46 100644 --- a/lib/ioki/model/operator/operator.rb +++ b/lib/ioki/model/operator/operator.rb @@ -4,6 +4,9 @@ module Ioki module Model module Operator class Operator < Base + attribute :vat_number, type: :string, on: [:create, :read, :update] + attribute :external_id, type: :string, on: [:create, :read, :update] + attribute :address, type: :string, on: [:create, :read, :update] attribute :type, on: :read, type: :string @@ -20,9 +23,9 @@ class Operator < Base on: :read, type: :date_time - attribute :archived_at, - on: :read, - type: :date_time + # attribute :archived_at, + # on: :read, + # type: :date_time attribute :default_operator, on: :read, diff --git a/lib/ioki/model/operator/passenger_option.rb b/lib/ioki/model/operator/passenger_option.rb index 349ecd66..a06449e9 100644 --- a/lib/ioki/model/operator/passenger_option.rb +++ b/lib/ioki/model/operator/passenger_option.rb @@ -4,6 +4,7 @@ module Ioki module Model module Operator class PassengerOption < Base + attribute :value, type: [:string, :boolean, :integer], on: [:create, :read, :update] attribute :type, on: :read, type: :string diff --git a/lib/ioki/model/operator/personal_discount.rb b/lib/ioki/model/operator/personal_discount.rb index db359b27..bad511b6 100644 --- a/lib/ioki/model/operator/personal_discount.rb +++ b/lib/ioki/model/operator/personal_discount.rb @@ -16,7 +16,7 @@ class PersonalDiscount < Base attribute :maximum_usages, on: :read, type: :integer attribute :payment_method, on: :read, type: :object, class_name: 'PaymentMethod' attribute :product_id, on: :read, type: :string - attribute :receipts, on: :read, type: :array, class_name: 'Receipt' + deprecated_attribute :receipts, on: :read, type: :array, class_name: 'Receipt' attribute :relative_discount, on: :read, type: :integer attribute :title, on: :read, type: :string attribute :usages, on: :read, type: :integer diff --git a/lib/ioki/model/operator/product.rb b/lib/ioki/model/operator/product.rb index 38cf9205..d7078d36 100644 --- a/lib/ioki/model/operator/product.rb +++ b/lib/ioki/model/operator/product.rb @@ -24,16 +24,16 @@ class Product < Base on: :read, type: :string - attribute :provider, - type: :object, - on: :read, - class_name: 'Provider' + # attribute :provider, + # type: :object, + # on: :read, + # class_name: 'Provider' attribute :provider_id, type: :string, on: :read - attribute :area, + deprecated_attribute :area, type: :object, on: :read, class_name: 'Geojson' @@ -50,7 +50,7 @@ class Product < Base on: :read, type: :integer - attribute :bounding_box, + deprecated_attribute :bounding_box, on: :read, type: :object, class_name: 'BoundingBox' @@ -111,12 +111,12 @@ class Product < Base on: :read, type: :string - attribute :ride_options, + deprecated_attribute :ride_options, on: :read, type: :object, class_name: 'LegacyRideOptions' - attribute :ride_rating_criteria, + deprecated_attribute :ride_rating_criteria, on: :read, type: :array diff --git a/lib/ioki/model/operator/provider.rb b/lib/ioki/model/operator/provider.rb index 0ce181f8..a3c08c8f 100644 --- a/lib/ioki/model/operator/provider.rb +++ b/lib/ioki/model/operator/provider.rb @@ -4,6 +4,8 @@ module Ioki module Model module Operator class Provider < Base + attribute :operators, type: :array, on: [:create, :read, :update] + attribute :ticketing_payment_method_types, type: :array, on: [:create, :read, :update] attribute :type, on: :read, type: :string diff --git a/lib/ioki/model/operator/rating.rb b/lib/ioki/model/operator/rating.rb index 0c80b608..0eddb42c 100644 --- a/lib/ioki/model/operator/rating.rb +++ b/lib/ioki/model/operator/rating.rb @@ -20,11 +20,11 @@ class Rating < Base on: :read, type: :date_time - attribute :autonomous_feeling_of_security_rating, + deprecated_attribute :autonomous_feeling_of_security_rating, on: :read, type: :integer - attribute :autonomous_happiness_rating, + deprecated_attribute :autonomous_happiness_rating, on: :read, type: :integer @@ -32,7 +32,7 @@ class Rating < Base on: :read, type: :string - attribute :driver_rating, + deprecated_attribute :driver_rating, on: :read, type: :integer @@ -40,27 +40,27 @@ class Rating < Base on: :read, type: :boolean - attribute :punctuality_rating, + deprecated_attribute :punctuality_rating, on: :read, type: :integer - attribute :ride_rating, + deprecated_attribute :ride_rating, on: :read, type: :integer - attribute :ride_version, - on: :read, - type: :integer + # attribute :ride_version, + # on: :read, + # type: :integer - attribute :service_rating, + deprecated_attribute :service_rating, on: :read, type: :integer - attribute :vehicle_rating, + deprecated_attribute :vehicle_rating, on: :read, type: :integer - attribute :vehicle_cleanliness_rating, + deprecated_attribute :vehicle_cleanliness_rating, on: :read, type: :integer @@ -68,7 +68,7 @@ class Rating < Base on: :read, type: :integer - attribute :waiting_time_rating, + deprecated_attribute :waiting_time_rating, on: :read, type: :integer diff --git a/lib/ioki/model/operator/receipt.rb b/lib/ioki/model/operator/receipt.rb index c897bf07..1fdb3d39 100644 --- a/lib/ioki/model/operator/receipt.rb +++ b/lib/ioki/model/operator/receipt.rb @@ -4,15 +4,16 @@ module Ioki module Model module Operator class Receipt < Base + attribute :charge_id, type: :string, on: [:create, :read, :update] 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 :attachment_url, on: :read, type: :string - attribute :purchasable_id, on: :read, type: :string - attribute :purchasable_type, on: :read, type: :string - attribute :receipt_type, on: :read, type: :string - attribute :topic, on: :read, type: :string + deprecated_attribute :purchasable_id, on: :read, type: :string + deprecated_attribute :purchasable_type, on: :read, type: :string + deprecated_attribute :receipt_type, on: :read, type: :string + deprecated_attribute :topic, on: :read, type: :string attribute :user_id, on: :read, type: :string end end diff --git a/lib/ioki/model/operator/reporting/report.rb b/lib/ioki/model/operator/reporting/report.rb index 21d29df6..1e38b153 100644 --- a/lib/ioki/model/operator/reporting/report.rb +++ b/lib/ioki/model/operator/reporting/report.rb @@ -9,9 +9,9 @@ class Report < Base on: :read, type: :string - attribute :id, - on: :read, - type: :string + # attribute :id, + # on: :read, + # type: :string attribute :scope, on: :read, diff --git a/lib/ioki/model/operator/reporting/report_partition.rb b/lib/ioki/model/operator/reporting/report_partition.rb index c38d1a15..d7112713 100644 --- a/lib/ioki/model/operator/reporting/report_partition.rb +++ b/lib/ioki/model/operator/reporting/report_partition.rb @@ -5,6 +5,7 @@ module Model module Operator module Reporting class ReportPartition < Base + attribute :estimated_row_count, type: :integer, on: [:create, :read, :update] attribute :type, on: :read, type: :string diff --git a/lib/ioki/model/operator/reporting/report_partition_summary.rb b/lib/ioki/model/operator/reporting/report_partition_summary.rb index b08b0c1d..3b9259de 100644 --- a/lib/ioki/model/operator/reporting/report_partition_summary.rb +++ b/lib/ioki/model/operator/reporting/report_partition_summary.rb @@ -5,6 +5,9 @@ module Model module Operator module Reporting class ReportPartitionSummary < Base + attribute :visible_while_draft, type: :boolean, on: [:create, :read, :update] + attribute :default_query_timeframe, type: :string, on: [:create, :read, :update] + attribute :period_type, type: :string, on: [:create, :read, :update] attribute :type, on: :read, type: :string diff --git a/lib/ioki/model/operator/reporting/report_row.rb b/lib/ioki/model/operator/reporting/report_row.rb index 2d504f1a..fe296cbd 100644 --- a/lib/ioki/model/operator/reporting/report_row.rb +++ b/lib/ioki/model/operator/reporting/report_row.rb @@ -5,6 +5,7 @@ module Model module Operator module Reporting class ReportRow < Base + attribute :reference_timestamp, type: :string, on: [:create, :read, :update] attribute :type, on: :read, type: :string @@ -17,9 +18,9 @@ class ReportRow < Base on: :read, type: :array - attribute :created_at, - on: :read, - type: :date_time + # attribute :created_at, + # on: :read, + # type: :date_time end end end diff --git a/lib/ioki/model/operator/ride.rb b/lib/ioki/model/operator/ride.rb index cc36482a..49078d7c 100644 --- a/lib/ioki/model/operator/ride.rb +++ b/lib/ioki/model/operator/ride.rb @@ -4,6 +4,8 @@ module Ioki module Model module Operator class Ride < Base + attribute :phone_calls, type: :array, on: [:create, :read, :update] + attribute :options, type: :array, on: [:create, :read, :update] attribute :type, on: :read, type: :string @@ -24,7 +26,7 @@ class Ride < Base on: :read, type: :integer - attribute :book_for_others, + deprecated_attribute :book_for_others, on: :read, type: :boolean @@ -147,7 +149,7 @@ class Ride < Base on: :read, type: :string - attribute :payment_state, + deprecated_attribute :payment_state, on: :read, type: :string @@ -203,7 +205,7 @@ class Ride < Base on: :read, type: :string - attribute :storage_spaces, + deprecated_attribute :storage_spaces, on: :read, type: :integer @@ -219,10 +221,10 @@ class Ride < Base on: :read, type: :boolean - attribute :user, - on: :read, - type: :object, - class_name: 'User' + # attribute :user, + # on: :read, + # type: :object, + # class_name: 'User' attribute :user_id, on: :read, diff --git a/lib/ioki/model/operator/ride_inquiry.rb b/lib/ioki/model/operator/ride_inquiry.rb index c82501fb..6f5354f2 100644 --- a/lib/ioki/model/operator/ride_inquiry.rb +++ b/lib/ioki/model/operator/ride_inquiry.rb @@ -8,21 +8,22 @@ def self.schema_path 'operator_api--v20210101--ride_inquiry_schema' end - attribute :type, - on: :read, - type: :string + attribute :passengers, type: :array, on: [:create, :read, :update] + # attribute :type, + # on: :read, + # type: :string - attribute :id, - on: :read, - type: :string + # attribute :id, + # on: :read, + # type: :string - attribute :created_at, - on: :read, - type: :date_time + # attribute :created_at, + # on: :read, + # type: :date_time - attribute :updated_at, - on: :read, - type: :date_time + # attribute :updated_at, + # on: :read, + # type: :date_time # The model does not return it but it's used when sending data to the server. attribute :origin, @@ -40,10 +41,10 @@ def self.schema_path class_name: 'RequestedPoint', unvalidated: true - attribute :constraints, - on: :read, - type: :object, - class_name: 'Constraints' + # attribute :constraints, + # on: :read, + # type: :object, + # class_name: 'Constraints' end end end diff --git a/lib/ioki/model/operator/ride_passenger.rb b/lib/ioki/model/operator/ride_passenger.rb index 55c6df37..9a649170 100644 --- a/lib/ioki/model/operator/ride_passenger.rb +++ b/lib/ioki/model/operator/ride_passenger.rb @@ -4,15 +4,16 @@ module Ioki module Model module Operator class RidePassenger < Base - attribute :bahncard, + attribute :options, type: :array, on: [:create, :read, :update] + deprecated_attribute :bahncard, on: :read, type: :boolean - attribute :blue_badge, + deprecated_attribute :blue_badge, on: :read, type: :boolean - attribute :public_transport_ticket, + deprecated_attribute :public_transport_ticket, on: :read, type: :boolean @@ -20,11 +21,11 @@ class RidePassenger < Base on: :read, type: :string - attribute :walker, + deprecated_attribute :walker, on: :read, type: :boolean - attribute :wheelchair, + deprecated_attribute :wheelchair, on: :read, type: :boolean end diff --git a/lib/ioki/model/operator/station.rb b/lib/ioki/model/operator/station.rb index 65994ffd..495ae416 100644 --- a/lib/ioki/model/operator/station.rb +++ b/lib/ioki/model/operator/station.rb @@ -4,6 +4,7 @@ module Ioki module Model module Operator class Station < Base + attribute :avatar, type: :object, on: [:create, :read, :update], class_name: 'ImageUpload' attribute :type, on: :read, type: :string diff --git a/lib/ioki/model/operator/task.rb b/lib/ioki/model/operator/task.rb index 29e9b9cd..6d7ece60 100644 --- a/lib/ioki/model/operator/task.rb +++ b/lib/ioki/model/operator/task.rb @@ -4,6 +4,8 @@ module Ioki module Model module Operator class Task < Base + attribute :reported_completed_at, type: :string, on: [:create, :read, :update] + attribute :reported_cancelled_at, type: :string, on: [:create, :read, :update] attribute :type, on: :read, type: :string diff --git a/lib/ioki/model/operator/task_list.rb b/lib/ioki/model/operator/task_list.rb index 3c11937f..d95b988d 100644 --- a/lib/ioki/model/operator/task_list.rb +++ b/lib/ioki/model/operator/task_list.rb @@ -4,6 +4,8 @@ module Ioki module Model module Operator class TaskList < Base + attribute :tasks, type: :array, on: [:create, :read, :update] + attribute :occupancy, type: :object, on: [:create, :read, :update], class_name: 'TaskListOccupancy' attribute :type, on: :read, type: :string @@ -42,10 +44,10 @@ class TaskList < Base on: :read, type: :boolean - attribute :deactivations, - on: :read, - type: :array, - class_name: 'Deactivation' + # attribute :deactivations, + # on: :read, + # type: :array, + # class_name: 'Deactivation' attribute :end_location, on: :read, @@ -74,17 +76,17 @@ class TaskList < Base omit_if_nil_on: [:create, :update], type: :string - attribute :matching_configuration_name, - on: :read, - type: :string + # attribute :matching_configuration_name, + # on: :read, + # type: :string attribute :matching_rank, on: [:create, :read, :update], type: :integer - attribute :num_prebooked_rides, - on: :read, - type: :integer + # attribute :num_prebooked_rides, + # on: :read, + # type: :integer attribute :paused, on: :read, @@ -142,11 +144,11 @@ class TaskList < Base omit_if_nil_on: [:create, :update], type: :string - attribute :vehicle, - on: :read, - omit_if_nil_on: [:read], - type: :object, - class_name: 'Vehicle' + # attribute :vehicle, + # on: :read, + # omit_if_nil_on: [:read], + # type: :object, + # class_name: 'Vehicle' attribute :vehicle_id, on: [:create, :read, :reassign], @@ -158,13 +160,13 @@ class TaskList < Base omit_if_nil_on: [:create], type: :string - attribute :line_name, - on: :read, - type: :string + # attribute :line_name, + # on: :read, + # type: :string - attribute :driver_name, - on: :read, - type: :string + # attribute :driver_name, + # on: :read, + # type: :string attribute :version, on: [:read, :update], diff --git a/lib/ioki/model/operator/telemetry.rb b/lib/ioki/model/operator/telemetry.rb index 94f30f0d..9392797b 100644 --- a/lib/ioki/model/operator/telemetry.rb +++ b/lib/ioki/model/operator/telemetry.rb @@ -8,6 +8,10 @@ def self.schema_path 'operator_api--v20210101--fleet_state--vehicle_telemetry' end + attribute :seatbelt_state_source, type: :string, on: [:create, :read, :update] + attribute :seatbelt_state_synced_at, type: :string, on: [:create, :read, :update] + attribute :seatbelt_state, type: :string, on: [:create, :read, :update] + attribute :type, type: :string, on: [:create, :read, :update] attribute :id, on: :read, type: :string diff --git a/lib/ioki/model/operator/user.rb b/lib/ioki/model/operator/user.rb index a4d3c4d2..7e9016fa 100644 --- a/lib/ioki/model/operator/user.rb +++ b/lib/ioki/model/operator/user.rb @@ -4,6 +4,7 @@ module Ioki module Model module Operator class User < Base + attribute :provider_id, type: :string, on: [:create, :read, :update] attribute :type, on: :read, type: :string @@ -36,9 +37,9 @@ class User < Base omit_if_blank_on: [:create, :update], type: :string - attribute :full_name, - on: :read, - type: :string + # attribute :full_name, + # on: :read, + # type: :string attribute :last_name, on: [:read, :create, :update], @@ -57,9 +58,9 @@ class User < Base on: :read, type: :string - attribute :locked, - on: :read, - type: :boolean + # attribute :locked, + # on: :read, + # type: :boolean attribute :locked_at, on: :read, @@ -79,9 +80,9 @@ class User < Base on: :read, type: :date_time - attribute :unique_customer_id, - on: :read, - type: :string + # attribute :unique_customer_id, + # on: :read, + # type: :string attribute :version, on: [:read, :update], diff --git a/lib/ioki/model/operator/vehicle.rb b/lib/ioki/model/operator/vehicle.rb index bf9b0de7..01736daa 100644 --- a/lib/ioki/model/operator/vehicle.rb +++ b/lib/ioki/model/operator/vehicle.rb @@ -4,6 +4,9 @@ module Ioki module Model module Operator class Vehicle < Base + attribute :vehicle_type, type: :string, on: [:create, :read, :update] + attribute :door_control_available, type: :boolean, on: [:create, :read, :update] + attribute :supports_open_door_requests, type: :boolean, on: [:create, :read, :update] attribute :type, on: :read, type: :string @@ -20,9 +23,9 @@ class Vehicle < Base on: :read, type: :date_time - attribute :active, - on: :read, - type: :boolean + # attribute :active, + # on: :read, + # type: :boolean attribute :autonomous, on: [:create, :read, :update], @@ -92,7 +95,7 @@ class Vehicle < Base omit_if_nil_on: [:create, :update], type: :string - attribute :num_wheelchair_bays_as_storages, + deprecated_attribute :num_wheelchair_bays_as_storages, on: [:create, :read, :update], omit_if_nil_on: [:create, :update], type: :integer diff --git a/lib/ioki/model/operator/vehicle_position.rb b/lib/ioki/model/operator/vehicle_position.rb index 3fddc23c..96be7562 100644 --- a/lib/ioki/model/operator/vehicle_position.rb +++ b/lib/ioki/model/operator/vehicle_position.rb @@ -8,6 +8,7 @@ def self.schema_path 'operator_api--v20210101--vehicle_position_without_vehicle' end + attribute :product_id, type: :string, on: [:create, :read, :update] attribute :type, on: :read, type: :string @@ -44,18 +45,18 @@ def self.schema_path on: [:create, :read], type: :float - attribute :on_route, - on: [:create, :read], - omit_if_nil_on: :create, - type: :boolean + # attribute :on_route, + # on: [:create, :read], + # omit_if_nil_on: :create, + # type: :boolean attribute :recorded_at, on: [:create, :read], type: :date_time - attribute :source, - on: [:create, :read], - type: :string + # attribute :source, + # on: [:create, :read], + # type: :string attribute :speed, on: [:create, :read], diff --git a/lib/ioki/model/operator/zone.rb b/lib/ioki/model/operator/zone.rb index bddb785c..3e627efb 100644 --- a/lib/ioki/model/operator/zone.rb +++ b/lib/ioki/model/operator/zone.rb @@ -4,6 +4,7 @@ module Ioki module Model module Operator class Zone < Base + attribute :product_id, type: :string, on: [:create, :read, :update] attribute :type, on: :read, type: :string