WooCustomer class
A customer account in the store.
Constructors
-
WooCustomer({required int id, required String email, required String firstName, required String lastName, required String username, required String role, required bool isPayingCustomer, required int? ordersCount, required String? totalSpent, required String avatarUrl, required WooAddress billing, required WooAddress shipping, required DateTime? dateCreated, required Map<
String, Object?> raw}) -
Creates a customer.
const
-
WooCustomer.fromJson(Map<
String, Object?> json) -
Reads WooCommerce's representation.
factory
Properties
- avatarUrl → String
-
Their Gravatar.
final
- billing → WooAddress
-
Their billing address.
final
- dateCreated → DateTime?
-
When the account was made.
final
- displayName → String
-
Both names, falling back to the username and then the email.
no setter
- email → String
-
Their email address.
final
- firstName → String
-
Given name.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
The customer id.
final
- isPayingCustomer → bool
-
Whether they have ever completed an order.
final
- lastName → String
-
Family name.
final
- ordersCount → int?
-
How many orders they have placed, or null when the store did not say.
final
-
raw
→ Map<
String, Object?> -
Everything WooCommerce sent, untouched.
final
- role → String
-
Their WordPress role, usually
customer.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shipping → WooAddress
-
Their shipping address.
final
- totalSpent → String?
-
What they have spent in total, as the store's string, or null.
final
- username → String
-
Their WordPress username.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited