Struct stripe::Order [−][src]
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>
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 id
s 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
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]
client: &Client,
id: &OrderId,
expand: &[&str]
) -> Response<Order>
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]
client: &Client,
id: &OrderId,
params: UpdateOrder<'_>
) -> Response<Order>
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Object for Order
[src]
type Id = OrderId
The canonical id type for this object.
fn id(&self) -> Self::Id
[src]
fn object(&self) -> &'static str
[src]
impl Serialize for Order
[src]
Auto Trait Implementations
impl RefUnwindSafe for Order
[src]
impl Send for Order
[src]
impl Sync for Order
[src]
impl Unpin for Order
[src]
impl UnwindSafe for Order
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,