WooSortCoupon enum
WooCommerce Coupon Sort Enumeration
Defines the possible sorting options for coupons in WooCommerce. Used to specify how coupon collections should be ordered when retrieved.
Usage Examples
// Sort coupons by creation date
final coupons = await wooCommerce.getCoupons(
orderby: WooSortCoupon.date,
);
// Sort coupons by modification date
final recentCoupons = await wooCommerce.getCoupons(
orderby: WooSortCoupon.modified,
order: WooSortOrder.desc,
);
// Sort coupons by ID
final sortedById = await wooCommerce.getCoupons(
orderby: WooSortCoupon.id,
);
Values
- date → const WooSortCoupon
-
Sort by coupon creation date
- modified → const WooSortCoupon
-
Sort by coupon last modified date
- id → const WooSortCoupon
-
Sort by coupon ID
- include → const WooSortCoupon
-
Sort by included coupon IDs
- title → const WooSortCoupon
-
Sort by coupon title/name
- slug → const WooSortCoupon
-
Sort by coupon slug
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
WooSortCoupon> - A constant List of the values in this enum, in order of their declaration.