Skip to content

Commit

Permalink
Merge pull request #412 from ioki-mobility/creator-type-and-id
Browse files Browse the repository at this point in the history
Operator Api | Add creator_id and creator_type to Ride model
  • Loading branch information
tom-ioki authored Jul 26, 2024
2 parents 056d784 + f53c9fa commit ee7f58e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/ioki/model/operator/ride.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ class Ride < Base
type: :object,
class_name: 'CancellationStatement'

attribute :creator_id,
on: :read,
type: :string

attribute :creator_type,
on: :read,
type: :string

attribute :destination,
on: :read,
type: :object,
Expand Down
2 changes: 2 additions & 0 deletions spec/ioki/model/operator/ride_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
it { is_expected.to define_attribute(:cancellation_reason).as(:string) }
it { is_expected.to define_attribute(:cancellation_reason_translated).as(:string) }
it { is_expected.to define_attribute(:cancellation_statement).as(:object).with(class_name: 'CancellationStatement') }
it { is_expected.to define_attribute(:creator_id).as(:string) }
it { is_expected.to define_attribute(:creator_type).as(:string) }
it { is_expected.to define_attribute(:destination).as(:object).with(class_name: 'RequestedPoint') }
it { is_expected.to define_attribute(:driver).as(:object).with(class_name: 'Driver') }
it { is_expected.to define_attribute(:driver_id).as(:string) }
Expand Down

0 comments on commit ee7f58e

Please sign in to comment.