<commit_before>require 'netvisor/root'
require 'netvisor/request'

module Netvisor
  class Base
    def send_invoice(sales_invoice)
      request(sales_invoice, 'sales_invoice')
    end

    def send_product(product)
      request(product, 'product')
    end

    def send_customer(customer)
      request(customer, "customer", :post, {method: "add"})
    end

    def update_customer(customer, id)
      request(customer, "customer", :post, {id: id, method: "edit"})
    end

    def get_customers(query = nil)
      # query = { keyword: "ABC123" } Filters result list with given keyword. 
      # Match is searched from following fields: Name, Customer Code, Organization identifier, CoName<commit_msg>Adds update_product method and fixes the send_product one<commit_after>require 'netvisor/root'
require 'netvisor/request'

module Netvisor
  class Base
    def send_invoice(sales_invoice)
      request(sales_invoice, "sales_invoice")
    end

    def send_product(product)
      request(product, "product", :post, {method: "add"})
    end

    def update_product(product, id)
      request(customer, "product", :post, {id: id, method: "edit"})
    end

    def send_customer(customer)
      request(customer, "customer", :post, {method: "add"})
    end

    def update_customer(customer, id)
      request(customer, "customer", :post, {id: id, method: "edit"})
    end

    def get_customers(query = nil)
      # query = { keyword: "ABC123" } Filters result list with given keyword. 
      # Match is searched from following fields: Name, Customer Code, Organization identifier, CoName
{'fraction_non_alphanumeric': 0.10698552548772813, 'fraction_numerical': 0.003775959723096287, 'mean_word_length': 3.746268656716418, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1417085', 'n_tokens_mistral': 494, 'n_tokens_neox': 463, 'n_words': 142}