Sha256: 4ed689c439cc1ebe8e5357628d6017f3c657a9b1cde7b7900a3957be58aad101

Contents?: true

Size: 532 Bytes

Versions: 3

Compression:

Stored size: 532 Bytes

Contents

# frozen_string_literal: true

require_relative 'anaf/web_services/version'
require_relative 'anaf/web_services'

module ANAF # :nodoc:
  class << self
    def get_company(cui)
      WebServices::VatRegistry.new([cui]).call.first
    rescue WebServices::InvalidRequest
      nil
    end

    def get_companies(cuis)
      WebServices::VatRegistry.new(cuis).call.first
    rescue WebServices::InvalidRequest
      []
    end

    def get_balance_sheet(cui, year)
      WebServices::BalanceSheet.new(cui, year).call
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
anaf-web_services-0.3.1 lib/anaf.rb
anaf-web_services-0.3.0 lib/anaf.rb
anaf-web_services-0.2.0 lib/anaf.rb