[−][src]Struct stripe::Order
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 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>
upstream_id: Option<String>
The user's order ID if it is different from the Stripe order ID.
Methods
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 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 Clone for Order
[src]
impl Debug for Order
[src]
impl Serialize for Order
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Order
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Unpin for Order
impl Sync for Order
impl Send for Order
impl UnwindSafe for Order
impl RefUnwindSafe for Order
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self