stripe/resources/
credit_note_ext.rs

1use crate::client::{Client, Response};
2use crate::ids::CreditNoteId;
3use crate::resources::CreditNote;
4
5impl CreditNote {
6    /// Marks a credit note as void.
7    ///
8    /// You can only void a credit note if the associated invoice is open.
9    pub fn void(client: &Client, id: &CreditNoteId) -> Response<CreditNote> {
10        client.post(&format!("/credit_notes/{}/void", id))
11    }
12}