Skip to main content

amazon_spapi/models/orders_v0/
orders_list.rs

1/*
2 * Selling Partner API for Orders
3 *
4 * Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools.   _Note:_ For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don't show up in the response).
5 *
6 * The version of the OpenAPI document: v0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// OrdersList : A list of orders along with additional information to make subsequent API calls.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct OrdersList {
17    /// A list of orders.
18    #[serde(rename = "Orders")]
19    pub orders: Vec<models::orders_v0::Order>,
20    /// When present and not empty, pass this string token in the next request to return the next response page.
21    #[serde(rename = "NextToken", skip_serializing_if = "Option::is_none")]
22    pub next_token: Option<String>,
23    /// Use this date to select orders that were last updated before (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. Use [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format for all dates.
24    #[serde(rename = "LastUpdatedBefore", skip_serializing_if = "Option::is_none")]
25    pub last_updated_before: Option<String>,
26    /// Use this date to select orders created before (or at) a specified time. Only orders placed before the specified time are returned. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
27    #[serde(rename = "CreatedBefore", skip_serializing_if = "Option::is_none")]
28    pub created_before: Option<String>,
29}
30
31impl OrdersList {
32    /// A list of orders along with additional information to make subsequent API calls.
33    pub fn new(orders: Vec<models::orders_v0::Order>) -> OrdersList {
34        OrdersList {
35            orders,
36            next_token: None,
37            last_updated_before: None,
38            created_before: None,
39        }
40    }
41}
42