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/operator/area.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/ioki/model/operator/cancellation_statement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions lib/ioki/model/operator/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions lib/ioki/model/operator/fleet_state.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions lib/ioki/model/operator/hop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions lib/ioki/model/operator/line_stop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions lib/ioki/model/operator/multilanguage_string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions lib/ioki/model/operator/operator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions lib/ioki/model/operator/passenger_option.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ioki/model/operator/personal_discount.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions lib/ioki/model/operator/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions lib/ioki/model/operator/provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions lib/ioki/model/operator/rating.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,55 +20,55 @@ 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

attribute :comment,
on: :read,
type: :string

attribute :driver_rating,
deprecated_attribute :driver_rating,
on: :read,
type: :integer

attribute :editable,
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

attribute :version,
on: :read,
type: :integer

attribute :waiting_time_rating,
deprecated_attribute :waiting_time_rating,
on: :read,
type: :integer

Expand Down
9 changes: 5 additions & 4 deletions lib/ioki/model/operator/receipt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/ioki/model/operator/reporting/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions lib/ioki/model/operator/reporting/report_partition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions lib/ioki/model/operator/reporting/report_partition_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions lib/ioki/model/operator/reporting/report_row.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
16 changes: 9 additions & 7 deletions lib/ioki/model/operator/ride.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,7 +26,7 @@ class Ride < Base
on: :read,
type: :integer

attribute :book_for_others,
deprecated_attribute :book_for_others,
on: :read,
type: :boolean

Expand Down Expand Up @@ -147,7 +149,7 @@ class Ride < Base
on: :read,
type: :string

attribute :payment_state,
deprecated_attribute :payment_state,
on: :read,
type: :string

Expand Down Expand Up @@ -203,7 +205,7 @@ class Ride < Base
on: :read,
type: :string

attribute :storage_spaces,
deprecated_attribute :storage_spaces,
on: :read,
type: :integer

Expand All @@ -219,10 +221,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,
Expand Down
Loading
Loading