Initial commit: async Rust client for the Invoice Ninja v5 API
CI / test (push) Canceled after 0s

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>
This commit is contained in:
2026-10-23 14:30:01 -04:00
co-authored by Claude Opus 5
commit ff9a859d0b
25 changed files with 2544 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
use serde::{Deserialize, Serialize};
use serde_json::{Map, Value};
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Project {
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(default)]
pub client_id: String,
#[serde(default)]
pub name: String,
#[serde(default)]
pub number: String,
#[serde(default)]
pub task_rate: f64,
#[serde(default)]
pub due_date: String,
#[serde(default)]
pub budgeted_hours: f64,
#[serde(default)]
pub color: String,
#[serde(default)]
pub public_notes: String,
#[serde(default)]
pub private_notes: String,
#[serde(default)]
pub is_deleted: bool,
#[serde(default)]
pub archived_at: Option<i64>,
#[serde(default)]
pub created_at: Option<i64>,
#[serde(default)]
pub updated_at: Option<i64>,
#[serde(flatten)]
pub extra: Map<String, Value>,
}