pub struct PreviewLinesCreditNoteLines {
pub amount: Option<i64>,
pub description: Option<String>,
pub invoice_line_item: Option<String>,
pub quantity: Option<u64>,
pub tax_amounts: Option<Vec<TaxAmountWithTaxRateParam>>,
pub tax_rates: Option<Vec<String>>,
pub type_: PreviewLinesCreditNoteLinesType,
pub unit_amount: Option<i64>,
pub unit_amount_decimal: Option<String>,
}
Expand description
Line items that make up the credit note.
One of amount
, lines
, or shipping_cost
must be provided.
Fields§
§amount: Option<i64>
The line item amount to credit.
Only valid when type
is invoice_line_item
.
If invoice is set up with automatic_tax[enabled]=true
, this amount is tax exclusive.
description: Option<String>
The description of the credit note line item. Only valid when the type
is custom_line_item
.
invoice_line_item: Option<String>
The invoice line item to credit. Only valid when the type
is invoice_line_item
.
quantity: Option<u64>
The line item quantity to credit.
tax_amounts: Option<Vec<TaxAmountWithTaxRateParam>>
A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with tax_rates
.
tax_rates: Option<Vec<String>>
The tax rates which apply to the credit note line item.
Only valid when the type
is custom_line_item
and cannot be mixed with tax_amounts
.
type_: PreviewLinesCreditNoteLinesType
Type of the credit note line item, one of invoice_line_item
or custom_line_item
unit_amount: Option<i64>
The integer unit amount in cents (or local equivalent) of the credit note line item.
This unit_amount
will be multiplied by the quantity to get the full amount to credit for this line item.
Only valid when type
is custom_line_item
.
unit_amount_decimal: Option<String>
Same as unit_amount
, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places.
Only one of unit_amount
and unit_amount_decimal
can be set.
Implementations§
Source§impl PreviewLinesCreditNoteLines
impl PreviewLinesCreditNoteLines
pub fn new(type_: impl Into<PreviewLinesCreditNoteLinesType>) -> Self
Trait Implementations§
Source§impl Clone for PreviewLinesCreditNoteLines
impl Clone for PreviewLinesCreditNoteLines
Source§fn clone(&self) -> PreviewLinesCreditNoteLines
fn clone(&self) -> PreviewLinesCreditNoteLines
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more