From e5d6a61fd1860abf950248a95032fae24074ca27 Mon Sep 17 00:00:00 2001 From: Anne Schneider Date: Thu, 30 Jul 2026 15:37:36 +0200 Subject: [PATCH 1/2] Add `claimed` to platform API user Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/ioki/model/platform/user.rb | 1 + spec/ioki/model/platform/user_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/ioki/model/platform/user.rb b/lib/ioki/model/platform/user.rb index 13052f30..85f7cb6d 100644 --- a/lib/ioki/model/platform/user.rb +++ b/lib/ioki/model/platform/user.rb @@ -9,6 +9,7 @@ class User < Base attribute :created_at, on: :read, type: :date_time attribute :updated_at, on: :read, type: :date_time attribute :analytics_tracking, on: [:read, :create], type: :boolean + attribute :claimed, on: [:read, :create], type: :boolean attribute :email, type: :object, on: [:read, :create, :update], diff --git a/spec/ioki/model/platform/user_spec.rb b/spec/ioki/model/platform/user_spec.rb index c3bcba9b..7b5daeb7 100644 --- a/spec/ioki/model/platform/user_spec.rb +++ b/spec/ioki/model/platform/user_spec.rb @@ -6,6 +6,7 @@ it { is_expected.to define_attribute(:created_at).as(:date_time) } it { is_expected.to define_attribute(:updated_at).as(:date_time) } + it { is_expected.to define_attribute(:claimed).as(:boolean) } it { is_expected.to define_attribute(:email).as(:object).with(class_name: 'UserEmail') } it { is_expected.to define_attribute(:external_id).as(:string) } it { is_expected.to define_attribute(:first_name).as(:string) } From ad2f939aac9b8f2905f73e9f7c0ab5678648705f Mon Sep 17 00:00:00 2001 From: Anne Schneider Date: Thu, 30 Jul 2026 16:02:27 +0200 Subject: [PATCH 2/2] Only enable on create, not read --- lib/ioki/model/platform/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ioki/model/platform/user.rb b/lib/ioki/model/platform/user.rb index 85f7cb6d..5a3a2fc4 100644 --- a/lib/ioki/model/platform/user.rb +++ b/lib/ioki/model/platform/user.rb @@ -9,7 +9,7 @@ class User < Base attribute :created_at, on: :read, type: :date_time attribute :updated_at, on: :read, type: :date_time attribute :analytics_tracking, on: [:read, :create], type: :boolean - attribute :claimed, on: [:read, :create], type: :boolean + attribute :claimed, on: [:create], type: :boolean attribute :email, type: :object, on: [:read, :create, :update],