diff --git a/lib/ioki/model/platform/multilanguage_string.rb b/lib/ioki/model/platform/multilanguage_string.rb new file mode 100644 index 00000000..aee5c82b --- /dev/null +++ b/lib/ioki/model/platform/multilanguage_string.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Ioki + module Model + module Platform + class MultilanguageString < Base + attribute :type, on: :read, type: :string + attribute :name, on: :read, type: :string + attribute :translations, on: :read, type: :array, class_name: 'Translation' + end + end + end +end diff --git a/lib/ioki/model/platform/passenger_option.rb b/lib/ioki/model/platform/passenger_option.rb new file mode 100644 index 00000000..5caf837a --- /dev/null +++ b/lib/ioki/model/platform/passenger_option.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +module Ioki + module Model + module Platform + class PassengerOption < Base + 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 :bookable, on: :read, type: :boolean + attribute :data_type, on: :read, type: :string + attribute :name, on: :read, type: :string + attribute :option_type, on: :read, type: :string + attribute :name_translations, on: :read, type: :object, class_name: 'MultilanguageString' + attribute :description_translations, on: :read, type: :object, class_name: 'MultilanguageString' + attribute :info_translations, on: :read, type: :object, class_name: 'MultilanguageString' + attribute :link_translations, on: :read, type: :object, class_name: 'MultilanguageString' + attribute :link_text_translations, on: :read, type: :object, class_name: 'MultilanguageString' + end + end + end +end diff --git a/lib/ioki/model/platform/passenger_type.rb b/lib/ioki/model/platform/passenger_type.rb index 23be47a9..98e91dd7 100644 --- a/lib/ioki/model/platform/passenger_type.rb +++ b/lib/ioki/model/platform/passenger_type.rb @@ -4,9 +4,19 @@ module Ioki module Model module Platform class PassengerType < Base - unvalidated true # Specification not available. - 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 :bookable, on: :read, type: :boolean + attribute :name, on: :read, type: :string + attribute :option_type, on: :read, type: :string + attribute :name_translations, on: :read, type: :object, class_name: 'MultilanguageString' + attribute :description_translations, on: :read, type: :object, class_name: 'MultilanguageString' + attribute :info_translations, on: :read, type: :object, class_name: 'MultilanguageString' + attribute :link_translations, on: :read, type: :object, class_name: 'MultilanguageString' + attribute :link_text_translations, on: :read, type: :object, class_name: 'MultilanguageString' end end end diff --git a/lib/ioki/model/platform/product.rb b/lib/ioki/model/platform/product.rb index 33084aad..8c405c34 100644 --- a/lib/ioki/model/platform/product.rb +++ b/lib/ioki/model/platform/product.rb @@ -19,6 +19,9 @@ class Product < Base attribute :prebookable, on: :read, type: :boolean attribute :provider, type: :object, on: :read, class_name: 'Provider' attribute :ride_options, on: :read, type: :object, class_name: 'RideOptions' + 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' attribute :ride_rating_criteria, on: :read, type: :array attribute :service_time_info, on: :read, type: :string attribute :timezone, on: :read, type: :object, class_name: 'Timezone' diff --git a/lib/ioki/model/platform/ride_option.rb b/lib/ioki/model/platform/ride_option.rb new file mode 100644 index 00000000..460bdf02 --- /dev/null +++ b/lib/ioki/model/platform/ride_option.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +module Ioki + module Model + module Platform + class RideOption < Base + 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 :bookable, on: :read, type: :boolean + attribute :data_type, on: :read, type: :string + attribute :name, on: :read, type: :string + attribute :option_type, on: :read, type: :string + attribute :name_translations, on: :read, type: :object, class_name: 'MultilanguageString' + attribute :description_translations, on: :read, type: :object, class_name: 'MultilanguageString' + attribute :info_translations, on: :read, type: :object, class_name: 'MultilanguageString' + attribute :link_translations, on: :read, type: :object, class_name: 'MultilanguageString' + attribute :link_text_translations, on: :read, type: :object, class_name: 'MultilanguageString' + end + end + end +end diff --git a/lib/ioki/model/platform/translation.rb b/lib/ioki/model/platform/translation.rb new file mode 100644 index 00000000..a7f18923 --- /dev/null +++ b/lib/ioki/model/platform/translation.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Ioki + module Model + module Platform + class Translation < Base + attribute :type, on: :read, type: :string + attribute :language, on: :read, type: :string + attribute :text, on: :read, type: :string + end + end + end +end