[][src]Struct stripe::CreateInvoice

pub struct CreateInvoice<'a> {
    pub application_fee_amount: Option<i64>,
    pub auto_advance: Option<bool>,
    pub billing: Option<CollectionMethod>,
    pub collection_method: Option<CollectionMethod>,
    pub custom_fields: Option<Vec<CustomField>>,
    pub customer: CustomerId,
    pub days_until_due: Option<u32>,
    pub default_payment_method: Option<&'a str>,
    pub default_source: Option<&'a str>,
    pub default_tax_rates: Option<Vec<String>>,
    pub description: Option<&'a str>,
    pub due_date: Option<Timestamp>,
    pub expand: &'a [&'a str],
    pub footer: Option<&'a str>,
    pub metadata: Option<Metadata>,
    pub statement_descriptor: Option<&'a str>,
    pub subscription: Option<SubscriptionId>,
    pub tax_percent: Option<f64>,
}

The parameters for Invoice::create.

Fields

application_fee_amount: Option<i64>

A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account.

The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation.

auto_advance: Option<bool>

Controls whether Stripe will perform automatic collection of the invoice.

When false, the invoice's state will not automatically advance without an explicit action.

billing: Option<CollectionMethod>

This field has been renamed to collection_method and will be removed in a future API version.

collection_method: Option<CollectionMethod>

Either charge_automatically, or send_invoice.

When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to charge_automatically.

custom_fields: Option<Vec<CustomField>>

A list of up to 4 custom fields to be displayed on the invoice.

customer: CustomerIddays_until_due: Option<u32>

The number of days from when the invoice is created until it is due.

Valid only for invoices where collection_method=send_invoice.

default_payment_method: Option<&'a str>

ID of the default payment method for the invoice.

It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.

default_source: Option<&'a str>

ID of the default payment source for the invoice.

It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.

default_tax_rates: Option<Vec<String>>

The tax rates that will apply to any line item that does not have tax_rates set.

description: Option<&'a str>due_date: Option<Timestamp>

The date on which payment for this invoice is due.

Valid only for invoices where collection_method=send_invoice.

expand: &'a [&'a str]

Specifies which fields in the response should be expanded.

footer: Option<&'a str>

Footer to be displayed on the invoice.

metadata: Option<Metadata>statement_descriptor: Option<&'a str>

Extra information about a charge for the customer's credit card statement.

It must contain at least one letter. If not specified and this invoice is part of a subscription, the default statement_descriptor will be set to the first subscription item's product's statement_descriptor.

subscription: Option<SubscriptionId>

The ID of the subscription to invoice, if any.

If not set, the created invoice will include all pending invoice items for the customer. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription. The subscription's billing cycle and regular subscription events won't be affected.

tax_percent: Option<f64>

The percent tax rate applied to the invoice, represented as a decimal number.

This field has been deprecated and will be removed in a future API version, for further information view the migration docs for tax_rates.

Implementations

impl<'a> CreateInvoice<'a>[src]

pub fn new(customer: CustomerId) -> Self[src]

Trait Implementations

impl<'a> Clone for CreateInvoice<'a>[src]

impl<'a> Debug for CreateInvoice<'a>[src]

impl<'a> Serialize for CreateInvoice<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for CreateInvoice<'a>

impl<'a> Send for CreateInvoice<'a>

impl<'a> Sync for CreateInvoice<'a>

impl<'a> Unpin for CreateInvoice<'a>

impl<'a> UnwindSafe for CreateInvoice<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.