<commit_before>require 'buckaroo_client/gateway'
require 'buckaroo_client/service'
require 'buckaroo_client/transaction'
require 'buckaroo_client/version'

module BuckarooClient
  DEFAULT_TRANSACTION_ATTRIBUTES = {
    websitekey: ENV['BUCKAROO_CLIENT_WEBSITEKEY']
  }

  def self.gateway
    Gateway::NVP
  end

  def self.batch(attributes = {})
    Gateway::Batch.new(attributes)
  end

  def self.transaction(attributes = {})
    Transaction.new(DEFAULT_TRANSACTION_ATTRIBUTES.merge(attributes))
  end

  def self.service(name, attributes = {})
    case name.to_s
    when 'credit_management'
      Service::CreditManagement.new
    when 'invoice_specification'
      Service::InvoiceSpecification.new
    when 'pay_per_email'
      Service::PayPerEmail.new(attributes)
    else
      raise ArgumentError.new("service '#{name}' does not exist")
    end
  end
end<commit_msg>Pass arguments to CreditManagement and InvoiceSpecification constructor<commit_after>require 'buckaroo_client/gateway'
require 'buckaroo_client/service'
require 'buckaroo_client/transaction'
require 'buckaroo_client/version'

module BuckarooClient
  DEFAULT_TRANSACTION_ATTRIBUTES = {
    websitekey: ENV['BUCKAROO_CLIENT_WEBSITEKEY']
  }

  def self.gateway
    Gateway::NVP
  end

  def self.batch(attributes = {})
    Gateway::Batch.new(attributes)
  end

  def self.transaction(attributes = {})
    Transaction.new(DEFAULT_TRANSACTION_ATTRIBUTES.merge(attributes))
  end

  def self.service(name, attributes = {})
    case name.to_s
    when 'credit_management'
      Service::CreditManagement.new(attributes)
    when 'invoice_specification'
      Service::InvoiceSpecification.new(attributes)
    when 'pay_per_email'
      Service::PayPerEmail.new(attributes)
    else
      raise ArgumentError.new("service '#{name}' does not exist")
    end
  end
end
{'fraction_non_alphanumeric': 0.09368191721132897, 'fraction_numerical': 0.0, 'mean_word_length': 4.549848942598187, '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': '1839879', 'n_tokens_mistral': 587, 'n_tokens_neox': 573, 'n_words': 103}