square_api_client/models/search_orders_response.rs
1//! Model struct for SearchOrdersResponse type
2
3use serde::Deserialize;
4
5use super::{errors::Error, Order, OrderEntry};
6
7/// This is a model struct for SearchOrdersResponse type
8#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq)]
9pub struct SearchOrdersResponse {
10 /// A list of [OrderEntries](OrderEntry) that fit the query conditions. The list is populated
11 /// only if `return_entries` is set to `true` in the request.
12 pub order_entries: Option<Vec<OrderEntry>>,
13 /// A list of [Order] objects that match the query conditions. The list is populated only if
14 /// `return_entries` is set to `false` in the request.
15 pub orders: Option<Vec<Order>>,
16 /// The pagination cursor to be used in a subsequent request. If unset, this is the final
17 /// response. For more information, see
18 /// [Pagination](https://developer.squareup.com/docs/basics/api101/pagination).
19 pub cursor: Option<String>,
20 /// [Error]s encountered during the search
21 pub errors: Option<Vec<Error>>,
22}