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: customer_request.rb
    path of file: ./repos/sequencescape/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
# A class for requests that have some business meaning outside of Sequencescape
class CustomerRequest < 
    
  def generate_destroy_request_event
    time = DateTime.current
    current_request_event&.expire!(time)
    request_events.create!(
      event_name: 'destroyed',
      from_state: state,
      to_state: state,
      current_from: time,
      current_to: time
    )
  end