<commit_before>require 'base64'
require 'openssl'
require 'json'
require 'rest_client'


module PuntoPagos
  
  class NoDataError < Exception
  end
  
  class Request
    
      def initialize(env = nil)
        @env = env
        @@config ||= PuntoPagos::Config.new(@env)
        @@puntopagos_base_url ||= @@config.puntopagos_base_url
      end   

      def validate
        #TODO validate JSON must have monto and trx_id
      end

      def create(data)
        raise NoDataError unless data
        get_headers("transaccion/crear",data)
        response_data = call_api(data, "/transaccion/crear", :post)
        puts response_data
        PuntoPagos::Response.new(response_data, @env)<commit_msg>Puts data borrada en request<commit_after>require 'base64'
require 'openssl'
require 'json'
require 'rest_client'


module PuntoPagos
  
  class NoDataError < Exception
  end
  
  class Request
    
      def initialize(env = nil)
        @env = env
        @@config ||= PuntoPagos::Config.new(@env)
        @@puntopagos_base_url ||= @@config.puntopagos_base_url
      end   

      def validate
        #TODO validate JSON must have monto and trx_id
      end

      def create(data)
        raise NoDataError unless data
        get_headers("transaccion/crear",data)
        response_data = call_api(data, "/transaccion/crear", :post)
        PuntoPagos::Response.new(response_data, @env)
{'fraction_non_alphanumeric': 0.08908045977011494, 'fraction_numerical': 0.0028735632183908046, 'mean_word_length': 2.734584450402145, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5157094', 'n_tokens_mistral': 458, 'n_tokens_neox': 447, 'n_words': 105}