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: OrdersV2ResourcePayment
shipping_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
sourceimpl Order
impl Order
sourcepub fn list(client: &Client, params: &ListOrders<'_>) -> Response<List<Order>>
pub fn list(client: &Client, params: &ListOrders<'_>) -> Response<List<Order>>
Returns a list of your orders.
The orders are returned sorted by creation date, with the most recently created orders appearing first.
sourcepub fn create(client: &Client, params: CreateOrder<'_>) -> Response<Order>
pub fn create(client: &Client, params: CreateOrder<'_>) -> Response<Order>
Creates a new open
order object.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Order
impl<'de> Deserialize<'de> for Order
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Order
impl Send for Order
impl Sync for Order
impl Unpin for Order
impl UnwindSafe for Order
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more