pub struct Order {
Show 22 fields pub id: OrderId, pub amount_subtotal: i64, pub amount_total: i64, pub application: Option<Expandable<Application>>, pub automatic_tax: Option<OrdersV2ResourceAutomaticTax>, pub billing_details: Option<OrdersV2ResourceBillingDetails>, pub client_secret: Option<String>, pub created: Timestamp, pub currency: Currency, pub customer: Option<Expandable<Customer>>, pub description: Option<String>, pub discounts: Option<Vec<Expandable<Discount>>>, pub ip_address: Option<String>, pub line_items: List<CheckoutSessionItem>, pub livemode: bool, pub metadata: Metadata, pub payment: OrdersV2ResourcePayment, pub shipping_cost: Option<OrdersV2ResourceShippingCost>, pub shipping_details: Option<OrdersV2ResourceShippingDetails>, pub status: OrderStatus, pub tax_details: Option<OrdersV2ResourceTaxDetails>, pub total_details: OrdersV2ResourceTotalDetails,
}
Expand description

The resource representing a Stripe “OrdersV2ResourceOrder”.

Fields

id: OrderId

Unique identifier for the object.

amount_subtotal: i64

Order cost before any discounts or taxes are applied.

A positive integer representing the subtotal of the order in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).

amount_total: i64

Total order cost after discounts and taxes are applied.

A positive integer representing the cost of the order in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or equivalent in charge currency.

application: Option<Expandable<Application>>

ID of the Connect application that created the Order, if any.

automatic_tax: Option<OrdersV2ResourceAutomaticTax>billing_details: Option<OrdersV2ResourceBillingDetails>

Customer billing details associated with the order.

client_secret: Option<String>

The client secret of this Order.

Used for client-side retrieval using a publishable key. The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs for creating and processing an order to learn about how client_secret should be handled.

created: Timestamp

Time at which the object was created.

Measured in seconds since the Unix epoch.

currency: Currency

Three-letter ISO currency code, in lowercase.

Must be a supported currency.

customer: Option<Expandable<Customer>>

The customer which this orders belongs to.

description: Option<String>

An arbitrary string attached to the object.

Often useful for displaying to users.

discounts: Option<Vec<Expandable<Discount>>>

The discounts applied to the order.

Use expand[]=discounts to expand each discount.

ip_address: Option<String>

A recent IP address of the purchaser used for tax reporting and tax location inference.

line_items: List<CheckoutSessionItem>

A list of line items the customer is ordering.

Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items.

livemode: bool

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

metadata: 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.

payment: OrdersV2ResourcePaymentshipping_cost: Option<OrdersV2ResourceShippingCost>

The details of the customer cost of shipping, including the customer chosen ShippingRate.

shipping_details: Option<OrdersV2ResourceShippingDetails>

Customer shipping information associated with the order.

status: OrderStatus

The overall status of the order.

tax_details: Option<OrdersV2ResourceTaxDetails>total_details: OrdersV2ResourceTotalDetails

Implementations

Returns a list of your orders.

The orders are returned sorted by creation date, with the most recently created orders appearing first.

Creates a new open order object.

Retrieves the details of an existing order.

Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.

Updates the specific order by setting the values of the parameters passed.

Any parameters not provided will be left unchanged.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

The canonical id type for this object.

The id of the object.

The object’s type, typically represented in wire format as the object property.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more