<commit_before>require "savon"

module RussianPost
  class Client
    attr_reader :savon, :endpoint, :namespace
    
    def initialize
      @endpoint  = "http://voh.russianpost.ru:8080/niips-operationhistory-web/OperationHistory"
      @namespace = "http://russianpost.org/operationhistory/data"
      @savon     = Savon.client(endpoint: endpoint, namespace: namespace)
    end

    def call(barcode: nil)
      message = { "wsdl:Barcode" => barcode, "wsdl:MessageType" => "0" }
      response = savon.call("OperationHistoryRequest", message: message)

      response.to_hash[:operation_history_data][:history_record]
    end
  end
end<commit_msg>Disable logging<commit_after>require "savon"

module RussianPost
  class Client
    attr_reader :savon, :endpoint, :namespace
    
    def initialize
      @endpoint  = "http://voh.russianpost.ru:8080/niips-operationhistory-web/OperationHistory"
      @namespace = "http://russianpost.org/operationhistory/data"
      @savon     = Savon.client(endpoint: endpoint, namespace: namespace, log: false)
    end

    def call(barcode: nil)
      message = { "wsdl:Barcode" => barcode, "wsdl:MessageType" => "0" }
      response = savon.call("OperationHistoryRequest", message: message)

      response.to_hash[:operation_history_data][:history_record]
    end
  end
end
{'fraction_non_alphanumeric': 0.1173780487804878, 'fraction_numerical': 0.007621951219512195, 'mean_word_length': 3.791970802919708, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3363202', 'n_tokens_mistral': 420, 'n_tokens_neox': 405, 'n_words': 78}