Module: Ksef

Defined in:
lib/ksef.rb,
lib/ksef/client.rb,
lib/ksef/errors.rb,
lib/ksef/session.rb,
lib/ksef/version.rb,
lib/ksef/invoices.rb,
lib/ksef/sessions.rb,
lib/ksef/configuration.rb,
lib/ksef/invoice_header.rb,
lib/ksef/credentials/token.rb,
lib/ksef/internal/connection.rb,
lib/ksef/credentials/certificate.rb,
lib/ksef/internal/token_encryptor.rb

Overview

Ruby client for the Polish KSeF 2.0 (Krajowy System e-Faktur) API.

Examples:

Global configuration

Ksef.configure do |c|
  c.environment = :test
  c.user_agent  = "Pro Bau / ksef-rb #{Ksef::VERSION}"
end

Defined Under Namespace

Modules: Credentials, Internal Classes: AuthError, Client, ClientError, Configuration, ConfigurationError, Error, InvoiceHeader, Invoices, NotFoundError, RateLimitError, ServerError, Session, Sessions

Constant Summary collapse

VERSION =
"0.1.2"

Class Method Summary collapse

Class Method Details

.configurationKsef::Configuration

Returns:



26
27
28
# File 'lib/ksef.rb', line 26

def configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Yields the singleton Configuration for in-place mutation.

Yields:



31
32
33
34
# File 'lib/ksef.rb', line 31

def configure
  yield(configuration)
  configuration
end

.reset_configuration!Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Resets the global configuration (primarily for tests).



38
39
40
# File 'lib/ksef.rb', line 38

def reset_configuration!
  @configuration = Configuration.new
end