Skip to content
Merged
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
6 changes: 5 additions & 1 deletion lib/ioki/model/operator/ride.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ class Ride < Base
on: :read,
type: :integer

attribute :available_payment_method_types,
attribute :available_booking_payment_method_types,
on: :read,
type: :array

attribute :available_tip_payment_method_types,
on: :read,
type: :array

Expand Down
3 changes: 2 additions & 1 deletion lib/ioki/model/passenger/ride.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ class Ride < Base
attribute :id, on: :read, type: :string
attribute :created_at, on: :read, type: :date_time
attribute :updated_at, on: :read, type: :date_time
attribute :available_payment_method_types, on: :read, type: :array
attribute :available_booking_payment_method_types, on: :read, type: :array
attribute :available_tip_payment_method_types, on: :read, type: :array
attribute :origin, type: :object, on: [:create, :read], class_name: 'RequestedPoint'
attribute :destination, type: :object, on: [:create, :read], class_name: 'RequestedPoint'
attribute :passengers, type: :array, on: [:create, :read], class_name: 'RidePassenger'
Expand Down
3 changes: 2 additions & 1 deletion lib/ioki/model/platform/ride.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ class Ride < Base
attribute :id, on: :read, type: :string
attribute :created_at, on: :read, type: :date_time
attribute :updated_at, on: :read, type: :date_time
attribute :available_payment_method_types, on: :read, type: :array
attribute :available_booking_payment_method_types, on: :read, type: :array
attribute :available_tip_payment_method_types, on: :read, type: :array
attribute :book_for_others, on: [:read, :create, :update], type: :boolean
attribute :booking, type: :object, on: :read, class_name: 'Booking'
attribute :cancellable, on: :read, type: :boolean
Expand Down
3 changes: 2 additions & 1 deletion spec/ioki/model/operator/ride_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@
it { is_expected.to define_attribute(:vehicle_reached_pickup_at).as(:date_time) }
it { is_expected.to define_attribute(:last_serving_driver_id).as(:string) }
it { is_expected.to define_attribute(:last_serving_driver).as(:object).with(class_name: 'Driver') }
it { is_expected.to define_attribute(:available_payment_method_types).as(:array) }
it { is_expected.to define_attribute(:available_booking_payment_method_types).as(:array) }
it { is_expected.to define_attribute(:available_tip_payment_method_types).as(:array) }
end