Struct stripe::CreateCreditNote
source · pub struct CreateCreditNote<'a> {Show 13 fields
pub amount: Option<i64>,
pub credit_amount: Option<i64>,
pub effective_at: Option<Timestamp>,
pub expand: &'a [&'a str],
pub invoice: InvoiceId,
pub lines: Option<Vec<CreateCreditNoteLines>>,
pub memo: Option<&'a str>,
pub metadata: Option<Metadata>,
pub out_of_band_amount: Option<i64>,
pub reason: Option<CreditNoteReason>,
pub refund: Option<RefundId>,
pub refund_amount: Option<i64>,
pub shipping_cost: Option<CreateCreditNoteShippingCost>,
}
Expand description
The parameters for CreditNote::create
.
Fields§
§amount: Option<i64>
The integer amount in cents (or local equivalent) representing the total amount of the credit note.
credit_amount: Option<i64>
The integer amount in cents (or local equivalent) representing the amount to credit the customer’s balance, which will be automatically applied to their next invoice.
effective_at: Option<Timestamp>
The date when this credit note is in effect.
Same as created
unless overwritten.
When defined, this value replaces the system-generated ‘Date of issue’ printed on the credit note PDF.
expand: &'a [&'a str]
Specifies which fields in the response should be expanded.
invoice: InvoiceId
ID of the invoice.
lines: Option<Vec<CreateCreditNoteLines>>
Line items that make up the credit note.
memo: Option<&'a str>
The credit note’s memo appears on the credit note PDF.
metadata: Option<Metadata>
Set of key-value pairs that you can attach to an object.
This can be useful for storing additional information about the object in a structured format.
Individual keys can be unset by posting an empty value to them.
All keys can be unset by posting an empty value to metadata
.
out_of_band_amount: Option<i64>
The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
reason: Option<CreditNoteReason>
Reason for issuing this credit note, one of duplicate
, fraudulent
, order_change
, or product_unsatisfactory
.
refund: Option<RefundId>
ID of an existing refund to link this credit note to.
refund_amount: Option<i64>
The integer amount in cents (or local equivalent) representing the amount to refund.
If set, a refund will be created for the charge associated with the invoice.
shipping_cost: Option<CreateCreditNoteShippingCost>
When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
Implementations§
Trait Implementations§
source§impl<'a> Clone for CreateCreditNote<'a>
impl<'a> Clone for CreateCreditNote<'a>
source§fn clone(&self) -> CreateCreditNote<'a>
fn clone(&self) -> CreateCreditNote<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'a> Debug for CreateCreditNote<'a>
impl<'a> Debug for CreateCreditNote<'a>
Auto Trait Implementations§
impl<'a> Freeze for CreateCreditNote<'a>
impl<'a> RefUnwindSafe for CreateCreditNote<'a>
impl<'a> Send for CreateCreditNote<'a>
impl<'a> Sync for CreateCreditNote<'a>
impl<'a> Unpin for CreateCreditNote<'a>
impl<'a> UnwindSafe for CreateCreditNote<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)