ICustomerSegmentsApi customerSegmentsApi = client.CustomerSegmentsApi;
CustomerSegmentsApi
Retrieves the list of customer segments of a business.
ListCustomerSegmentsAsync(string cursor = null)
Parameter | Type | Tags | Description |
---|---|---|---|
cursor |
string |
Query, Optional | A pagination cursor returned by previous calls to ListCustomerSegments. Used to retrieve the next set of query results. See the Pagination guide for more information. |
Task<Models.ListCustomerSegmentsResponse>
try
{
ListCustomerSegmentsResponse result = await customerSegmentsApi.ListCustomerSegmentsAsync(null);
}
catch (ApiException e){};
Retrieves a specific customer segment as identified by the segment_id
value.
RetrieveCustomerSegmentAsync(string segmentId)
Parameter | Type | Tags | Description |
---|---|---|---|
segmentId |
string |
Template, Required | The Square-issued ID of the customer segment. |
Task<Models.RetrieveCustomerSegmentResponse>
string segmentId = "segment_id4";
try
{
RetrieveCustomerSegmentResponse result = await customerSegmentsApi.RetrieveCustomerSegmentAsync(segmentId);
}
catch (ApiException e){};