CustomerService class

URL: https://developer.squareup.com/reference/square/customers-api Create and manage customer profiles and sync CRM systems with Square.

The Customers API enables you to create and manage customer profiles, as well as search for customers based on various criteria (including customer group membership). You can also use the API to sync contacts between your CRM system and Square.

Constructors

CustomerService({required String baseUrl, required AuthenticationService authenticationService})

Properties

authenticationService AuthenticationService
final
baseUrl String
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addCustomerToGroup({required String customerId, required String groupId, String? authToken}) Future<bool>
Adds a group membership to a customer.
createCustomer({required CustomerUpsertRequest request, String? authToken}) Future<Customer>
Creates a new customer for a business.
createCustomerGroup({required CreateCustomerGroup request, String? authToken}) Future<CustomerGroup>
Creates a new customer group for a business.
deleteCustomer({required String customerId, String? authToken}) Future<bool>
Deletes a customer profile from a business.
deleteCustomerGroup({required String groupId, String? authToken}) Future<bool>
Deletes a customer group as identified by the group_id value.
listCustomer({required ListCustomerRequest request, String? authToken}) Future<List<Customer>>
Lists customer profiles associated with a Square account.
listCustomerGroup({required SearchRequest request, String? authToken}) Future<CustomerGroupResponse>
Retrieves the list of customer groups of a business.
listCustomerSegments({required SearchRequest request, String? authToken}) Future<CustomerSegmentResponse>
Retrieves the list of customer segments of a business.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readCustomer({required String customerId, String? authToken}) Future<Customer>
Returns details for a single customer.
readCustomerGroup({required String groupId, String? authToken}) Future<CustomerGroup>
Retrieves a specific customer group as identified by the group_id value.
readCustomerSegments({required String segmentId, String? authToken}) Future<CustomerSegment>
Retrieves a specific customer segment as identified by the segment_id value.
removeCustomerFromGroup({required String customerId, required String groupId, String? authToken}) Future<bool>
Removes a group membership from a customer.
searchCustomer({required SearchCustomerRequest request, String? authToken}) Future<CustomerResponse>
Searches the customer profiles associated with a Square account using a supported query filter.
toString() String
A string representation of this object.
inherited
updateCustomer({required String customerId, required CustomerUpsertRequest request, String? authToken}) Future<Customer>
Updates a customer profile.
updateCustomerGroup({required String groupId, required CustomerGroup group, String? authToken}) Future<CustomerGroup>
Updates a customer group as identified by the group_id value.

Operators

operator ==(Object other) bool
The equality operator.
inherited