<commit_before>module DineroMailCheckout

  class MissingItemNameError < StandardError ; end
  class MissingItemQuantityError < StandardError ; end
  class MissingItemAmmountError < StandardError ; end
  class MissingMerchantError < StandardError ; end
  class MissingCountryIdError < StandardError ; end

  class CheckoutData
    class << self
      def validate(attributes = {})
        attributes[:merchant] = (DineroMailCheckout.configuration.merchant || nil ) if attributes[:merchant].nil?
        raise(MissingMerchantError) if attributes[:merchant].nil?
        raise(MissingCountryIdError) if attributes[:country_id].nil?
        raise(MissingItemNameError) if attributes[:item_name_1].nil?
        raise(MissingItemQuantityError) if attributes[:item_quantity_1].nil?
        raise(MissingItemAmmountError) if attributes[:item_ammount_1].nil?
        attributes[:payment_method_available] = (DineroMailCheckout.configuration.payment_method || 'all' ) if attributes[:payment_method_available].nil?
        attributes[:ok_url] = DineroMailCheckout.configuration.success_url if attributes[:ok_url].nil?
        attributes[:error_url] = DineroMailCheckout.configuration.error_url if attributes[:error_url].nil?
        attributes[:currency] = DineroMailCheckout.configuration.currency if attributes[:currency].nil?
        attributes
      end
    end
  end
end<commit_msg>added the country_id configuration again<commit_after>module DineroMailCheckout

  class MissingItemNameError < StandardError ; end
  class MissingItemQuantityError < StandardError ; end
  class MissingItemAmmountError < StandardError ; end
  class MissingMerchantError < StandardError ; end
  class MissingCountryIdError < StandardError ; end

  class CheckoutData
    class << self
      def validate(attributes = {})
        attributes[:merchant] = (DineroMailCheckout.configuration.merchant || nil ) if attributes[:merchant].nil?
        raise(MissingMerchantError) if attributes[:merchant].nil?
        raise(MissingCountryIdError) if attributes[:country_id].nil?
        raise(MissingItemNameError) if attributes[:item_name_1].nil?
        raise(MissingItemQuantityError) if attributes[:item_quantity_1].nil?
        raise(MissingItemAmmountError) if attributes[:item_ammount_1].nil?
        attributes[:payment_method_available] = (DineroMailCheckout.configuration.payment_method || 'all' ) if attributes[:payment_method_available].nil?
        attributes[:ok_url] = DineroMailCheckout.configuration.success_url if attributes[:ok_url].nil?
        attributes[:error_url] = DineroMailCheckout.configuration.error_url if attributes[:error_url].nil?
        attributes[:currency] = DineroMailCheckout.configuration.currency if attributes[:currency].nil?
        attributes[:country_id] = DineroMailCheckout.configuration.currency if attributes[:country_id].nil?
        attributes
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08688127379716165, 'fraction_numerical': 0.0020768431983385254, 'mean_word_length': 4.885947046843177, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2877182', 'n_tokens_mistral': 772, 'n_tokens_neox': 753, 'n_words': 147}