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: time_tracking_endpoints.rb
    path of file: ./repos/gitlabhq/lib/api
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module API
  module TimeTrackingEndpoints
    extend ActiveSupport::Concern

    included do
      helpers do
        def issuable_name
          declared_params.key?(:issue_iid) ? 'issue' : 'merge_request'
        end

        def issuable_key
          "#{issuable_name}_iid".to_sym
        e
    
        def update_issuable(attrs)
          custom_params = declared_params(include_missing: false)
          custom_params.merge!(attrs)

          issuable = update_service.new(**update_service.constructor_container_arg(user_project),
            current_user: current_user, params: custom_params).execute(load_issuable)

          if issuable.valid?
            present issuable, with: Entities::IssuableTimeStats
          else
            render_validation_error!(issuable)
          end