lib/intercom/api_operations/save.rb in intercom-4.0.0 vs lib/intercom/api_operations/save.rb in intercom-4.0.1

- old
+ new

@@ -25,9 +25,10 @@ if id_present?(object) && !posted_updates?(object) response = @client.put("/#{collection_name}/#{object.id}", object.to_submittable_hash) else response = @client.post("/#{collection_name}", object.to_submittable_hash.merge(identity_hash(object))) end + object.client = @client object.from_response(response) if response # may be nil we received back a 202 end def identity_hash(object) object.respond_to?(:identity_vars) ? SliceableHash.new(object.to_hash).slice(*object.identity_vars.map(&:to_s)) : {}