pub struct SearchOrdersDateTimeFilter {
pub created_at: Option<TimeRange>,
pub updated_at: Option<TimeRange>,
pub closed_at: Option<TimeRange>,
}
Expand description
Filter for Order
objects based on whether their CREATED_AT
, CLOSED_AT
, or UPDATED_AT
timestamps fall within a specified time range.
You can specify the time range and which timestamp to filter for. You can filter for only one time range at a time.
For each time range, the start time and end time are inclusive. If the end time is absent, it defaults to the time of the first request for the cursor.
Important: If you use the DateTimeFilter
in a SearchOrders
query, you must set the
sort_field
in OrdersSort to the same field you filter for. For example, if
you set the CLOSED_AT
field in DateTimeFilter
, you must set the sort_field
in
SearchOrdersSort
to CLOSED_AT
. Otherwise, SearchOrders
throws an error.
Learn more about filtering orders by time
range.
Fields§
§created_at: Option<TimeRange>
The time range for filtering on the created_at
timestamp. If you use this value, you must
set the sort_field
in the OrdersSearchSort
object to CREATED_AT
.
updated_at: Option<TimeRange>
The time range for filtering on the updated_at
timestamp. If you use this value, you must
set the sort_field
in the OrdersSearchSort
object to UPDATED_AT
.
closed_at: Option<TimeRange>
The time range for filtering on the closed_at
timestamp. If you use this value, you must
set the sort_field
in the OrdersSearchSort
object to CLOSED_AT
.
Trait Implementations§
Source§impl Clone for SearchOrdersDateTimeFilter
impl Clone for SearchOrdersDateTimeFilter
Source§fn clone(&self) -> SearchOrdersDateTimeFilter
fn clone(&self) -> SearchOrdersDateTimeFilter
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SearchOrdersDateTimeFilter
impl Debug for SearchOrdersDateTimeFilter
Source§impl Default for SearchOrdersDateTimeFilter
impl Default for SearchOrdersDateTimeFilter
Source§fn default() -> SearchOrdersDateTimeFilter
fn default() -> SearchOrdersDateTimeFilter
impl Eq for SearchOrdersDateTimeFilter
impl StructuralPartialEq for SearchOrdersDateTimeFilter
Auto Trait Implementations§
impl Freeze for SearchOrdersDateTimeFilter
impl RefUnwindSafe for SearchOrdersDateTimeFilter
impl Send for SearchOrdersDateTimeFilter
impl Sync for SearchOrdersDateTimeFilter
impl Unpin for SearchOrdersDateTimeFilter
impl UnwindSafe for SearchOrdersDateTimeFilter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.