Files
invoiceninja-sdk/README.md
T
awkawbandClaude Opus 5 ff9a859d0b
CI / test (push) Canceled after 0s
Initial commit: async Rust client for the Invoice Ninja v5 API
Covers Clients, Invoices, Quotes, Credits, Payments, Products, Expenses,
Projects, Tasks, and Vendors, each with list, list_all, get, create,
update, and delete, generated by the resource_methods! macro.

Every model carries a #[serde(flatten)] extra map so fields the API
returns but the crate does not model survive a get/update round-trip
instead of being silently dropped.

Includes a Nix dev shell (Rust via rust-overlay), a GitHub Actions CI
workflow running build/test/fmt/clippy, and round-trip tests for the
extra-preservation invariant.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-23 14:30:01 -04:00

1.1 KiB

invoiceninjars

An async Rust client for the Invoice Ninja v5 API.

Development

Enter the dev shell (Rust toolchain via rust-overlay):

nix develop

Usage

use invoiceninjars::{InvoiceNinjaClient, models::ListParams};

let client = InvoiceNinjaClient::new(
    "https://invoicing.co/api/v1", // or your self-hosted base URL
    std::env::var("IN_API_TOKEN")?,
)?;

let clients = client.list_clients(&ListParams::new().per_page(50)).await?;

List endpoints are paginated. list_* returns a single page; list_all_* follows pagination and returns every matching record:

let all_clients = client.list_all_clients(&ListParams::new()).await?;

Run the example (requires IN_API_TOKEN, optionally IN_BASE_URL):

IN_API_TOKEN=... cargo run --example list_clients

Coverage

Clients, Invoices, Quotes, Credits, Payments, Products, Expenses, Projects, Tasks, and Vendors, each with list, list_all, get, create, update, and delete. Add more resources by adding a model under src/models/ and a resource_methods! invocation in src/client.rs.