@@ -176,24 +176,24 @@ def from_api(json_data, **args)
176176
177177 def from_evaluation_result ( evaluation_result , **args )
178178 to_flag_object = lambda { |flag_result , acc |
179- flagsmith_id = flag_result . dig ( :metadata , :flagsmith_id )
180- if flagsmith_id . nil?
179+ id = flag_result . dig ( :metadata , :id )
180+ if id . nil?
181181 raise Flagsmith ::ClientError ,
182- "FlagResult metadata.flagsmith_id is missing for feature \" #{ flag_result [ :name ] } \" . This indicates a bug in the SDK, please report it."
182+ "FlagResult metadata.id is missing for feature \" #{ flag_result [ :name ] } \" . This indicates a bug in the SDK, please report it."
183183 end
184184
185- acc [ flag_result [ :name ] ] = Collection . map_evaluated_flag_to_flag_result ( flag_result , flagsmith_id )
185+ acc [ flag_result [ :name ] ] = Collection . map_evaluated_flag_to_flag_result ( flag_result , id )
186186 }
187187
188188 new ( evaluation_result [ :flags ] . each_value . each_with_object ( { } , &to_flag_object ) , **args )
189189 end
190190
191- def map_evaluated_flag_to_flag_result ( flag_result , flagsmith_id )
191+ def map_evaluated_flag_to_flag_result ( flag_result , id )
192192 Flagsmith ::Flags ::Flag . new (
193193 feature_name : flag_result [ :name ] ,
194194 enabled : flag_result [ :enabled ] ,
195195 value : flag_result [ :value ] ,
196- feature_id : flagsmith_id ,
196+ feature_id : id ,
197197 reason : flag_result [ :reason ]
198198 )
199199 end
0 commit comments