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