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: organization_machine_translation_controller.rb
    path of file: ./repos/texterify/app/controllers/api/v1
    
    the code of the file until where you have to start completion: class Api::V1::OrganizationMachineTranslationController < Api::V1::ApiController
  def update
    organization = current_user.organizations.find(params[:organization_id])
    authorize organization

    # Determine if the given API token is a token for the free or pro API.
    deepl_api_token = params[:deepl_api_token]
    if deepl_api_token
      deepl_client = Deepl::Client.new
      deepl_client.set_api_credentials(deepl_api_t
    
  def update
    organization = current_user.organizations.find(params[:organization_id])
    authorize organization

    # Determine if the given API token is a token for the free or pro API.
    deepl_api_token = params[:deepl_api_token]
    if deepl_api_token
      deepl_client = Deepl::Client.new
      deepl_client.set_api_credentials(deepl_api_token, DEEPL_FREE_API)
      response = deepl_client.usage
      if response.nil?
        deepl_client.set_api_credentials(deepl_api_token, DEEPL_PRO_API)
        response = deepl_client.usage

        if response.nil?
          render json: { error: true, details: 'INVALID_DEEPL_API_TOKEN' }
          return
        else
          organization.deepl_api_token_type = 'pro'
        end