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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/ioki/model/driver/calculated_point.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions lib/ioki/model/driver/cancellation_statement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/ioki/model/driver/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/ioki/model/driver/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/ioki/model/driver/leg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion lib/ioki/model/driver/personal_discount.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
16 changes: 10 additions & 6 deletions lib/ioki/model/driver/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 8 additions & 7 deletions lib/ioki/model/driver/rating.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 9 additions & 5 deletions lib/ioki/model/driver/receipt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions lib/ioki/model/driver/ride.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,30 @@ 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
attribute :driver_can_be_called, on: :read, type: :boolean
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
Expand Down
11 changes: 6 additions & 5 deletions lib/ioki/model/driver/ride_passenger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions lib/ioki/model/driver/station.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/ioki/model/driver/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/ioki/model/driver/vehicle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading