pub struct CreateCreditNoteInput {
pub invoice_id: String,
pub reason: CreditNoteReason,
pub description: Option<String>,
pub credit_amount_cents: i64,
pub refund_amount_cents: i64,
pub items: Vec<CreateCreditNoteItemInput>,
}Expand description
Input parameters for creating a credit note.
Fields§
§invoice_id: StringThe Lago ID of the invoice to credit
reason: CreditNoteReasonThe reason for the credit note
description: Option<String>Optional description
credit_amount_cents: i64The amount to be credited in cents
refund_amount_cents: i64The amount to be refunded in cents
items: Vec<CreateCreditNoteItemInput>The line items for the credit note
Implementations§
Source§impl CreateCreditNoteInput
impl CreateCreditNoteInput
Sourcepub fn new(
invoice_id: String,
reason: CreditNoteReason,
credit_amount_cents: i64,
refund_amount_cents: i64,
items: Vec<CreateCreditNoteItemInput>,
) -> Self
pub fn new( invoice_id: String, reason: CreditNoteReason, credit_amount_cents: i64, refund_amount_cents: i64, items: Vec<CreateCreditNoteItemInput>, ) -> Self
Creates a new credit note input.
§Arguments
invoice_id- The Lago ID of the invoice to creditreason- The reason for the credit notecredit_amount_cents- The amount to be credited in centsrefund_amount_cents- The amount to be refunded in centsitems- The line items for the credit note
Sourcepub fn with_description(self, description: String) -> Self
pub fn with_description(self, description: String) -> Self
Sets the description for the credit note.
Trait Implementations§
Source§impl Clone for CreateCreditNoteInput
impl Clone for CreateCreditNoteInput
Source§fn clone(&self) -> CreateCreditNoteInput
fn clone(&self) -> CreateCreditNoteInput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateCreditNoteInput
impl Debug for CreateCreditNoteInput
Source§impl<'de> Deserialize<'de> for CreateCreditNoteInput
impl<'de> Deserialize<'de> for CreateCreditNoteInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CreateCreditNoteInput
impl RefUnwindSafe for CreateCreditNoteInput
impl Send for CreateCreditNoteInput
impl Sync for CreateCreditNoteInput
impl Unpin for CreateCreditNoteInput
impl UnwindSafe for CreateCreditNoteInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more