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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/ioki/model/passenger/announcement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/ioki/model/passenger/assistance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/ioki/model/passenger/booking.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions lib/ioki/model/passenger/bootstrap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ioki/model/passenger/cancellation_voucher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
10 changes: 6 additions & 4 deletions lib/ioki/model/passenger/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ 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
attribute :identifier, on: :read, type: :string
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
Expand Down
7 changes: 5 additions & 2 deletions lib/ioki/model/passenger/fare.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ioki/model/passenger/hop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/ioki/model/passenger/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion lib/ioki/model/passenger/passenger_option.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/ioki/model/passenger/payment_method_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions lib/ioki/model/passenger/personal_discount.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ 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
attribute :discount_type, on: :read, type: :string
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
Expand Down
6 changes: 3 additions & 3 deletions lib/ioki/model/passenger/personal_discount_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 2 additions & 0 deletions lib/ioki/model/passenger/phone_verification_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 17 additions & 9 deletions lib/ioki/model/passenger/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,41 @@ 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
attribute :updated_at, on: :read, type: :date_time
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
Expand Down
2 changes: 2 additions & 0 deletions lib/ioki/model/passenger/provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions lib/ioki/model/passenger/rating.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/ioki/model/passenger/receipt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ioki/model/passenger/redeemed_promo_code.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 9 additions & 4 deletions lib/ioki/model/passenger/ride.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand All @@ -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]
Expand Down
Loading
Loading