diff --git a/CHANGELOG.md b/CHANGELOG.md index e7f74147..948ebfa1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.6.2 - 2021-11-30 +* Bugfix + ## 0.6.1 - 2021-11-29 * Bugfixes diff --git a/Gemfile.lock b/Gemfile.lock index 6814e32f..90f6e0b5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - ioki-ruby (0.6.1) + ioki-ruby (0.6.2) faraday (~> 1.8) faraday_middleware (~> 1.2) diff --git a/lib/ioki/model/passenger/ride.rb b/lib/ioki/model/passenger/ride.rb index ddb4b877..efd1b006 100644 --- a/lib/ioki/model/passenger/ride.rb +++ b/lib/ioki/model/passenger/ride.rb @@ -24,8 +24,7 @@ class Ride < Base attribute :booking, type: :object, on: :read, model_class: Booking attribute :pickup, type: :object, on: :read, model_class: CalculatedPoint attribute :dropoff, type: :object, on: :read, model_class: CalculatedPoint - attribute :storage_spaces, type: :integer, on: [:read, :create, :update], omit_if_blank_on: [:create, :update], -model_class: 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] attribute :cancellable, type: :boolean, on: [:read, :create, :update] attribute :cancellation_reason, type: :string, on: [:read, :create, :update] @@ -52,7 +51,7 @@ class Ride < Base attribute :vehicle, type: :object, model_class: Vehicle, on: [:read, :create, :update] attribute :vehicle_reached_dropoff, type: :boolean, on: [:read, :create, :update] attribute :vehicle_reached_pickup, type: :boolean, on: [:read, :create, :update] - attribute :version, type: :integer, on: [:read, :create, :update] + attribute :version, type: :integer, on: [:read, :update] attribute :fare, on: :read, type: :object, model_class: Fare attribute :ticket, on: :read, type: :object, model_class: Ticket end diff --git a/lib/ioki/model/platform/ride.rb b/lib/ioki/model/platform/ride.rb index 98db4f13..3d71c9cd 100644 --- a/lib/ioki/model/platform/ride.rb +++ b/lib/ioki/model/platform/ride.rb @@ -26,13 +26,12 @@ class Ride < Base attribute :user_id, type: :string, on: [:create, :update], unvalidated: true attribute :product_id, type: :string, on: [:read, :create, :update] attribute :user, type: :object, on: :read, model_class: User - attribute :version, type: :string, on: :update + attribute :version, type: :string, on: [:read, :update] attribute :booking, type: :object, on: :read, model_class: Booking attribute :pickup, type: :object, on: :read, model_class: CalculatedPoint attribute :dropoff, type: :object, on: :read, model_class: CalculatedPoint attribute :storage_spaces, type: :integer, on: [:read, :create, :update], omit_if_blank_on: [:create, :update] attribute :rating, type: :object, on: :read, model_class: Rating - attribute :book_for_others, on: :read, type: :boolean attribute :cancellable, on: :read, type: :boolean attribute :cancellation_reason, on: :read, type: :string diff --git a/lib/ioki/version.rb b/lib/ioki/version.rb index 9770d851..dce4ba83 100644 --- a/lib/ioki/version.rb +++ b/lib/ioki/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Ioki - VERSION = '0.6.1' + VERSION = '0.6.2' end diff --git a/spec/ioki/examples/create_book_and_confirm_with_platform_spec.rb b/spec/ioki/examples/create_book_and_confirm_with_platform_spec.rb index 269dd3be..a822460f 100644 --- a/spec/ioki/examples/create_book_and_confirm_with_platform_spec.rb +++ b/spec/ioki/examples/create_book_and_confirm_with_platform_spec.rb @@ -62,6 +62,7 @@ # The booking was confirmed: expect(confirmed_ride.state).to eq 'driver_accepted' + expect(confirmed_ride.version).to eq 6 expect(booked_ride.booking.verification_code).not_to be_empty # Pickup information is available: