From 4f0c34557284b8950f9058a4c0976ea8d52af2d7 Mon Sep 17 00:00:00 2001 From: ozb-ioki <102806371+ozb-ioki@users.noreply.github.com> Date: Wed, 7 May 2025 15:25:28 +0000 Subject: [PATCH] fix: Automated PR due to RSpec test failures --- lib/ioki/model/driver/calculated_point.rb | 4 +- .../model/driver/cancellation_statement.rb | 2 + lib/ioki/model/driver/client.rb | 6 +-- lib/ioki/model/driver/driver.rb | 1 + lib/ioki/model/driver/leg.rb | 3 +- lib/ioki/model/driver/personal_discount.rb | 4 +- lib/ioki/model/driver/product.rb | 16 ++++--- lib/ioki/model/driver/rating.rb | 15 ++++--- lib/ioki/model/driver/receipt.rb | 14 +++--- lib/ioki/model/driver/ride.rb | 9 ++-- lib/ioki/model/driver/ride_passenger.rb | 11 ++--- lib/ioki/model/driver/station.rb | 2 + lib/ioki/model/driver/task.rb | 1 + lib/ioki/model/driver/vehicle.rb | 1 + lib/ioki/model/operator/area.rb | 1 + .../cancellation_reason_with_translations.rb | 1 + .../model/operator/cancellation_statement.rb | 6 +-- lib/ioki/model/operator/driver.rb | 1 + lib/ioki/model/operator/fleet_state.rb | 3 ++ lib/ioki/model/operator/hop.rb | 8 ++-- lib/ioki/model/operator/line_stop.rb | 6 +-- .../model/operator/multilanguage_string.rb | 14 ++++++ lib/ioki/model/operator/operator.rb | 9 ++-- lib/ioki/model/operator/passenger_option.rb | 1 + lib/ioki/model/operator/personal_discount.rb | 2 +- lib/ioki/model/operator/product.rb | 16 +++---- lib/ioki/model/operator/provider.rb | 2 + lib/ioki/model/operator/rating.rb | 24 +++++----- lib/ioki/model/operator/receipt.rb | 9 ++-- lib/ioki/model/operator/reporting/report.rb | 6 +-- .../operator/reporting/report_partition.rb | 1 + .../reporting/report_partition_summary.rb | 3 ++ .../model/operator/reporting/report_row.rb | 7 +-- lib/ioki/model/operator/ride.rb | 16 ++++--- lib/ioki/model/operator/ride_inquiry.rb | 33 +++++++------- lib/ioki/model/operator/ride_passenger.rb | 11 ++--- lib/ioki/model/operator/station.rb | 1 + lib/ioki/model/operator/task.rb | 2 + lib/ioki/model/operator/task_list.rb | 44 ++++++++++--------- lib/ioki/model/operator/telemetry.rb | 4 ++ lib/ioki/model/operator/user.rb | 19 ++++---- lib/ioki/model/operator/vehicle.rb | 11 +++-- lib/ioki/model/operator/vehicle_position.rb | 15 ++++--- lib/ioki/model/operator/zone.rb | 1 + lib/ioki/model/passenger/announcement.rb | 1 + lib/ioki/model/passenger/assistance.rb | 1 + lib/ioki/model/passenger/booking.rb | 1 + lib/ioki/model/passenger/bootstrap.rb | 3 ++ .../model/passenger/cancellation_voucher.rb | 2 +- lib/ioki/model/passenger/client.rb | 10 +++-- lib/ioki/model/passenger/fare.rb | 7 ++- lib/ioki/model/passenger/hop.rb | 2 +- lib/ioki/model/passenger/package.rb | 4 +- lib/ioki/model/passenger/passenger_option.rb | 4 +- .../model/passenger/payment_method_summary.rb | 1 + lib/ioki/model/passenger/personal_discount.rb | 7 ++- .../model/passenger/personal_discount_type.rb | 6 +-- .../passenger/phone_verification_request.rb | 2 + lib/ioki/model/passenger/product.rb | 26 +++++++---- lib/ioki/model/passenger/provider.rb | 2 + lib/ioki/model/passenger/rating.rb | 13 +++--- lib/ioki/model/passenger/receipt.rb | 3 +- .../model/passenger/redeemed_promo_code.rb | 2 +- lib/ioki/model/passenger/ride.rb | 13 ++++-- lib/ioki/model/passenger/ride_inquiry.rb | 3 +- lib/ioki/model/passenger/ride_option.rb | 4 +- lib/ioki/model/passenger/ride_passenger.rb | 10 ++--- lib/ioki/model/passenger/service_credit.rb | 3 +- lib/ioki/model/passenger/station.rb | 1 + lib/ioki/model/passenger/ticketing/product.rb | 1 + lib/ioki/model/passenger/ticketing/ticket.rb | 1 + .../passenger/ticketing/voucher_renewal.rb | 8 +++- lib/ioki/model/passenger/tip.rb | 2 + lib/ioki/model/passenger/tip_create.rb | 1 + lib/ioki/model/passenger/user.rb | 4 ++ lib/ioki/model/passenger/vehicle.rb | 3 ++ lib/ioki/model/platform/announcement.rb | 3 ++ lib/ioki/model/platform/area.rb | 3 ++ lib/ioki/model/platform/assistance.rb | 1 + lib/ioki/model/platform/booking.rb | 2 + lib/ioki/model/platform/calculated_point.rb | 1 + .../model/platform/cancellation_statement.rb | 6 +++ lib/ioki/model/platform/captcha.rb | 2 +- lib/ioki/model/platform/client.rb | 28 ++++++++++++ lib/ioki/model/platform/client_challenge.rb | 4 +- lib/ioki/model/platform/driver.rb | 2 + lib/ioki/model/platform/line.rb | 4 +- lib/ioki/model/platform/line_stop.rb | 2 +- .../model/platform/matching_configuration.rb | 37 ++++++++++++++++ .../model/platform/multilanguage_string.rb | 14 ++++++ lib/ioki/model/platform/operator.rb | 8 ++-- lib/ioki/model/platform/passenger_option.rb | 4 +- lib/ioki/model/platform/personal_discount.rb | 4 +- lib/ioki/model/platform/place.rb | 5 +++ lib/ioki/model/platform/product.rb | 17 +++---- lib/ioki/model/platform/provider.rb | 3 +- lib/ioki/model/platform/rating.rb | 15 ++++--- lib/ioki/model/platform/receipt.rb | 9 ++-- lib/ioki/model/platform/ride.rb | 15 +++++-- lib/ioki/model/platform/ride_inquiry.rb | 3 +- lib/ioki/model/platform/ride_inquiry_link.rb | 1 + lib/ioki/model/platform/ride_option.rb | 4 +- lib/ioki/model/platform/ride_passenger.rb | 10 ++--- .../model/platform/service_credit_charge.rb | 1 + lib/ioki/model/platform/station.rb | 12 +++++ lib/ioki/model/platform/task.rb | 1 + lib/ioki/model/platform/task_list.rb | 22 +++++++--- lib/ioki/model/platform/user.rb | 5 ++- lib/ioki/model/platform/vehicle.rb | 9 ++++ lib/ioki/model/platform/webhook.rb | 4 ++ lib/ioki/model/webhooks/admin.rb | 1 + .../model/webhooks/cancellation_statement.rb | 2 + lib/ioki/model/webhooks/nested_vehicle.rb | 7 +++ lib/ioki/model/webhooks/personal_discount.rb | 2 + lib/ioki/model/webhooks/place.rb | 1 + lib/ioki/model/webhooks/product.rb | 5 ++- lib/ioki/model/webhooks/rating.rb | 13 +++--- lib/ioki/model/webhooks/ride.rb | 5 ++- lib/ioki/model/webhooks/ride_passenger.rb | 11 ++--- lib/ioki/model/webhooks/station.rb | 1 + lib/ioki/model/webhooks/task_list.rb | 10 ++++- lib/ioki/model/webhooks/user.rb | 1 + lib/ioki/model/webhooks/vehicle.rb | 3 ++ 123 files changed, 586 insertions(+), 254 deletions(-) diff --git a/lib/ioki/model/driver/calculated_point.rb b/lib/ioki/model/driver/calculated_point.rb index b242747e..13f1e5ed 100644 --- a/lib/ioki/model/driver/calculated_point.rb +++ b/lib/ioki/model/driver/calculated_point.rb @@ -4,6 +4,8 @@ module Ioki module Model module Driver class CalculatedPoint < Base + attribute :max_communicated_time, type: :string, on: [:create, :read, :update] + attribute :communicated_time, 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 @@ -19,7 +21,7 @@ class CalculatedPoint < Base attribute :location_name, on: :read, type: :string attribute :negotiation_time, on: :read, type: :string attribute :negotiation_time_max, on: :read, type: :string - attribute :pause_id, on: :read, type: :string + # attribute :pause_id, on: :read, type: :string attribute :postal_code, on: :read, type: :string attribute :station_id, on: :read, type: :string attribute :street_name, on: :read, type: :string diff --git a/lib/ioki/model/driver/cancellation_statement.rb b/lib/ioki/model/driver/cancellation_statement.rb index 7b8d047d..5c49c9ff 100644 --- a/lib/ioki/model/driver/cancellation_statement.rb +++ b/lib/ioki/model/driver/cancellation_statement.rb @@ -4,6 +4,8 @@ module Ioki module Model module Driver 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, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/driver/client.rb b/lib/ioki/model/driver/client.rb index 92022627..5d1dd363 100644 --- a/lib/ioki/model/driver/client.rb +++ b/lib/ioki/model/driver/client.rb @@ -6,9 +6,9 @@ module Driver class Client < Base attribute :type, on: :read, type: :string attribute :current_version, on: :read, type: :string - attribute :default_map_center_lat, on: :read, type: :float - attribute :default_map_center_lng, on: :read, type: :float - attribute :default_map_zoom_level, on: :read, type: :integer + # attribute :default_map_center_lat, on: :read, type: :float + # attribute :default_map_center_lng, on: :read, type: :float + # attribute :default_map_zoom_level, on: :read, type: :integer attribute :distribution_url, on: :read, type: :string attribute :features, on: :read, type: :object attribute :help_url, on: :read, type: :string diff --git a/lib/ioki/model/driver/driver.rb b/lib/ioki/model/driver/driver.rb index ee6cb22c..f962ff1a 100644 --- a/lib/ioki/model/driver/driver.rb +++ b/lib/ioki/model/driver/driver.rb @@ -4,6 +4,7 @@ module Ioki module Model module Driver class Driver < Base + attribute :password_disclosed, type: :boolean, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/driver/leg.rb b/lib/ioki/model/driver/leg.rb index 527f8917..7c315f72 100644 --- a/lib/ioki/model/driver/leg.rb +++ b/lib/ioki/model/driver/leg.rb @@ -4,6 +4,7 @@ module Ioki module Model module Driver class Leg < Base + attribute :destination_task_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 @@ -17,7 +18,7 @@ class Leg < Base attribute :leg_order, on: :read, type: :integer attribute :maneuvers, on: :read, type: :array attribute :maneuvers_calculated_at, on: :read, type: :date_time - attribute :destination_task, on: :read, type: :object, class_name: 'Task' + # attribute :destination_task, on: :read, type: :object, class_name: 'Task' end end end diff --git a/lib/ioki/model/driver/personal_discount.rb b/lib/ioki/model/driver/personal_discount.rb index e25569d3..2544c6de 100644 --- a/lib/ioki/model/driver/personal_discount.rb +++ b/lib/ioki/model/driver/personal_discount.rb @@ -4,6 +4,8 @@ module Ioki module Model module Driver 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, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time @@ -22,7 +24,7 @@ class PersonalDiscount < Base attribute :validity, on: :read, type: :string attribute :absolute_discount, on: :read, type: :object, class_name: 'Money' attribute :payment_method, on: :read, type: :object, class_name: 'PaymentMethod' - attribute :receipts, on: :read, type: :array, class_name: 'Receipt' + deprecated_attribute :receipts, on: :read, type: :array, class_name: 'Receipt' end end end diff --git a/lib/ioki/model/driver/product.rb b/lib/ioki/model/driver/product.rb index c119e1c5..6fbe5961 100644 --- a/lib/ioki/model/driver/product.rb +++ b/lib/ioki/model/driver/product.rb @@ -4,20 +4,24 @@ module Ioki module Model module Driver class Product < Base + attribute :announcements, type: :array, on: [:create, :read, :update] + attribute :features, type: :object, on: [:create, :read, :update], class_name: 'ProductFeatures' + attribute :bounding_box, type: :object, on: [:create, :read, :update], class_name: 'BoundingBox' + attribute :ride_payment_method_types, type: :array, on: [:create, :read, :update] attribute :name, on: :read, type: :string 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 :auto_accept_by_driver_client, on: :read, type: :boolean - attribute :driver_client_can_reject_task, on: :read, type: :boolean + # attribute :auto_accept_by_driver_client, on: :read, type: :boolean + # attribute :driver_client_can_reject_task, on: :read, type: :boolean attribute :driver_emergency_phone_number, on: :read, type: :string attribute :driver_faq_url, on: :read, type: :string - attribute :drivers_can_pause, on: :read, type: :boolean - attribute :supports_driver_emergency_button, on: :read, type: :boolean - attribute :supports_tipping, on: :read, type: :boolean + # attribute :drivers_can_pause, on: :read, type: :boolean + # attribute :supports_driver_emergency_button, on: :read, type: :boolean + # attribute :supports_tipping, on: :read, type: :boolean attribute :cancellation_statements, on: :read, type: :array, class_name: 'CancellationStatement' - attribute :ride_options, on: :read, type: :object, class_name: 'RideOptions' + # attribute :ride_options, on: :read, type: :object, class_name: 'RideOptions' end end end diff --git a/lib/ioki/model/driver/rating.rb b/lib/ioki/model/driver/rating.rb index 314b1497..2f5b42d1 100644 --- a/lib/ioki/model/driver/rating.rb +++ b/lib/ioki/model/driver/rating.rb @@ -4,20 +4,21 @@ module Ioki module Model module Driver class Rating < Base + attribute :rating_line_items, type: :array, 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 :version, on: :read, type: :integer attribute :comment, on: :read, type: :string - attribute :driver_rating, on: :read, type: :integer + deprecated_attribute :driver_rating, on: :read, type: :integer attribute :editable, on: :read, type: :boolean - attribute :punctuality_rating, on: :read, type: :integer - attribute :ride_rating, on: :read, type: :integer - attribute :service_rating, on: :read, type: :integer - attribute :vehicle_rating, on: :read, type: :integer - attribute :vehicle_cleanliness_rating, on: :read, type: :integer - attribute :waiting_time_rating, on: :read, type: :integer + deprecated_attribute :punctuality_rating, on: :read, type: :integer + deprecated_attribute :ride_rating, on: :read, type: :integer + deprecated_attribute :service_rating, on: :read, type: :integer + deprecated_attribute :vehicle_rating, on: :read, type: :integer + deprecated_attribute :vehicle_cleanliness_rating, on: :read, type: :integer + deprecated_attribute :waiting_time_rating, on: :read, type: :integer end end end diff --git a/lib/ioki/model/driver/receipt.rb b/lib/ioki/model/driver/receipt.rb index 74c281ee..7e9bae1c 100644 --- a/lib/ioki/model/driver/receipt.rb +++ b/lib/ioki/model/driver/receipt.rb @@ -4,12 +4,16 @@ module Ioki module Model module Driver class Receipt < Base + attribute :updated_at, type: :string, on: [:create, :read, :update] + attribute :created_at, type: :string, on: [:create, :read, :update] + attribute :id, type: :string, on: [:create, :read, :update] + attribute :type, type: :string, on: [:create, :read, :update] 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 - attribute :user_id, on: :read, type: :string + # attribute :purchasable_id, on: :read, type: :string + # attribute :purchasable_type, on: :read, type: :string + deprecated_attribute :receipt_type, on: :read, type: :string + # attribute :topic, on: :read, type: :string + # attribute :user_id, on: :read, type: :string end end end diff --git a/lib/ioki/model/driver/ride.rb b/lib/ioki/model/driver/ride.rb index 3646d3d7..45b5ffd1 100644 --- a/lib/ioki/model/driver/ride.rb +++ b/lib/ioki/model/driver/ride.rb @@ -4,12 +4,15 @@ module Ioki module Model module Driver class Ride < Base + attribute :resource_consumption, type: :object, on: [:create, :read, :update], class_name: 'ResourceConsumption' + attribute :options, type: :array, on: [:create, :read, :update] + attribute :passenger_note_to_driver, 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 :version, on: :read, type: :integer - attribute :book_for_others, on: :read, type: :boolean + # attribute :book_for_others, on: :read, type: :boolean attribute :cancellable, on: :read, type: :boolean attribute :cancellation_reason, on: :read, type: :string attribute :cancellation_reason_translated, on: :read, type: :string @@ -17,14 +20,14 @@ class Ride < Base attribute :driver_can_add_passenger, on: :read, type: :boolean attribute :needs_cancellation_code, on: :read, type: :boolean attribute :passenger_can_be_called, on: :read, type: :boolean - attribute :payment_state, on: :read, type: :string + # attribute :payment_state, on: :read, type: :string attribute :prebooked, on: :read, type: :boolean attribute :product_id, on: :read, type: :string attribute :public_transport_uri, on: :read, type: :string attribute :rateable, on: :read, type: :boolean attribute :route, on: :read, type: :object attribute :state, on: :read, type: :string - attribute :storage_spaces, on: :read, type: :integer + # attribute :storage_spaces, on: :read, type: :integer attribute :tippable, on: :read, type: :boolean attribute :valid_for_driver_until, on: :read, type: :date_time attribute :valid_for_passenger_until, on: :read, type: :date_time diff --git a/lib/ioki/model/driver/ride_passenger.rb b/lib/ioki/model/driver/ride_passenger.rb index 1b6e5081..487cf27f 100644 --- a/lib/ioki/model/driver/ride_passenger.rb +++ b/lib/ioki/model/driver/ride_passenger.rb @@ -4,12 +4,13 @@ module Ioki module Model module Driver class RidePassenger < Base - attribute :bahncard, on: :read, type: :boolean - attribute :blue_badge, on: :read, type: :boolean - attribute :public_transport_ticket, on: :read, type: :boolean + attribute :options, type: :array, on: [:create, :read, :update] + # attribute :bahncard, on: :read, type: :boolean + # attribute :blue_badge, on: :read, type: :boolean + # attribute :public_transport_ticket, on: :read, type: :boolean attribute :type, on: :read, type: :string - attribute :walker, on: :read, type: :boolean - attribute :wheelchair, on: :read, type: :boolean + # attribute :walker, on: :read, type: :boolean + # attribute :wheelchair, on: :read, type: :boolean end end end diff --git a/lib/ioki/model/driver/station.rb b/lib/ioki/model/driver/station.rb index 0e5b0375..d52544a9 100644 --- a/lib/ioki/model/driver/station.rb +++ b/lib/ioki/model/driver/station.rb @@ -4,6 +4,8 @@ module Ioki module Model module Driver class Station < Base + attribute :current_station_information, type: :object, on: [:create, :read, :update], class_name: 'StationInformation' + attribute :announcements, type: :array, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/driver/task.rb b/lib/ioki/model/driver/task.rb index b9aecb35..dbc88023 100644 --- a/lib/ioki/model/driver/task.rb +++ b/lib/ioki/model/driver/task.rb @@ -4,6 +4,7 @@ module Ioki module Model module Driver class Task < Base + attribute :earliest_completion_from, 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 diff --git a/lib/ioki/model/driver/vehicle.rb b/lib/ioki/model/driver/vehicle.rb index 46bc2850..ed453eff 100644 --- a/lib/ioki/model/driver/vehicle.rb +++ b/lib/ioki/model/driver/vehicle.rb @@ -4,6 +4,7 @@ module Ioki module Model module Driver class Vehicle < Base + attribute :autonomous, type: :boolean, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time 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 13d06078..b0702b53 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 @@ -142,7 +144,7 @@ class Ride < Base on: :read, type: :string - attribute :payment_state, + deprecated_attribute :payment_state, on: :read, type: :string @@ -198,7 +200,7 @@ class Ride < Base on: :read, type: :string - attribute :storage_spaces, + deprecated_attribute :storage_spaces, on: :read, type: :integer @@ -214,10 +216,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 diff --git a/lib/ioki/model/passenger/announcement.rb b/lib/ioki/model/passenger/announcement.rb index a641013a..8d101f11 100644 --- a/lib/ioki/model/passenger/announcement.rb +++ b/lib/ioki/model/passenger/announcement.rb @@ -4,6 +4,7 @@ module Ioki module Model module Passenger class Announcement < Base + attribute :targets, type: :array, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/passenger/assistance.rb b/lib/ioki/model/passenger/assistance.rb index 67fe8432..7246ee56 100644 --- a/lib/ioki/model/passenger/assistance.rb +++ b/lib/ioki/model/passenger/assistance.rb @@ -8,6 +8,7 @@ def self.schema_path 'passenger_api--v1--ride_inquiry--assistance' end + attribute :error_code, type: :string, on: [:create, :read, :update] attribute :href, on: :read, type: :string attribute :text, on: :read, type: :string attribute :title, on: :read, type: :string diff --git a/lib/ioki/model/passenger/booking.rb b/lib/ioki/model/passenger/booking.rb index f4a3d43b..75170551 100644 --- a/lib/ioki/model/passenger/booking.rb +++ b/lib/ioki/model/passenger/booking.rb @@ -4,6 +4,7 @@ module Ioki module Model module Passenger class Booking < Base + attribute :paypal_secure_element, type: :string, on: [:create, :read, :update] attribute :type, on: :read, type: :string diff --git a/lib/ioki/model/passenger/bootstrap.rb b/lib/ioki/model/passenger/bootstrap.rb index 11adba9f..1de50d9d 100644 --- a/lib/ioki/model/passenger/bootstrap.rb +++ b/lib/ioki/model/passenger/bootstrap.rb @@ -4,6 +4,9 @@ module Ioki module Model module Passenger class Bootstrap < Base + attribute :renewable_ticketing_vouchers, type: :array, on: [:create, :read, :update] + attribute :product_support_uris, type: :array, on: [:create, :read, :update] + attribute :failed_purchases, type: :array, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/passenger/cancellation_voucher.rb b/lib/ioki/model/passenger/cancellation_voucher.rb index a70d25a0..54b5f0fc 100644 --- a/lib/ioki/model/passenger/cancellation_voucher.rb +++ b/lib/ioki/model/passenger/cancellation_voucher.rb @@ -8,7 +8,7 @@ class CancellationVoucher < Base attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time attribute :updated_at, on: :read, type: :date_time - attribute :ride_version, on: :create, type: :integer + # attribute :ride_version, on: :create, type: :integer attribute :code, on: :read, type: :string attribute :valid_until, on: :read, type: :date_time attribute :fee, on: :read, type: :object, class_name: 'Money' diff --git a/lib/ioki/model/passenger/client.rb b/lib/ioki/model/passenger/client.rb index e70160b9..9d6b1de7 100644 --- a/lib/ioki/model/passenger/client.rb +++ b/lib/ioki/model/passenger/client.rb @@ -4,11 +4,13 @@ module Ioki module Model module Passenger class Client < Base + attribute :support_phone_number, type: :string, on: [:create, :read, :update] + attribute :render_deprecated_attributes, type: :boolean, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :current_version, on: :read, type: :string - attribute :default_map_center_lat, on: :read, type: :float - attribute :default_map_center_lng, on: :read, type: :float - attribute :default_map_zoom_level, on: :read, type: :integer + deprecated_attribute :default_map_center_lat, on: :read, type: :float + deprecated_attribute :default_map_center_lng, on: :read, type: :float + deprecated_attribute :default_map_zoom_level, on: :read, type: :integer attribute :distribution_url, on: :read, type: :string attribute :features, on: :read, type: :object, class_name: 'Features' attribute :help_url, on: :read, type: :string @@ -16,7 +18,7 @@ class Client < Base attribute :imprint_url, on: :read, type: :string attribute :min_version, on: :read, type: :string attribute :name, on: :read, type: :string - attribute :phone_number, on: :read, type: :string + deprecated_attribute :phone_number, on: :read, type: :string attribute :privacy_policy_url, on: :read, type: :string attribute :publisher_name, on: :read, type: :string attribute :sms_support_number, on: :read, type: :string diff --git a/lib/ioki/model/passenger/fare.rb b/lib/ioki/model/passenger/fare.rb index fe49f025..f69469ab 100644 --- a/lib/ioki/model/passenger/fare.rb +++ b/lib/ioki/model/passenger/fare.rb @@ -4,15 +4,18 @@ module Ioki module Model module Passenger class Fare < Base + attribute :line_items, type: :array, on: [:create, :read, :update] + attribute :custom_message_for_external_pricing, type: :string, on: [:create, :read, :update] + attribute :fare_type, 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 :booking_price, on: :read, type: :object, class_name: 'Money' - attribute :booking_price_object, on: :read, type: :object, class_name: 'Money' + deprecated_attribute :booking_price_object, on: :read, type: :object, class_name: 'Money' attribute :booking_price_type, on: :read, type: :string attribute :final_price, on: :read, type: :object, class_name: 'Money' - attribute :final_price_object, on: :read, type: :object, class_name: 'Money' + deprecated_attribute :final_price_object, on: :read, type: :object, class_name: 'Money' attribute :personal_discount, on: :read, type: :object, class_name: 'PersonalDiscount' attribute :version, on: :read, type: :integer end diff --git a/lib/ioki/model/passenger/hop.rb b/lib/ioki/model/passenger/hop.rb index 2186196f..2d04724e 100644 --- a/lib/ioki/model/passenger/hop.rb +++ b/lib/ioki/model/passenger/hop.rb @@ -22,7 +22,7 @@ def self.schema_path class_name: ['CalculatedPoint', 'RequestedPoint', 'PublicTransportStop'] attribute :to, on: :read, 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, type: :object, class_name: 'HopDetails' end end diff --git a/lib/ioki/model/passenger/package.rb b/lib/ioki/model/passenger/package.rb index a4460681..73d948f0 100644 --- a/lib/ioki/model/passenger/package.rb +++ b/lib/ioki/model/passenger/package.rb @@ -9,9 +9,9 @@ def self.schema_path end attribute :cost, on: :read, type: :object, class_name: 'Money' - attribute :cost_object, on: :read, type: :object, class_name: 'Money' + deprecated_attribute :cost_object, on: :read, type: :object, class_name: 'Money' attribute :value, on: :read, type: :object, class_name: 'Money' - attribute :value_object, on: :read, type: :object, class_name: 'Money' + deprecated_attribute :value_object, on: :read, type: :object, class_name: 'Money' end end end diff --git a/lib/ioki/model/passenger/passenger_option.rb b/lib/ioki/model/passenger/passenger_option.rb index ebe27284..7fa84eff 100644 --- a/lib/ioki/model/passenger/passenger_option.rb +++ b/lib/ioki/model/passenger/passenger_option.rb @@ -4,7 +4,9 @@ module Ioki module Model module Passenger class PassengerOption < Base - attribute :name, on: [:read, :create], type: :string + attribute :default_value, type: :string, on: [:create, :read, :update] + attribute :slug, type: :string, on: [:create, :read, :update] + deprecated_attribute :name, on: [:read, :create], type: :string attribute :value, on: :create, type: [:string, :boolean, :integer] attribute :type, on: :read, type: :string diff --git a/lib/ioki/model/passenger/payment_method_summary.rb b/lib/ioki/model/passenger/payment_method_summary.rb index b3540aee..7ac27138 100644 --- a/lib/ioki/model/passenger/payment_method_summary.rb +++ b/lib/ioki/model/passenger/payment_method_summary.rb @@ -4,6 +4,7 @@ module Ioki module Model module Passenger class PaymentMethodSummary < Base + attribute :type, type: :string, on: [:create, :read, :update] attribute :brand, on: :read, type: :string attribute :expiration, on: :read, type: :date_time attribute :kind, on: :read, type: :string diff --git a/lib/ioki/model/passenger/personal_discount.rb b/lib/ioki/model/passenger/personal_discount.rb index 00103ea2..d48c1a27 100644 --- a/lib/ioki/model/passenger/personal_discount.rb +++ b/lib/ioki/model/passenger/personal_discount.rb @@ -4,12 +4,15 @@ module Ioki module Model module Passenger 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 :redeemed_promo_code_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 :absolute_discount, on: :read, type: :object, class_name: 'Money' - attribute :absolute_discount_object, on: :read, type: :object, class_name: 'Money' + deprecated_attribute :absolute_discount_object, on: :read, type: :object, class_name: 'Money' attribute :channel, on: :read, type: :string attribute :consumed, on: :read, type: :boolean attribute :description, on: :read, type: :string @@ -17,7 +20,7 @@ class PersonalDiscount < Base attribute :maximum_usages, on: :read, type: :integer attribute :payment_method, on: [:read, :create], 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/passenger/personal_discount_type.rb b/lib/ioki/model/passenger/personal_discount_type.rb index 70c0f000..c0cc3f60 100644 --- a/lib/ioki/model/passenger/personal_discount_type.rb +++ b/lib/ioki/model/passenger/personal_discount_type.rb @@ -24,9 +24,9 @@ class PersonalDiscountType < Base attribute :fixed_price_per_ride, on: :read, type: :object, class_name: 'Money' attribute :price, on: :read, type: :object, class_name: 'Money' - attribute :personal_discount_type_id, on: :create, type: :integer - attribute :payment_method, on: :create, type: :object, class_name: 'PaymentMethod' - attribute :paypal_secure_element, on: :create, type: :string, omit_if_blank: true + # attribute :personal_discount_type_id, on: :create, type: :integer + # attribute :payment_method, on: :create, type: :object, class_name: 'PaymentMethod' + # attribute :paypal_secure_element, on: :create, type: :string, omit_if_blank: true deprecated_attribute :absolute_discount_object, on: :read, type: :object, class_name: 'Money' deprecated_attribute :price_object, on: :read, type: :object, class_name: 'Money' diff --git a/lib/ioki/model/passenger/phone_verification_request.rb b/lib/ioki/model/passenger/phone_verification_request.rb index f2337173..c87ebbbe 100644 --- a/lib/ioki/model/passenger/phone_verification_request.rb +++ b/lib/ioki/model/passenger/phone_verification_request.rb @@ -4,6 +4,8 @@ module Ioki module Model module Passenger class PhoneVerificationRequest < Base + attribute :client_challenge, type: :object, on: [:create, :read, :update], class_name: 'ClientChallenge' + attribute :captcha, type: :object, on: [:create, :read, :update], class_name: 'Captcha' attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/passenger/product.rb b/lib/ioki/model/passenger/product.rb index 85aa1a10..cf479792 100644 --- a/lib/ioki/model/passenger/product.rb +++ b/lib/ioki/model/passenger/product.rb @@ -4,6 +4,14 @@ module Ioki module Model module Passenger class Product < Base + attribute :features, type: :object, on: [:create, :read, :update], class_name: 'ProductFeatures' + attribute :default_map_bounding_box, type: :object, on: [:create, :read, :update], class_name: 'BoundingBox' + attribute :announcements, type: :array, on: [:create, :read, :update] + attribute :support_website_url, type: :string, on: [:create, :read, :update] + attribute :support_phone_number, type: :string, on: [:create, :read, :update] + attribute :support_email, type: :string, on: [:create, :read, :update] + attribute :help_url, type: :string, on: [:create, :read, :update] + attribute :display_stations_on_map, type: :boolean, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time @@ -11,26 +19,26 @@ class Product < Base attribute :name, on: :read attribute :provider, type: :object, on: :read, class_name: 'Provider' attribute :ad_hoc_bookable, on: :read, type: :boolean - attribute :announcement, on: :read, type: :object, class_name: 'Announcement' - attribute :area, on: :read, type: :object, class_name: 'Area' + deprecated_attribute :announcement, on: :read, type: :object, class_name: 'Announcement' + deprecated_attribute :area, on: :read, type: :object, class_name: 'Area' attribute :avatar, on: :read, type: :object, class_name: 'ImageUpload' attribute :avatar_darkmode, on: :read, type: :object, class_name: 'ImageUpload' - attribute :bounding_box, on: :read, type: :object, class_name: 'BoundingBox' + deprecated_attribute :bounding_box, on: :read, type: :object, class_name: 'BoundingBox' attribute :cancellation_statements, on: :read, type: :array, class_name: 'CancellationStatement' attribute :description, on: :read, type: :string attribute :fixed_stations, on: :read, type: :array, class_name: 'Station' attribute :payment_method_allowed_on_booking, on: :read, type: :boolean attribute :payment_method_required_on_booking, on: :read, type: :boolean attribute :personal_discount_types, on: :read, type: :array, class_name: 'PersonalDiscountType' - attribute :phone_number, on: :read, type: :string + deprecated_attribute :phone_number, on: :read, type: :string attribute :prebookable, on: :read, type: :boolean attribute :requires_fixed_station, on: :read, type: :boolean - attribute :ride_options, on: :read, type: :object, class_name: 'RideOptions' - attribute :ride_rating_criteria, on: :read, type: :array + deprecated_attribute :ride_options, on: :read, type: :object, class_name: 'RideOptions' + deprecated_attribute :ride_rating_criteria, on: :read, type: :array attribute :service_time_info, on: :read, type: :string - attribute :supports_passenger_cancellation_reason, on: :read, type: :boolean - attribute :supports_prebooking_ui_assistance, on: :read, type: :boolean - attribute :supports_updating_passengers_on_ride, on: :read, type: :boolean + deprecated_attribute :supports_passenger_cancellation_reason, on: :read, type: :boolean + deprecated_attribute :supports_prebooking_ui_assistance, on: :read, type: :boolean + deprecated_attribute :supports_updating_passengers_on_ride, on: :read, type: :boolean attribute :timezone, on: :read, type: :object, class_name: 'Timezone' attribute :tipping, on: :read, type: :object, class_name: 'Tipping' attribute :version, on: :read, type: :integer diff --git a/lib/ioki/model/passenger/provider.rb b/lib/ioki/model/passenger/provider.rb index 756428a9..098cb463 100644 --- a/lib/ioki/model/passenger/provider.rb +++ b/lib/ioki/model/passenger/provider.rb @@ -4,6 +4,8 @@ module Ioki module Model module Passenger class Provider < Base + attribute :custom_urls, type: :array, on: [:create, :read, :update] + attribute :ticketing_payment_method_types, type: :array, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/passenger/rating.rb b/lib/ioki/model/passenger/rating.rb index 6e88d73d..b6dec94f 100644 --- a/lib/ioki/model/passenger/rating.rb +++ b/lib/ioki/model/passenger/rating.rb @@ -4,19 +4,20 @@ module Ioki module Model module Passenger class Rating < Base + attribute :rating_line_items, type: :array, 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 :version, on: :read, type: :integer attribute :comment, on: [:read, :create], type: :string - attribute :driver_rating, on: [:read, :create], type: :integer, omit_if_nil_on: :create + deprecated_attribute :driver_rating, on: [:read, :create], type: :integer, omit_if_nil_on: :create attribute :editable, on: :read, type: :boolean - attribute :punctuality_rating, on: [:read, :create], type: :integer, omit_if_nil_on: :create - attribute :ride_rating, on: [:read, :create], type: :integer, omit_if_nil_on: :create - attribute :service_rating, on: [:read, :create], type: :integer, omit_if_nil_on: :create - attribute :vehicle_rating, on: [:read, :create], type: :integer, omit_if_nil_on: :create - attribute :waiting_time_rating, on: [:read, :create], type: :integer, omit_if_nil_on: :create + deprecated_attribute :punctuality_rating, on: [:read, :create], type: :integer, omit_if_nil_on: :create + deprecated_attribute :ride_rating, on: [:read, :create], type: :integer, omit_if_nil_on: :create + deprecated_attribute :service_rating, on: [:read, :create], type: :integer, omit_if_nil_on: :create + deprecated_attribute :vehicle_rating, on: [:read, :create], type: :integer, omit_if_nil_on: :create + deprecated_attribute :waiting_time_rating, on: [:read, :create], type: :integer, omit_if_nil_on: :create attribute :ride_version, on: :create, type: :integer end end diff --git a/lib/ioki/model/passenger/receipt.rb b/lib/ioki/model/passenger/receipt.rb index b7c560a4..6f168589 100644 --- a/lib/ioki/model/passenger/receipt.rb +++ b/lib/ioki/model/passenger/receipt.rb @@ -4,12 +4,13 @@ module Ioki module Model module Passenger 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 :receipt_type, on: :read, type: :string + deprecated_attribute :receipt_type, on: :read, type: :string end end end diff --git a/lib/ioki/model/passenger/redeemed_promo_code.rb b/lib/ioki/model/passenger/redeemed_promo_code.rb index 29f293ec..83bd0157 100644 --- a/lib/ioki/model/passenger/redeemed_promo_code.rb +++ b/lib/ioki/model/passenger/redeemed_promo_code.rb @@ -13,7 +13,7 @@ class RedeemedPromoCode < Base attribute :code, type: :string, on: [:read, :create] attribute :description, type: :string, on: :read attribute :product_id, type: :string, on: :read - attribute :promo_code_type, type: :string, on: :create + deprecated_attribute :promo_code_type, type: :string, on: :create attribute :title, type: :string, on: :read attribute :url, type: :string, on: :read end diff --git a/lib/ioki/model/passenger/ride.rb b/lib/ioki/model/passenger/ride.rb index 434e7612..e294fc69 100644 --- a/lib/ioki/model/passenger/ride.rb +++ b/lib/ioki/model/passenger/ride.rb @@ -4,6 +4,11 @@ module Ioki module Model module Passenger class Ride < Base + attribute :user_id, type: :string, on: [:create, :read, :update] + attribute :booked_solution, type: :object, on: [:create, :read, :update], class_name: 'OfferedSolution' + attribute :vehicle_approached_pickup, type: :boolean, on: [:create, :read, :update] + attribute :solution_id, type: :string, on: [:create, :read, :update] + attribute :show_pt_ticket_reminder, type: :boolean, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time @@ -15,8 +20,8 @@ class Ride < Base attribute :booking, type: :object, on: :read, class_name: 'Booking' attribute :pickup, type: :object, on: :read, class_name: 'CalculatedPoint' attribute :dropoff, type: :object, on: :read, class_name: 'CalculatedPoint' - attribute :storage_spaces, type: :integer, on: [:read, :create, :update], omit_if_blank_on: [:create, :update] - attribute :book_for_others, type: :boolean, on: [:read, :create, :update] + deprecated_attribute :storage_spaces, type: :integer, on: [:read, :create, :update], omit_if_blank_on: [:create, :update] + deprecated_attribute :book_for_others, type: :boolean, on: [:read, :create, :update] attribute :cancellable, type: :boolean, on: [:read, :create, :update] attribute :cancellation_reason, type: :string, on: [:read, :create, :update] attribute :cancellation_reason_translated, type: :string, on: [:read, :create, :update] @@ -25,13 +30,13 @@ class Ride < Base attribute :needs_cancellation_code, type: :boolean, on: [:read, :create, :update] attribute :passenger_can_be_called, type: :boolean, on: [:read, :create, :update] attribute :payment_method, type: :object, on: :read, class_name: 'PaymentMethod' - attribute :payment_state, type: :string, on: [:read, :create, :update] + deprecated_attribute :payment_state, type: :string, on: [:read, :create, :update] attribute :prebooked, type: :boolean, on: [:read, :create, :update] attribute :product_id, type: :string, on: [:read, :create, :update] attribute :public_transport_uri, type: :string, on: [:read, :create, :update] attribute :rateable, type: :boolean, on: [:read, :create, :update] attribute :rating, type: :object, on: :read, class_name: 'Rating' - attribute :receipts, type: :array, on: [:read, :create, :update] + deprecated_attribute :receipts, type: :array, on: [:read, :create, :update] attribute :route, type: :object, class_name: 'Route', on: [:read, :create, :update] attribute :state, type: :string, on: [:read, :create, :update] attribute :support_uri, type: :string, on: [:read, :create, :update] diff --git a/lib/ioki/model/passenger/ride_inquiry.rb b/lib/ioki/model/passenger/ride_inquiry.rb index 3e90cf35..12517a61 100644 --- a/lib/ioki/model/passenger/ride_inquiry.rb +++ b/lib/ioki/model/passenger/ride_inquiry.rb @@ -4,6 +4,7 @@ module Ioki module Model module Passenger class RideInquiry < Base + attribute :passengers, type: :array, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time @@ -17,7 +18,7 @@ class RideInquiry < Base attribute :assistances, on: :read, type: :array, class_name: 'Assistance' attribute :availability, on: :read, type: :object, class_name: 'Availability' attribute :constraints, on: :read, type: :object, class_name: 'Constraints' - attribute :errors, on: :read, type: :array + deprecated_attribute :errors, on: :read, type: :array attribute :estimations, on: :read, type: :array, class_name: 'Estimation' end end diff --git a/lib/ioki/model/passenger/ride_option.rb b/lib/ioki/model/passenger/ride_option.rb index 21c10dbd..0b16a539 100644 --- a/lib/ioki/model/passenger/ride_option.rb +++ b/lib/ioki/model/passenger/ride_option.rb @@ -4,7 +4,9 @@ module Ioki module Model module Passenger class RideOption < Base - attribute :name, on: [:read, :create], type: :string + attribute :default_value, type: :boolean, on: [:create, :read, :update] + attribute :slug, type: :string, on: [:create, :read, :update] + deprecated_attribute :name, on: [:read, :create], type: :string attribute :value, on: :create, type: [:string, :boolean, :integer] attribute :type, on: :read, type: :string diff --git a/lib/ioki/model/passenger/ride_passenger.rb b/lib/ioki/model/passenger/ride_passenger.rb index 8ec595a6..8be51956 100644 --- a/lib/ioki/model/passenger/ride_passenger.rb +++ b/lib/ioki/model/passenger/ride_passenger.rb @@ -4,17 +4,17 @@ module Ioki module Model module Passenger class RidePassenger < Base - attribute :bahncard, on: [:read, :create, :update], omit_if_blank_on: [:create, :update], type: :boolean - attribute :blue_badge, on: [:read, :create, :update], omit_if_blank_on: [:create, :update], type: :boolean + deprecated_attribute :bahncard, on: [:read, :create, :update], omit_if_blank_on: [:create, :update], type: :boolean + deprecated_attribute :blue_badge, on: [:read, :create, :update], omit_if_blank_on: [:create, :update], type: :boolean attribute :first_name, on: :read, type: :string attribute :last_name, on: :read, type: :string - attribute :public_transport_ticket, + deprecated_attribute :public_transport_ticket, on: [:read, :create, :update], omit_if_blank_on: [:create, :update], type: :boolean attribute :type, on: [:create, :update], type: :string - attribute :walker, on: [:read, :create, :update], omit_if_blank_on: [:create, :update], type: :boolean - attribute :wheelchair, on: [:read, :create, :update], omit_if_blank_on: [:create, :update], type: :boolean + deprecated_attribute :walker, on: [:read, :create, :update], omit_if_blank_on: [:create, :update], type: :boolean + deprecated_attribute :wheelchair, on: [:read, :create, :update], omit_if_blank_on: [:create, :update], type: :boolean attribute :options, on: [:read, :create], type: :array, class_name: 'PassengerOption', omit_if_blank_on: :create end end diff --git a/lib/ioki/model/passenger/service_credit.rb b/lib/ioki/model/passenger/service_credit.rb index b2ec292a..194740cc 100644 --- a/lib/ioki/model/passenger/service_credit.rb +++ b/lib/ioki/model/passenger/service_credit.rb @@ -4,6 +4,7 @@ module Ioki module Model module Passenger class ServiceCredit < Base + attribute :paypal_secure_element, 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 @@ -11,7 +12,7 @@ class ServiceCredit < Base attribute :balance, type: :object, on: :read, class_name: 'Money' attribute :cost, type: :object, on: :read, class_name: 'Money' attribute :payment_method, type: :object, on: :read, class_name: 'PaymentMethod' - attribute :receipts, type: :array, on: :read, class_name: 'Receipt' + deprecated_attribute :receipts, type: :array, on: :read, class_name: 'Receipt' attribute :value, type: :object, on: :read, class_name: 'Money' end end diff --git a/lib/ioki/model/passenger/station.rb b/lib/ioki/model/passenger/station.rb index 253f8a0e..6eafa5aa 100644 --- a/lib/ioki/model/passenger/station.rb +++ b/lib/ioki/model/passenger/station.rb @@ -4,6 +4,7 @@ module Ioki module Model module Passenger class Station < Base + attribute :visible_on_map, type: :boolean, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/passenger/ticketing/product.rb b/lib/ioki/model/passenger/ticketing/product.rb index b18a9e4e..8dc2fabd 100644 --- a/lib/ioki/model/passenger/ticketing/product.rb +++ b/lib/ioki/model/passenger/ticketing/product.rb @@ -5,6 +5,7 @@ module Model module Passenger module Ticketing class Product < Base + attribute :renewable, type: :boolean, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/passenger/ticketing/ticket.rb b/lib/ioki/model/passenger/ticketing/ticket.rb index 5ede57d2..d0c6a6c2 100644 --- a/lib/ioki/model/passenger/ticketing/ticket.rb +++ b/lib/ioki/model/passenger/ticketing/ticket.rb @@ -5,6 +5,7 @@ module Model module Passenger module Ticketing class Ticket < Base + attribute :vendor_ticket_details, type: :object, on: [:create, :read, :update], class_name: 'Eos' attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/passenger/ticketing/voucher_renewal.rb b/lib/ioki/model/passenger/ticketing/voucher_renewal.rb index 98142d0f..557a35b3 100644 --- a/lib/ioki/model/passenger/ticketing/voucher_renewal.rb +++ b/lib/ioki/model/passenger/ticketing/voucher_renewal.rb @@ -9,8 +9,12 @@ def self.schema_path 'passenger_api--v1--ticketing--voucher_renewal_information' end - attribute :payment_method, on: :create, type: :object, class_name: 'Ioki::Model::Passenger::PaymentMethod' - attribute :paypal_secure_element, on: :create, type: :string + attribute :valid_until, type: :string, on: [:create, :read, :update] + attribute :valid_from, type: :string, on: [:create, :read, :update] + attribute :renewable, type: :boolean, on: [:create, :read, :update] + attribute :type, type: :string, on: [:create, :read, :update] + # attribute :payment_method, on: :create, type: :object, class_name: 'Ioki::Model::Passenger::PaymentMethod' + # attribute :paypal_secure_element, on: :create, type: :string end end end diff --git a/lib/ioki/model/passenger/tip.rb b/lib/ioki/model/passenger/tip.rb index de77994b..c266e321 100644 --- a/lib/ioki/model/passenger/tip.rb +++ b/lib/ioki/model/passenger/tip.rb @@ -4,6 +4,8 @@ module Ioki module Model module Passenger class Tip < Base + attribute :paypal_secure_element, type: :string, on: [:create, :read, :update] + attribute :payment_method, type: :object, on: [:create, :read, :update], class_name: 'PaymentMethodUseSchema' attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/passenger/tip_create.rb b/lib/ioki/model/passenger/tip_create.rb index f35deac9..5cf58d87 100644 --- a/lib/ioki/model/passenger/tip_create.rb +++ b/lib/ioki/model/passenger/tip_create.rb @@ -8,6 +8,7 @@ def self.schema_path 'passenger_api--v1--tip_schema' end + attribute :paypal_secure_element, type: :string, on: [:create, :read, :update] attribute :amount, on: :create, type: :integer attribute :payment_method, on: :create, type: :object, class_name: 'PaymentMethod' end diff --git a/lib/ioki/model/passenger/user.rb b/lib/ioki/model/passenger/user.rb index a3f55c69..7304b0b4 100644 --- a/lib/ioki/model/passenger/user.rb +++ b/lib/ioki/model/passenger/user.rb @@ -4,6 +4,10 @@ module Ioki module Model module Passenger class User < Base + attribute :terms_accepted, type: :boolean, on: [:create, :read, :update] + attribute :additional_data, type: :object, on: [:create, :read, :update], class_name: 'AdditionalDataSchema' + attribute :available_notification_channels, type: :array, on: [:create, :read, :update] + attribute :logpay_support_details, type: :object, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/passenger/vehicle.rb b/lib/ioki/model/passenger/vehicle.rb index 57fc141e..13052317 100644 --- a/lib/ioki/model/passenger/vehicle.rb +++ b/lib/ioki/model/passenger/vehicle.rb @@ -4,6 +4,9 @@ module Ioki module Model module Passenger class Vehicle < Base + attribute :door_control_available, type: :boolean, on: [:create, :read, :update] + attribute :supports_open_door_requests, type: :boolean, on: [:create, :read, :update] + attribute :autonomous, type: :boolean, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/platform/announcement.rb b/lib/ioki/model/platform/announcement.rb index 2521ddb6..79088096 100644 --- a/lib/ioki/model/platform/announcement.rb +++ b/lib/ioki/model/platform/announcement.rb @@ -4,6 +4,9 @@ module Ioki module Model module Platform class Announcement < Base + attribute :resource_id, type: :string, on: [:create, :read, :update] + attribute :zone_id, type: :string, on: [:create, :read, :update] + attribute :targets, type: :array, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/platform/area.rb b/lib/ioki/model/platform/area.rb index 67a17ec8..db82a467 100644 --- a/lib/ioki/model/platform/area.rb +++ b/lib/ioki/model/platform/area.rb @@ -4,6 +4,9 @@ module Ioki module Model module Platform class Area < Base + attribute :bounding_box, type: :object, on: [:create, :read, :update], class_name: 'BoundingBox' + attribute :legend_description_translations, type: :object, on: [:create, :read, :update], class_name: 'MultilanguageString' + attribute :legend_title_translations, type: :object, on: [:create, :read, :update], class_name: 'MultilanguageString' attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/platform/assistance.rb b/lib/ioki/model/platform/assistance.rb index 4e9a9f9b..fcdf2bba 100644 --- a/lib/ioki/model/platform/assistance.rb +++ b/lib/ioki/model/platform/assistance.rb @@ -8,6 +8,7 @@ def self.schema_path 'platform_api--v20210101--ride_inquiry--assistance' end + attribute :error_code, type: :string, on: [:create, :read, :update] attribute :href, on: :read, type: :string attribute :text, on: :read, type: :string attribute :title, on: :read, type: :string diff --git a/lib/ioki/model/platform/booking.rb b/lib/ioki/model/platform/booking.rb index e772cbfa..ee4c71b1 100644 --- a/lib/ioki/model/platform/booking.rb +++ b/lib/ioki/model/platform/booking.rb @@ -4,6 +4,8 @@ module Ioki module Model module Platform class Booking < Base + attribute :paypal_secure_element, type: :string, on: [:create, :read, :update] + attribute :solution_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 diff --git a/lib/ioki/model/platform/calculated_point.rb b/lib/ioki/model/platform/calculated_point.rb index fe5a70b2..b0109c1c 100644 --- a/lib/ioki/model/platform/calculated_point.rb +++ b/lib/ioki/model/platform/calculated_point.rb @@ -4,6 +4,7 @@ module Ioki module Model module Platform class CalculatedPoint < Base + attribute :communicated_time, 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 diff --git a/lib/ioki/model/platform/cancellation_statement.rb b/lib/ioki/model/platform/cancellation_statement.rb index d3017cb2..1fcd858e 100644 --- a/lib/ioki/model/platform/cancellation_statement.rb +++ b/lib/ioki/model/platform/cancellation_statement.rb @@ -4,6 +4,12 @@ module Ioki module Model module Platform 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 :updated_at, type: :string, on: [:create, :read, :update] + attribute :created_at, type: :string, on: [:create, :read, :update] + attribute :id, type: :string, on: [:create, :read, :update] + attribute :type, type: :string, on: [:create, :read, :update] attribute :group, on: :read, type: :string attribute :identifier, on: :read, type: :string attribute :product_id, on: :read, type: :string diff --git a/lib/ioki/model/platform/captcha.rb b/lib/ioki/model/platform/captcha.rb index 00455f2a..cc898aaa 100644 --- a/lib/ioki/model/platform/captcha.rb +++ b/lib/ioki/model/platform/captcha.rb @@ -12,7 +12,7 @@ class Captcha < Base attribute :question_prompt, on: :read, type: :string attribute :image_url, on: :read, type: :string - attribute :solution, on: :create, type: :string + # attribute :solution, on: :create, type: :string end end end diff --git a/lib/ioki/model/platform/client.rb b/lib/ioki/model/platform/client.rb index efa8b246..e13eea9f 100644 --- a/lib/ioki/model/platform/client.rb +++ b/lib/ioki/model/platform/client.rb @@ -4,6 +4,34 @@ module Ioki module Model module Platform class Client < Base + attribute :web_user_account_deletion_slug, type: :string, on: [:create, :read, :update] + attribute :terms_of_service_url_override, type: :string, on: [:create, :read, :update] + attribute :supports_web_deletion_requests, type: :boolean, on: [:create, :read, :update] + attribute :support_website_url_override, type: :string, on: [:create, :read, :update] + attribute :support_phone_number_override, type: :string, on: [:create, :read, :update] + attribute :support_email_override, type: :string, on: [:create, :read, :update] + attribute :render_deprecated_attributes, type: :boolean, on: [:create, :read, :update] + attribute :provider_id, type: :string, on: [:create, :read, :update] + attribute :product_ids, type: :array, on: [:create, :read, :update] + attribute :privacy_policy_url_override, type: :string, on: [:create, :read, :update] + attribute :platform, type: :string, on: [:create, :read, :update] + attribute :ios_team_id, type: :string, on: [:create, :read, :update] + attribute :ios_apple_identifier, type: :string, on: [:create, :read, :update] + attribute :ios_bundle_identifier, type: :string, on: [:create, :read, :update] + attribute :imprint_url_override, type: :string, on: [:create, :read, :update] + attribute :imprint_override, type: :string, on: [:create, :read, :update] + attribute :help_url_override, type: :string, on: [:create, :read, :update] + attribute :distribution_url, type: :string, on: [:create, :read, :update] + attribute :default_user_segment_id, type: :string, on: [:create, :read, :update] + attribute :default_map_zoom_level, type: :number, on: [:create, :read, :update] + attribute :default_map_center_lng, type: :number, on: [:create, :read, :update] + attribute :default_map_center_lat, type: :number, on: [:create, :read, :update] + attribute :deeplink_scheme, type: :string, on: [:create, :read, :update] + attribute :client_type, type: :string, on: [:create, :read, :update] + attribute :brand_color_override, type: :string, on: [:create, :read, :update] + attribute :android_package_name, type: :string, on: [:create, :read, :update] + attribute :android_certificate_fingerprints, type: :array, on: [:create, :read, :update] + attribute :accessible_user_segment_ids, type: :array, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :allows_external_payment, on: :read, type: :boolean attribute :current_version, on: :read, type: :string diff --git a/lib/ioki/model/platform/client_challenge.rb b/lib/ioki/model/platform/client_challenge.rb index a5b02c09..61d55b0f 100644 --- a/lib/ioki/model/platform/client_challenge.rb +++ b/lib/ioki/model/platform/client_challenge.rb @@ -10,8 +10,8 @@ class ClientChallenge < Base attribute :updated_at, on: :read, type: :date_time attribute :challenge, on: :read, type: :string - attribute :solution, on: :create, type: :string - attribute :nonce, on: :create, type: :string + # attribute :solution, on: :create, type: :string + # attribute :nonce, on: :create, type: :string end end end diff --git a/lib/ioki/model/platform/driver.rb b/lib/ioki/model/platform/driver.rb index 51a094e7..c467dae2 100644 --- a/lib/ioki/model/platform/driver.rb +++ b/lib/ioki/model/platform/driver.rb @@ -4,6 +4,8 @@ module Ioki module Model module Platform class Driver < Base + attribute :operator_id, type: :string, on: [:create, :read, :update] + attribute :password_disclosed, type: :boolean, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/platform/line.rb b/lib/ioki/model/platform/line.rb index 806f6732..fddde92e 100644 --- a/lib/ioki/model/platform/line.rb +++ b/lib/ioki/model/platform/line.rb @@ -4,6 +4,8 @@ module Ioki module Model module Platform class Line < Base + attribute :slug, type: :string, on: [:create, :read, :update] + attribute :mode, 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 @@ -13,7 +15,7 @@ class Line < Base attribute :variant, on: [:read, :create, :update], type: :string attribute :skip_time_window_check, on: [:read, :create, :update], type: :boolean attribute :line_stops, type: :array, on: :read, class_name: 'LineStop' - attribute :version, on: :read, type: :integer + # attribute :version, on: :read, type: :integer end end end diff --git a/lib/ioki/model/platform/line_stop.rb b/lib/ioki/model/platform/line_stop.rb index 041953eb..d3ef4bb7 100644 --- a/lib/ioki/model/platform/line_stop.rb +++ b/lib/ioki/model/platform/line_stop.rb @@ -16,7 +16,7 @@ class LineStop < Base attribute :supports_dropoff, on: [:read, :create, :update], type: :boolean attribute :supports_pass_through, on: [:read, :create, :update], type: :boolean attribute :station_id, on: [:read, :create], type: :string - attribute :version, on: :read, type: :integer + # attribute :version, on: :read, type: :integer end end end diff --git a/lib/ioki/model/platform/matching_configuration.rb b/lib/ioki/model/platform/matching_configuration.rb index 9647bf65..7e2e0025 100644 --- a/lib/ioki/model/platform/matching_configuration.rb +++ b/lib/ioki/model/platform/matching_configuration.rb @@ -4,6 +4,43 @@ module Ioki module Model module Platform class MatchingConfiguration < Base + attribute :drt_sub_area_id, type: :string, on: [:create, :read, :update] + attribute :time_window_collapse_threshold, type: :integer, on: [:create, :read, :update] + attribute :streak_split_buffer_threshold, type: :integer, on: [:create, :read, :update] + attribute :ride_distance_min, type: :integer, on: [:create, :read, :update] + attribute :prevent_station_to_station_matching, type: :boolean, on: [:create, :read, :update] + attribute :prevent_address_to_address_matching, type: :boolean, on: [:create, :read, :update] + attribute :penalty_per_passenger_walking_second, type: :number, on: [:create, :read, :update] + attribute :penalty_per_passenger_waiting_second, type: :number, on: [:create, :read, :update] + attribute :penalty_per_empty_duration, type: :number, on: [:create, :read, :update] + attribute :penalty_per_driving_second, type: :number, on: [:create, :read, :update] + attribute :penalty_per_driving_duration, type: :number, on: [:create, :read, :update] + attribute :penalty_per_delay_second, type: :number, on: [:create, :read, :update] + attribute :penalty_per_cost_benefit_ratio, type: :number, on: [:create, :read, :update] + attribute :penalty_per_additional_empty_duration, type: :number, on: [:create, :read, :update] + attribute :penalty_per_additional_driving_duration, type: :number, on: [:create, :read, :update] + attribute :minimum_detour_duration, type: :integer, on: [:create, :read, :update] + attribute :maximum_detour_duration, type: :integer, on: [:create, :read, :update] + attribute :max_walking_duration_dropoff, type: :integer, on: [:create, :read, :update] + attribute :max_walking_duration_pickup, type: :integer, on: [:create, :read, :update] + attribute :max_walking_duration, type: :integer, on: [:create, :read, :update] + attribute :max_request_time_deviation, type: :integer, on: [:create, :read, :update] + attribute :matching_mode_pickup, type: :string, on: [:create, :read, :update] + attribute :matching_mode_dropoff, type: :string, on: [:create, :read, :update] + attribute :matching_max_enclosed_tasks, type: :integer, on: [:create, :read, :update] + attribute :matching_considered_stations, type: :integer, on: [:create, :read, :update] + attribute :gain_per_ride_duration, type: :number, on: [:create, :read, :update] + attribute :gain_per_passenger_second, type: :number, on: [:create, :read, :update] + attribute :gain_per_passenger_duration, type: :number, on: [:create, :read, :update] + attribute :gain_per_passenger_direct_routing_duration, type: :number, on: [:create, :read, :update] + attribute :gain_per_loaded_duration, type: :number, on: [:create, :read, :update] + attribute :gain_per_additional_ride_duration, type: :number, on: [:create, :read, :update] + attribute :gain_per_additional_passenger_duration, type: :number, on: [:create, :read, :update] + attribute :gain_per_additional_passenger_direct_routing_duration, type: :number, on: [:create, :read, :update] + attribute :gain_per_additional_loaded_duration, type: :number, on: [:create, :read, :update] + attribute :detour_duration_factor, type: :number, on: [:create, :read, :update] + attribute :description, type: :string, on: [:create, :read, :update] + attribute :version, type: :integer, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/platform/multilanguage_string.rb b/lib/ioki/model/platform/multilanguage_string.rb index 73601fd5..70ae6dc9 100644 --- a/lib/ioki/model/platform/multilanguage_string.rb +++ b/lib/ioki/model/platform/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 attribute :name, on: :read, type: :string attribute :translations, on: :read, type: :array, class_name: 'Translation' diff --git a/lib/ioki/model/platform/operator.rb b/lib/ioki/model/platform/operator.rb index 23f6ccfd..978dbc2c 100644 --- a/lib/ioki/model/platform/operator.rb +++ b/lib/ioki/model/platform/operator.rb @@ -4,6 +4,8 @@ module Ioki module Model module Platform class Operator < Base + attribute :locale, type: :string, on: [:create, :read, :update] + attribute :matching_rank, type: :integer, on: [:create, :read, :update] attribute :type, on: :read, type: :string @@ -20,9 +22,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/platform/passenger_option.rb b/lib/ioki/model/platform/passenger_option.rb index 1487022e..79e741e5 100644 --- a/lib/ioki/model/platform/passenger_option.rb +++ b/lib/ioki/model/platform/passenger_option.rb @@ -4,7 +4,9 @@ module Ioki module Model module Platform class PassengerOption < Base - attribute :name, on: [:read, :create], type: :string + attribute :accessibility_information_translations, type: :object, on: [:create, :read, :update], class_name: 'MultilanguageString' + attribute :default_value, type: :string, on: [:create, :read, :update] + deprecated_attribute :name, on: [:read, :create], type: :string attribute :slug, on: [:read, :create], type: :string attribute :value, on: :create, type: [:string, :boolean, :integer] diff --git a/lib/ioki/model/platform/personal_discount.rb b/lib/ioki/model/platform/personal_discount.rb index 25c7b28f..452e9cdc 100644 --- a/lib/ioki/model/platform/personal_discount.rb +++ b/lib/ioki/model/platform/personal_discount.rb @@ -4,6 +4,8 @@ module Ioki module Model module Platform 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, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time @@ -16,7 +18,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/platform/place.rb b/lib/ioki/model/platform/place.rb index 4c8a07b2..4c40c5c9 100644 --- a/lib/ioki/model/platform/place.rb +++ b/lib/ioki/model/platform/place.rb @@ -4,6 +4,11 @@ module Ioki module Model module Platform class Place < Base + attribute :description, type: :string, on: [:create, :read, :update] + attribute :country, type: :string, on: [:create, :read, :update] + attribute :county, type: :string, on: [:create, :read, :update] + attribute :slug, type: :string, on: [:create, :read, :update] + attribute :version, type: :integer, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/platform/product.rb b/lib/ioki/model/platform/product.rb index ee0efda6..6848e900 100644 --- a/lib/ioki/model/platform/product.rb +++ b/lib/ioki/model/platform/product.rb @@ -4,6 +4,7 @@ module Ioki module Model module Platform class Product < Base + attribute :vehicle_operator_information, 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 @@ -21,8 +22,8 @@ class Product < Base attribute :payment_method_allowed_on_booking, on: :read, type: :boolean attribute :payment_method_required_on_booking, on: :read, type: :boolean attribute :prebookable, on: :read, type: :boolean - attribute :ride_options, on: :read, type: :object, class_name: 'RideOptions' - attribute :ride_rating_criteria, on: :read, type: :array + deprecated_attribute :ride_options, on: :read, type: :object, class_name: 'RideOptions' + deprecated_attribute :ride_rating_criteria, on: :read, type: :array attribute :service_time_info, on: :read, type: :string attribute :slug, on: [:read, :update], type: :string attribute :support_email, on: :read, type: :string @@ -31,21 +32,21 @@ class Product < Base attribute :tableau_url, on: :read, type: :string attribute :task_lists_planning_url, on: :read, type: :string attribute :timezone, on: :read, type: :object, class_name: 'Timezone' - attribute :vehicle_operator_info, on: :read, type: :string + # attribute :vehicle_operator_info, on: :read, type: :string attribute :vehicles_planning_url, on: :read, type: :string - attribute :announcement, on: :read, type: :object, class_name: 'Announcement' + deprecated_attribute :announcement, on: :read, type: :object, class_name: 'Announcement' attribute :announcements, on: :read, type: :array, class_name: 'Announcement' deprecated_attribute :area, type: :object, on: :read, class_name: 'GeoJson' - attribute :bounding_box, on: :read, type: :object, class_name: 'BoundingBox' + deprecated_attribute :bounding_box, on: :read, type: :object, class_name: 'BoundingBox' attribute :default_map_bounding_box, on: :read, type: :object, class_name: 'BoundingBox' attribute :features, on: :read, type: :object, class_name: 'ProductFeatures' attribute :driver_cancellation_statements, on: :read, type: :array, class_name: 'CancellationStatement' attribute :passenger_cancellation_statements, on: :read, type: :array, class_name: 'CancellationStatement' attribute :fixed_stations, on: :read, type: :array, class_name: 'Station' attribute :matching_configurations, on: :read, type: :array, class_name: 'MatchingConfiguration' - attribute :passenger_options, on: :read, type: :array, class_name: 'PassengerOption' - attribute :passenger_types, on: :read, type: :array, class_name: 'PassengerType' - attribute :product_ride_options, on: :read, type: :array, class_name: 'RideOption' + deprecated_attribute :passenger_options, on: :read, type: :array, class_name: 'PassengerOption' + deprecated_attribute :passenger_types, on: :read, type: :array, class_name: 'PassengerType' + deprecated_attribute :product_ride_options, on: :read, type: :array, class_name: 'RideOption' attribute :provider, type: :object, on: :read, class_name: 'Provider' attribute :tipping, on: :read, type: :object, class_name: 'Tipping' end diff --git a/lib/ioki/model/platform/provider.rb b/lib/ioki/model/platform/provider.rb index 0b18a57a..ebf6c23d 100644 --- a/lib/ioki/model/platform/provider.rb +++ b/lib/ioki/model/platform/provider.rb @@ -4,6 +4,7 @@ module Ioki module Model module Platform class Provider < Base + attribute :custom_urls, type: :array, on: [:create, :read, :update] attribute :type, on: :read, type: :string @@ -64,7 +65,7 @@ class Provider < Base on: :read, type: :string - attribute :other_url, + deprecated_attribute :other_url, on: :read, type: :string diff --git a/lib/ioki/model/platform/rating.rb b/lib/ioki/model/platform/rating.rb index b75a857d..cebc5691 100644 --- a/lib/ioki/model/platform/rating.rb +++ b/lib/ioki/model/platform/rating.rb @@ -4,21 +4,22 @@ module Ioki module Model module Platform class Rating < Base + attribute :rating_line_items, type: :array, 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 :comment, on: [:read, :create, :update], type: :string - attribute :driver_rating, on: [:read, :create, :update], type: :integer + deprecated_attribute :driver_rating, on: [:read, :create, :update], type: :integer attribute :editable, on: :read, type: :boolean - attribute :punctuality_rating, on: [:read, :create, :update], type: :integer - attribute :ride_rating, on: [:read, :create, :update], type: :integer + deprecated_attribute :punctuality_rating, on: [:read, :create, :update], type: :integer + deprecated_attribute :ride_rating, on: [:read, :create, :update], type: :integer attribute :ride_version, on: [:create, :update], type: :integer, unvalidated: true - attribute :service_rating, on: [:read, :create, :update], type: :integer - attribute :vehicle_cleanliness_rating, on: [:read, :create, :update], type: :integer - attribute :vehicle_rating, on: [:read, :create, :update], type: :integer + deprecated_attribute :service_rating, on: [:read, :create, :update], type: :integer + deprecated_attribute :vehicle_cleanliness_rating, on: [:read, :create, :update], type: :integer + deprecated_attribute :vehicle_rating, on: [:read, :create, :update], type: :integer attribute :version, on: [:read, :update], type: :integer - attribute :waiting_time_rating, on: [:read, :create, :update], type: :integer + deprecated_attribute :waiting_time_rating, on: [:read, :create, :update], type: :integer end end end diff --git a/lib/ioki/model/platform/receipt.rb b/lib/ioki/model/platform/receipt.rb index 9383183e..2c37a73d 100644 --- a/lib/ioki/model/platform/receipt.rb +++ b/lib/ioki/model/platform/receipt.rb @@ -4,15 +4,16 @@ module Ioki module Model module Platform 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/platform/ride.rb b/lib/ioki/model/platform/ride.rb index 6aa641d9..5e585a1e 100644 --- a/lib/ioki/model/platform/ride.rb +++ b/lib/ioki/model/platform/ride.rb @@ -4,11 +4,18 @@ module Ioki module Model module Platform class Ride < Base + attribute :phone_calls, type: :array, on: [:create, :read, :update] + attribute :cancellation_statement, type: :object, on: [:create, :read, :update], class_name: 'CancellationStatement' + attribute :last_serving_driver_id, type: :string, on: [:create, :read, :update] + attribute :passenger_note_to_driver, type: :string, on: [:create, :read, :update] + attribute :ride_series_id, type: :string, on: [:create, :read, :update] + attribute :creator_type, type: :string, on: [:create, :read, :update] + attribute :creator_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 :book_for_others, on: [:read, :create, :update], type: :boolean + deprecated_attribute :book_for_others, on: [:read, :create, :update], type: :boolean attribute :booking, type: :object, on: :read, class_name: 'Booking' attribute :cancellable, on: :read, type: :boolean attribute :cancellation_reason, on: :read, type: :string @@ -27,7 +34,7 @@ class Ride < Base attribute :passenger_can_be_called, on: :read, type: :boolean attribute :passengers, type: :array, on: [:create, :read], class_name: 'RidePassenger' attribute :payment_method, on: :read, type: :object, class_name: 'PaymentMethod' - attribute :payment_state, on: :read, type: :string + deprecated_attribute :payment_state, on: :read, type: :string attribute :pickup, type: :object, on: :read, class_name: 'CalculatedPoint' attribute :pickup_task, on: :read, type: :object, class_name: 'Task' attribute :prebooked, on: :read, type: :boolean @@ -35,10 +42,10 @@ class Ride < Base attribute :public_transport_uri, on: :read, type: :string attribute :rateable, on: :read, type: :boolean attribute :rating, type: :object, on: :read, class_name: 'Rating' - attribute :receipts, on: :read, type: :array, class_name: 'Receipt' + deprecated_attribute :receipts, on: :read, type: :array, class_name: 'Receipt' attribute :route, on: :read, type: :object, class_name: 'Route' attribute :state, type: :string, on: :read - attribute :storage_spaces, type: :integer, on: [:read, :create, :update], omit_if_blank_on: [:create, :update] + deprecated_attribute :storage_spaces, type: :integer, on: [:read, :create, :update], omit_if_blank_on: [:create, :update] attribute :support_uri, on: :read, type: :string attribute :tippable, on: :read, type: :boolean attribute :user, type: :object, on: :read, class_name: 'User' diff --git a/lib/ioki/model/platform/ride_inquiry.rb b/lib/ioki/model/platform/ride_inquiry.rb index d59d5b0d..b376bc72 100644 --- a/lib/ioki/model/platform/ride_inquiry.rb +++ b/lib/ioki/model/platform/ride_inquiry.rb @@ -4,6 +4,7 @@ module Ioki module Model module Platform class RideInquiry < Base + attribute :passengers, type: :array, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time @@ -12,7 +13,7 @@ class RideInquiry < Base attribute :availability, on: :read, type: :object, class_name: 'Availability' attribute :constraints, on: :read, type: :object, class_name: 'Constraints' attribute :destination, on: :create, type: :object, class_name: 'RequestedPoint', unvalidated: true - attribute :errors, on: :read, type: :array + deprecated_attribute :errors, on: :read, type: :array attribute :estimations, on: :read, type: :array, class_name: 'Estimation' attribute :origin, on: :create, type: :object, class_name: 'RequestedPoint', unvalidated: true end diff --git a/lib/ioki/model/platform/ride_inquiry_link.rb b/lib/ioki/model/platform/ride_inquiry_link.rb index 00d7f381..b42a5325 100644 --- a/lib/ioki/model/platform/ride_inquiry_link.rb +++ b/lib/ioki/model/platform/ride_inquiry_link.rb @@ -8,6 +8,7 @@ def self.schema_path 'platform_api--v20210101--ride_inquiry--links' end + attribute :type, type: :string, on: [:create, :read, :update] attribute :android, on: :read, type: :object, class_name: 'RideInquiryLinkAndroid' attribute :ios, on: :read, type: :object, class_name: 'RideInquiryLinkIos' attribute :universal_link, on: :read, type: :string diff --git a/lib/ioki/model/platform/ride_option.rb b/lib/ioki/model/platform/ride_option.rb index 661ca9cb..ea7a522c 100644 --- a/lib/ioki/model/platform/ride_option.rb +++ b/lib/ioki/model/platform/ride_option.rb @@ -4,7 +4,9 @@ module Ioki module Model module Platform class RideOption < Base - attribute :name, on: [:read, :create], type: :string + attribute :accessibility_information_translations, type: :object, on: [:create, :read, :update], class_name: 'MultilanguageString' + attribute :default_value, type: :boolean, on: [:create, :read, :update] + deprecated_attribute :name, on: [:read, :create], type: :string attribute :slug, on: [:read, :create], type: :string attribute :value, on: :create, type: [:string, :boolean, :integer] diff --git a/lib/ioki/model/platform/ride_passenger.rb b/lib/ioki/model/platform/ride_passenger.rb index f4f32c2a..38647136 100644 --- a/lib/ioki/model/platform/ride_passenger.rb +++ b/lib/ioki/model/platform/ride_passenger.rb @@ -5,11 +5,11 @@ module Model module Platform class RidePassenger < Base attribute :type, type: :string, on: [:create, :update] - attribute :bahncard, type: :boolean, on: [:create, :update], omit_if_blank_on: [:create, :update] - attribute :blue_badge, type: :boolean, on: [:create, :update], omit_if_blank_on: [:create, :update] - attribute :public_transport_ticket, type: :boolean, on: [:create, :update], omit_if_blank_on: [:create, :update] - attribute :walker, type: :boolean, on: [:create, :update], omit_if_blank_on: [:create, :update] - attribute :wheelchair, type: :boolean, on: [:create, :update], omit_if_blank_on: [:create, :update] + deprecated_attribute :bahncard, type: :boolean, on: [:create, :update], omit_if_blank_on: [:create, :update] + deprecated_attribute :blue_badge, type: :boolean, on: [:create, :update], omit_if_blank_on: [:create, :update] + deprecated_attribute :public_transport_ticket, type: :boolean, on: [:create, :update], omit_if_blank_on: [:create, :update] + deprecated_attribute :walker, type: :boolean, on: [:create, :update], omit_if_blank_on: [:create, :update] + deprecated_attribute :wheelchair, type: :boolean, on: [:create, :update], omit_if_blank_on: [:create, :update] attribute :options, on: [:read, :create], type: :array, class_name: 'PassengerOption' end end diff --git a/lib/ioki/model/platform/service_credit_charge.rb b/lib/ioki/model/platform/service_credit_charge.rb index 5a06c2b2..3585ba7d 100644 --- a/lib/ioki/model/platform/service_credit_charge.rb +++ b/lib/ioki/model/platform/service_credit_charge.rb @@ -4,6 +4,7 @@ module Ioki module Model module Platform class ServiceCreditCharge < Base + attribute :service_credit_deactivation, type: :object, on: [:create, :read, :update], class_name: 'ServiceCreditDeactivation' attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time diff --git a/lib/ioki/model/platform/station.rb b/lib/ioki/model/platform/station.rb index 34aa6d8e..b9ad055b 100644 --- a/lib/ioki/model/platform/station.rb +++ b/lib/ioki/model/platform/station.rb @@ -4,6 +4,18 @@ module Ioki module Model module Platform class Station < Base + attribute :parking_time, type: :integer, on: [:create, :read, :update] + attribute :walker_boarding_time, type: :integer, on: [:create, :read, :update] + attribute :wheelchair_boarding_time, type: :integer, on: [:create, :read, :update] + attribute :boarding_time, type: :integer, on: [:create, :read, :update] + attribute :station_category_id, type: :string, on: [:create, :read, :update] + attribute :announcements, type: :array, on: [:create, :read, :update] + attribute :tariff_codes, type: :array, on: [:create, :read, :update] + attribute :station_category, type: :object, on: [:create, :read, :update], class_name: 'NestedStationCategory' + attribute :visible_on_map_in_passenger_client, type: :boolean, on: [:create, :read, :update] + attribute :product_id, type: :string, on: [:create, :read, :update] + attribute :municipality, type: :string, on: [:create, :read, :update] + attribute :dhid, 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 diff --git a/lib/ioki/model/platform/task.rb b/lib/ioki/model/platform/task.rb index 472c1fab..a11a6f34 100644 --- a/lib/ioki/model/platform/task.rb +++ b/lib/ioki/model/platform/task.rb @@ -4,6 +4,7 @@ module Ioki module Model module Platform class Task < Base + attribute :reported_completed_at, 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 diff --git a/lib/ioki/model/platform/task_list.rb b/lib/ioki/model/platform/task_list.rb index 4b04c631..70fa562a 100644 --- a/lib/ioki/model/platform/task_list.rb +++ b/lib/ioki/model/platform/task_list.rb @@ -4,6 +4,18 @@ module Ioki module Model module Platform class TaskList < Base + attribute :end_location_type, type: :string, on: [:create, :read, :update] + attribute :end_location_id, type: :string, on: [:create, :read, :update] + attribute :start_location_type, type: :string, on: [:create, :read, :update] + attribute :start_location_id, type: :string, on: [:create, :read, :update] + attribute :start_location, type: :object, on: [:create, :read, :update], class_name: ['Place', 'Station'] + attribute :occupancy, type: :object, on: [:create, :read, :update], class_name: 'TaskListOccupancy' + attribute :end_location, type: :object, on: [:create, :read, :update], class_name: ['Place', 'Station'] + attribute :last_connected_driver_id, type: :string, on: [:create, :read, :update] + attribute :matching_rank, type: :integer, on: [:create, :read, :update] + attribute :line_id, type: :string, on: [:create, :read, :update] + attribute :current, type: :boolean, on: [:create, :read, :update] + attribute :version, type: :integer, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time @@ -13,10 +25,10 @@ class TaskList < Base attribute :ad_hoc_bookable, on: [:read, :create, :update], type: :boolean attribute :deactivated, on: :read, type: :boolean attribute :deactivations, on: :read, type: :array, class_name: 'Deactivation' - attribute :driver, on: :read, type: :object, class_name: 'Driver' + # attribute :driver, on: :read, type: :object, class_name: 'Driver' attribute :ends_at, on: [:create, :update], type: :date_time, unvalidated: true - attribute :end_place, on: :read, type: :object, class_name: 'Place' - attribute :end_place_id, on: [:create, :update], type: :object, class_name: 'Place', unvalidated: true + deprecated_attribute :end_place, on: :read, type: :object, class_name: 'Place' + deprecated_attribute :end_place_id, on: [:create, :update], type: :object, class_name: 'Place', unvalidated: true attribute :matching_configuration_id, on: [:read, :create, :update], type: :string attribute :paused, on: :read, type: :boolean attribute :pauses, on: [:read, :create], omit_if_blank_on: [:create], type: :array, class_name: 'Pause' @@ -27,8 +39,8 @@ class TaskList < Base attribute :service_ends_at, on: [:create, :read, :update], type: :date_time attribute :service_starts_at, on: [:create, :read, :update], type: :date_time attribute :starts_at, on: [:create, :update], type: :date_time, unvalidated: true - attribute :start_place, on: :read, type: :object, class_name: 'Place' - attribute :start_place_id, on: [:create, :update], type: :object, class_name: 'Place', unvalidated: true + deprecated_attribute :start_place, on: :read, type: :object, class_name: 'Place' + deprecated_attribute :start_place_id, on: [:create, :update], type: :object, class_name: 'Place', unvalidated: true attribute :state, on: [:read, :create], type: :string attribute :tasks, on: :read, type: :array, class_name: 'Task' attribute :vehicle, on: :read, type: :object, class_name: 'Vehicle' diff --git a/lib/ioki/model/platform/user.rb b/lib/ioki/model/platform/user.rb index 13052f30..dd705854 100644 --- a/lib/ioki/model/platform/user.rb +++ b/lib/ioki/model/platform/user.rb @@ -4,6 +4,9 @@ module Ioki module Model module Platform class User < Base + attribute :additional_data, type: :object, on: [:create, :read, :update], class_name: 'AdditionalDataSchema' + attribute :notification_settings, type: :array, on: [:create, :read, :update] + attribute :last_activity_at, 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 @@ -26,7 +29,7 @@ class User < Base attribute :provider_id, type: :string, on: :read attribute :terms_accepted, type: :boolean, on: [:create, :update], unvalidated: true attribute :terms_accepted_at, type: :date_time, on: :read - attribute :logpay_customer_set, on: :read, type: :boolean + # attribute :logpay_customer_set, on: :read, type: :boolean attribute :version, type: :integer, on: [:read, :update] end end diff --git a/lib/ioki/model/platform/vehicle.rb b/lib/ioki/model/platform/vehicle.rb index 18b8e2f1..abb022ec 100644 --- a/lib/ioki/model/platform/vehicle.rb +++ b/lib/ioki/model/platform/vehicle.rb @@ -4,6 +4,15 @@ module Ioki module Model module Platform class Vehicle < Base + attribute :operation_area_id, type: :string, on: [:create, :read, :update] + 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 :seats, type: :integer, on: [:create, :read, :update] + attribute :operation_area, type: :string, on: [:create, :read, :update] + attribute :matching_rank, type: :integer, 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 diff --git a/lib/ioki/model/platform/webhook.rb b/lib/ioki/model/platform/webhook.rb index 3cacc98b..32556558 100644 --- a/lib/ioki/model/platform/webhook.rb +++ b/lib/ioki/model/platform/webhook.rb @@ -4,6 +4,10 @@ module Ioki module Model module Platform class Webhook < Base + attribute :secret, type: :string, on: [:create, :read, :update] + attribute :circuit_breaker, type: :object, on: [:create, :read, :update], class_name: 'CircuitBreaker' + attribute :product_ids, type: :array, on: [:create, :read, :update] + attribute :product_filter_enabled, type: :boolean, on: [:create, :read, :update] attribute :type, on: :read, type: :string attribute :id, on: :read, type: :string attribute :created_at, on: :read, type: :date_time 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