diff --git a/src/resources/invoice_ext.rs b/src/resources/invoice_ext.rs index 93b5ef8f1..b4550293f 100644 --- a/src/resources/invoice_ext.rs +++ b/src/resources/invoice_ext.rs @@ -40,6 +40,13 @@ impl Invoice { pub fn search(client: &Client, params: InvoiceSearchParams) -> Response> { client.get_query("/invoices/search", params) } + + /// Voids an invoice. + /// + /// For more details see . + pub fn void(client: &Client, invoice_id: &InvoiceId) -> Response { + client.post(&format!("/invoices/{}/void", invoice_id)) + } } #[derive(Clone, Debug, Serialize)]