WooOrders class
Orders and the queries over them.
Constructors
- WooOrders(WooCommerce _client)
-
Creates the resource. Reached through
WooCommerce.orders.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
all(
{int perPage = 100, List< WooOrderStatus> ? statuses, DateTime? after}) → Stream<WooOrder> - Walks every page, yielding orders as they arrive.
-
batch(
{List< Map< create = const <Map<String, Object?>>[], List<String, Object?> >Map< update = const <Map<String, Object?>>[], List<String, Object?> >int> delete = const <int>[]}) → Future<WooBatchResult< WooOrder> > - Creates, updates, and deletes in one request.
-
create(
{required List< WooLineItem> lineItems, WooAddress? billing, WooAddress? shipping, String? paymentMethod, String? paymentMethodTitle, String? customerNote, int? customerId, bool setPaid = false, Map<String, Object?> extra = const <String, Object?>{}}) → Future<WooOrder> - Places an order.
-
delete(
int id, {bool force = false}) → Future< WooOrder> -
Deletes an order, to the trash unless
forceis set. -
get(
int id) → Future< WooOrder> - Fetches one order.
-
list(
{int page = 1, int perPage = 10, String? search, List< WooOrderStatus> ? statuses, int? customerId, int? productId, List<int> ? include, List<int> ? exclude, DateTime? after, DateTime? before, bool descending = true}) → Future<WooPage< WooOrder> > - Lists orders.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setStatus(
int id, WooOrderStatus status) → Future< WooOrder> - Moves an order to a new status.
-
setStatusRaw(
int id, String status) → Future< WooOrder> - Moves an order to a status this package does not model.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
int id, Map< String, Object?> fields) → Future<WooOrder> - Updates an order, changing only the fields given.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited