lago-client 0.1.24

Lago API client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use lago_client::LagoClient;
use lago_types::requests::invoice::ListInvoicesRequest;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = LagoClient::from_env()?;

    let request = ListInvoicesRequest::default();
    let invoices = client.list_invoices(Some(request)).await?;

    println!("Found {} invoices", invoices.invoices.len());

    Ok(())
}