Customer class
Represents a Square customer profile in the Customer Directory of a Square seller.
- Annotations
-
- @JsonSerializable()
Constructors
-
Customer({String? id, Address? address, DateTime? birthday, String? companyName, DateTime? createdAt, CustomerCreationSource? creationSource, String? emailAddress, String? familyName, String? givenName, List<
String> ? groupIds, String? nickname, String? note, String? phoneNumber, CustomerPreferences? preferences, String? referenceId, List<String> ? segmentIds, DateTime? updatedAt, int? version}) -
@macro Represents a Square customer profile in the Customer Directory of a Square
seller.
const
-
Customer.fromJson(Map<
String, dynamic> json) -
Converts a Map to an Customer
factory
Properties
- address → Address?
-
The physical address associated with the customer profile.
final
- birthday → DateTime?
-
The birthday associated with the customer profile, in RFC 3339 format.
The year is optional. The timezone and time are not allowed. For example,
0000-09-21T00:00:00-00:00 represents a birthday on September 21 and
1998-09-21T00:00:00-00:00 represents a birthday on September 21, 1998.
final
- companyName → String?
-
A business name associated with the customer profile.
final
- createdAt → DateTime?
-
Read only The timestamp when the customer profile was created, in RFC
3339 format. Examples for January 25th, 2020 6:25:34pm Pacific Standard
Time: UTC: 2020-01-26T02:25:34Z Pacific Standard Time with UTC offset:
2020-01-25T18:25:34-08:00
final
- creationSource → CustomerCreationSource?
-
A creation source represents the method used to create the customer
profile.
final
- emailAddress → String?
-
The email address associated with the customer profile.
final
- familyName → String?
-
The family (i.e., last) name associated with the customer profile.
final
- givenName → String?
-
The given (i.e., first) name associated with the customer profile.
final
-
groupIds
→ List<
String> ? -
The IDs of customer groups the customer belongs to.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
A unique Square-assigned ID for the customer profile.
final
- nickname → String?
-
The IDs of customer groups the customer belongs to.
final
- note → String?
-
A custom note associated with the customer profile.
final
- phoneNumber → String?
-
The 11-digit phone number associated with the customer profile.
final
- preferences → CustomerPreferences?
-
Represents general customer preferences.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- referenceId → String?
-
An optional second ID used to associate the customer profile with an
entity in another system.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
segmentIds
→ List<
String> ? -
The IDs of segments the customer belongs to.
final
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - updatedAt → DateTime?
-
Read only The timestamp when the customer profile was last updated, in
RFC 3339 format.
final
- version → int?
-
he Square-assigned version number of the customer profile. The version
number is incremented each time an update is committed to the customer
profile, except for changes to customer segment membership and cards on
file.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts a Customer to a Map
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited