You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: web_hook_event.rb
    path of file: ./repos/discourse/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class WebHookEvent < ActiveRecord::Base
  belongs_to :web_hoo
    
  def update_web_hook_delivery_status
    web_hook.last_delivery_status =
      case status
      when 200..299
        WebHook.last_delivery_statuses[:successful]
      else
        WebHook.last_delivery_statuses[:failed]
      end