[][src]Struct stripe::Order

pub struct Order {
    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>,
}

The resource representing a Stripe "Order".

For more details see https://stripe.com/docs/api/orders/object.

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>application: Option<String>

ID of the Connect Application that created the order.

application_fee: Option<i64>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>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>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>upstream_id: Option<String>

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

Implementations

impl Order[src]

pub fn list(client: &Client, params: ListOrders) -> Response<List<Order>>[src]

Returns a list of your orders.

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

pub fn create(client: &Client, params: CreateOrder) -> Response<Order>[src]

Creates a new order object.

pub fn retrieve(
    client: &Client,
    id: &OrderId,
    expand: &[&str]
) -> Response<Order>
[src]

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.

pub fn update(
    client: &Client,
    id: &OrderId,
    params: UpdateOrder
) -> Response<Order>
[src]

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

Any parameters not provided will be left unchanged.

Trait Implementations

impl Clone for Order[src]

impl Debug for Order[src]

impl<'de> Deserialize<'de> for Order[src]

impl Object for Order[src]

type Id = OrderId

The canonical id type for this object.

impl Serialize for Order[src]

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

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.