<commit_before>module Braspag
  class Eft
    PAYMENT_METHOD = {
      :bradesco => "11",
    }

    MAPPING = {
      :merchant_id => "Id_Loja",
      :order_id => "VendaId",
      :customer_name => "Nome",
      :customer_id => "Cpf",
      :amount => "Valor",
      :payment_method => "codpagamento",
      :installments => "PARCELAS",
      :has_interest => "TIPOPARCELADO"
    }

    def initialize(connection, params, crypto_strategy = nil)
      raise InvalidConnection unless connection.is_a?(Braspag::Connection)

      @connection = connection
      @params = params
      @params[:merchant_id] = connection.merchant_id
      @crypto_strategy = crypto_strategy
      
      if @params[:amount] && !@params[:amount].is_a?(BigDecimal)
        @params[:amount] = BigDecimal.new(@params[:amount].to_s)
      end
      
      ok?
    end

    def ok?<commit_msg>Adicionando códigos de pagamento para TEF<commit_after>module Braspag
  class Eft
    PAYMENT_METHOD = {
      :bradesco => "11",
      :itau => "12",
      :banco_do_brasil => "15",
      :banco_real => "16",
      :banrisul => "30",
      :unibanco => "31"
    }

    MAPPING = {
      :merchant_id => "Id_Loja",
      :order_id => "VendaId",
      :customer_name => "Nome",
      :customer_id => "Cpf",
      :amount => "Valor",
      :payment_method => "codpagamento",
      :installments => "PARCELAS",
      :has_interest => "TIPOPARCELADO"
    }

    def initialize(connection, params, crypto_strategy = nil)
      raise InvalidConnection unless connection.is_a?(Braspag::Connection)

      @connection = connection
      @params = params
      @params[:merchant_id] = connection.merchant_id
      @crypto_strategy = crypto_strategy
      
      if @params[:amount] && !@params[:amount].is_a?(BigDecimal)
        @params[:amount] = BigDecimal.new(@params[:amount].to_s)
      end
      
      ok?
    end

    def ok?
{'fraction_non_alphanumeric': 0.13696456901110524, 'fraction_numerical': 0.007403490216816499, 'mean_word_length': 2.6314779270633397, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 26, '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': '2053984', 'n_tokens_mistral': 649, 'n_tokens_neox': 633, 'n_words': 116}