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::Clientwithcontractorsandinvoicesresources: resolve a customer in the contractor catalogue, issue a VAT invoice, fetch its PDF, and have wFirma email it.Wfirma::Drivers::Http(real transport) andWfirma::Drivers::Fake(in-memory, no HTTP) drivers.Wfirma::Resultfor 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 forClient.new. They are defaults for building a client, not a singleton the resources read, so several companies can be invoiced in one process andClient.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
Resultwith an emptyerrorslist. Previously onlyAUTHraised, so a rate-limit block, an outage or a missingcompany_idall surfaced as "it failed" with no reason attached.OK,ERRORandNOT FOUNDstill answer with aResult; an unrecognised code now raisesApiError. AuthErroris now a subclass ofApiErrorrather than ofErrordirectly, sorescue Wfirma::ApiErrorcovers every wFirma-reported failure.Drivers::Fakeraises the same class the real driver does for any armed status code, so failure paths can be exercised offline.Client.newwith no keys configured or passed now raisesArgumentErrorinstead 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.