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: promotion_chooser.rb
    path of file: ./repos/solidus/core/app/models/spree
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Spree
  clas
    
    def update
      if best_promotion_adjustment
        @adjustments.select(&:eligible?).each do |adjustment|
          next if adjustment == best_promotion_adjustment
          adjustment.update_columns(eligible: false, updated_at: Time.current)
        end
        best_promotion_adjustment.amount
      else
        BigDecimal('0')
      end