Skip to content

Commit

Permalink
Merge branch 'master' into platform-model-api-completeness
Browse files Browse the repository at this point in the history
  • Loading branch information
A5308Y authored Dec 15, 2021
2 parents 2aa32b2 + c4b07aa commit 52dcde7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.6.2 - 2021-11-30
* Bugfix

## 0.6.1 - 2021-11-29
* Bugfixes

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
ioki-ruby (0.6.1)
ioki-ruby (0.6.2)
faraday (~> 1.8)
faraday_middleware (~> 1.2)

Expand Down
5 changes: 2 additions & 3 deletions lib/ioki/model/passenger/ride.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions lib/ioki/model/platform/ride.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ioki/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Ioki
VERSION = '0.6.1'
VERSION = '0.6.2'
end
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 52dcde7

Please sign in to comment.