Changelog

The format follows Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

0.1.0 - 2026-08-12

First release as a standalone gem. The library previously lived inside the iaml-api-user application as lib/wfirma; the entries below are relative to that version, for the one consumer upgrading from it.

Added

  • Wfirma::Client with contractors and invoices resources: resolve a customer in the contractor catalogue, issue a VAT invoice, fetch its PDF, and have wFirma email it.
  • Wfirma::Drivers::Http (real transport) and Wfirma::Drivers::Fake (in-memory, no HTTP) drivers.
  • Wfirma::Result for wFirma's HTTP-200-on-failure responses.
  • Wfirma::Status, covering wFirma's full documented set of top-level status codes, and an exception per class of failure: AccessDeniedError, RequestError, RateLimitError, ServiceUnavailableError, ServerError.
  • Wfirma.configure, supplying defaults for Client.new. They are defaults for building a client, not a singleton the resources read, so several companies can be invoiced in one process and Client.new(driver:) still reads no global state.
  • CI across every supported Ruby (3.3, 3.4, 4.0).

Changed

  • Status codes that abort the request are now raised instead of arriving as a Result with an empty errors list. Previously only AUTH raised, so a rate-limit block, an outage or a missing company_id all surfaced as "it failed" with no reason attached. OK, ERROR and NOT FOUND still answer with a Result; an unrecognised code now raises ApiError.
  • AuthError is now a subclass of ApiError rather than of Error directly, so rescue Wfirma::ApiError covers every wFirma-reported failure.
  • Drivers::Fake raises the same class the real driver does for any armed status code, so failure paths can be exercised offline.
  • Client.new with no keys configured or passed now raises ArgumentError instead of building a client whose every request failed on authentication.
  • Minimum Ruby is 3.3: 3.2 reached end of life on 2026-03-31.