pub struct Order {
Show 22 fields pub id: OrderId, pub amount: i64, pub amount_returned: Option<i64>, pub application: Option<String>, pub application_fee: Option<i64>, pub charge: Option<Expandable<Charge>>, pub created: Timestamp, pub currency: Currency, pub customer: Option<Expandable<Customer>>, pub email: Option<String>, pub external_coupon_code: Option<String>, pub items: Vec<OrderItem>, pub livemode: bool, pub metadata: Metadata, pub returns: List<OrderReturn>, pub selected_shipping_method: Option<String>, pub shipping: Option<Shipping>, pub shipping_methods: Option<Vec<ShippingMethod>>, pub status: OrderStatus, pub status_transitions: Option<StatusTransitions>, pub updated: Option<Timestamp>, pub upstream_id: Option<String>,
}
Expand description

The resource representing a Stripe “Order”.

Fields

id: OrderId

Unique identifier for the object.

amount: i64

A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order.

amount_returned: Option<i64>

The total amount that was returned to the customer.

application: Option<String>

ID of the Connect Application that created the order.

application_fee: Option<i64>

A fee in cents that will be applied to the order 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.

charge: Option<Expandable<Charge>>

The ID of the payment used to pay for the order.

Present if the order status is paid, fulfilled, or refunded.

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 used for the order.

email: Option<String>

The email address of the customer placing the order.

external_coupon_code: Option<String>

External coupon code to load for this order.

items: Vec<OrderItem>

List of items constituting the order.

An order can have up to 25 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.

returns: List<OrderReturn>

A list of returns that have taken place for this order.

selected_shipping_method: Option<String>

The shipping method that is currently selected for this order, if any.

If present, it is equal to one of the ids of shipping methods in the shipping_methods array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method.

shipping: Option<Shipping>

The shipping address for the order.

Present if the order is for goods to be shipped.

shipping_methods: Option<Vec<ShippingMethod>>

A list of supported shipping methods for this order.

The desired shipping method can be specified either by updating the order, or when paying it.

status: OrderStatus

Current order status.

One of created, paid, canceled, fulfilled, or returned. More details in the Orders Guide.

status_transitions: Option<StatusTransitions>

The timestamps at which the order status was updated.

updated: Option<Timestamp>

Time at which the object was last updated.

Measured in seconds since the Unix epoch.

upstream_id: Option<String>

The user’s order ID if it is different from the Stripe order ID.

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 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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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