diff --git a/lib/ioki/model/operator/rematching_attempt.rb b/lib/ioki/model/operator/rematching_attempt.rb index 72e48589..4ff59f86 100644 --- a/lib/ioki/model/operator/rematching_attempt.rb +++ b/lib/ioki/model/operator/rematching_attempt.rb @@ -47,9 +47,9 @@ class RematchingAttempt < Base on: :read, type: :string - attribute :result, + attribute :results, on: :read, - type: :object, + type: :array, class_name: 'RematchingAttemptResult' attribute :ride_ids, diff --git a/spec/ioki/model/operator/rematching_attempt_spec.rb b/spec/ioki/model/operator/rematching_attempt_spec.rb index 5fd7f0b0..1f4b9f1a 100644 --- a/spec/ioki/model/operator/rematching_attempt_spec.rb +++ b/spec/ioki/model/operator/rematching_attempt_spec.rb @@ -11,7 +11,7 @@ it { is_expected.to define_attribute(:preserve_negotiated_times).as(:boolean) } it { is_expected.to define_attribute(:reassigner_id).as(:string) } it { is_expected.to define_attribute(:reassigner_type).as(:string) } - it { is_expected.to define_attribute(:result).as(:object).with(class_name: 'RematchingAttemptResult') } + it { is_expected.to define_attribute(:results).as(:array).with(class_name: 'RematchingAttemptResult') } it { is_expected.to define_attribute(:ride_ids).as(:array) } it { is_expected.to define_attribute(:started_at).as(:date_time) } it { is_expected.to define_attribute(:task_list_id).as(:string) }