Skip to content

Latest commit

 

History

History
73 lines (48 loc) · 1.78 KB

customer-segments.md

File metadata and controls

73 lines (48 loc) · 1.78 KB

Customer Segments

ICustomerSegmentsApi customerSegmentsApi = client.CustomerSegmentsApi;

Class Name

CustomerSegmentsApi

Methods

List Customer Segments

Retrieves the list of customer segments of a business.

ListCustomerSegmentsAsync(string cursor = null)

Parameters

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.

Response Type

Task<Models.ListCustomerSegmentsResponse>

Example Usage

try
{
    ListCustomerSegmentsResponse result = await customerSegmentsApi.ListCustomerSegmentsAsync(null);
}
catch (ApiException e){};

Retrieve Customer Segment

Retrieves a specific customer segment as identified by the segment_id value.

RetrieveCustomerSegmentAsync(string segmentId)

Parameters

Parameter Type Tags Description
segmentId string Template, Required The Square-issued ID of the customer segment.

Response Type

Task<Models.RetrieveCustomerSegmentResponse>

Example Usage

string segmentId = "segment_id4";

try
{
    RetrieveCustomerSegmentResponse result = await customerSegmentsApi.RetrieveCustomerSegmentAsync(segmentId);
}
catch (ApiException e){};