From ee56e3cf04d56c7b0deca5ade858e84bf9015f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serge=20H=C3=A4nni?= Date: Thu, 3 Sep 2026 15:26:07 +0200 Subject: [PATCH] Fix naming of payment method type methods --- lib/ioki/model/operator/ride.rb | 6 +++++- lib/ioki/model/passenger/ride.rb | 3 ++- lib/ioki/model/platform/ride.rb | 3 ++- spec/ioki/model/operator/ride_spec.rb | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/ioki/model/operator/ride.rb b/lib/ioki/model/operator/ride.rb index fc3d0e21..8fe4a91b 100644 --- a/lib/ioki/model/operator/ride.rb +++ b/lib/ioki/model/operator/ride.rb @@ -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 diff --git a/lib/ioki/model/passenger/ride.rb b/lib/ioki/model/passenger/ride.rb index 5f9ce935..2923c82b 100644 --- a/lib/ioki/model/passenger/ride.rb +++ b/lib/ioki/model/passenger/ride.rb @@ -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' diff --git a/lib/ioki/model/platform/ride.rb b/lib/ioki/model/platform/ride.rb index 4afbe4f9..64934133 100644 --- a/lib/ioki/model/platform/ride.rb +++ b/lib/ioki/model/platform/ride.rb @@ -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 diff --git a/spec/ioki/model/operator/ride_spec.rb b/spec/ioki/model/operator/ride_spec.rb index c51ac0ea..13d09d17 100644 --- a/spec/ioki/model/operator/ride_spec.rb +++ b/spec/ioki/model/operator/ride_spec.rb @@ -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