/** * Segments service. * @module api/SegmentsApi */ export default class SegmentsApi { /** * Constructs a new SegmentsApi. * @alias SegmentsApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ constructor(apiClient?: any); apiClient: any; /** * Callback function to receive the result of the createSegment operation. * @callback createSegmentCallback * @param {Error|null} error Error object if failed, null otherwise. * @param {SegmentsCreateResponseBody} [data] The data returned by the service call. * @param {Object} [response] Full response object if successful. */ /** * Create Segment * Create a customer segment. Limit on static segments There is a cap on the number of customers that you can assign to a static segment: **20,000**. If you would like to create a bigger segment, then you can use the unlimited auto-update or passive segment instead and use some customer metadata to build this segment. Limit on Active and Passive segments You can create a maximum of 100 passive and active segments. * @param {SegmentsCreateRequestBody} segmentsCreateRequestBody Specify the boundary conditions for the customer segment. * @param {createSegmentCallback} [callback] The callback function, accepting three arguments: error, data, response * data is of type: {@link SegmentsCreateResponseBody} * @returns {Promise<(SegmentsCreateResponseBody | undefined)>} Depending on whether the `callback` parameter is provided, the promise will resolve with a `SegmentsCreateResponseBody` object or with `undefined`. */ createSegment(segmentsCreateRequestBody: SegmentsCreateRequestBody, callback?: (error: Error | null, data?: SegmentsCreateResponseBody, response?: any) => any): Promise<(SegmentsCreateResponseBody | undefined)>; /** * Callback function to receive the result of the deleteSegment operation. * @callback deleteSegmentCallback * @param {Error|null} error Error object if failed, null otherwise. * @param data This operation does not return a value. * @param {Object} [response] Full response object if successful. */ /** * Delete Segment * This method deletes a customer segment. * @param {String} segmentId A unique customer segment ID. * @param {deleteSegmentCallback} [callback] The callback function, accepting three arguments: error, data, response * @returns {Promise<( | undefined)>} Depending on whether the `callback` parameter is provided, the promise will resolve with a `` object or with `undefined`. */ deleteSegment(segmentId: string, callback?: (error: Error | null, data: any, response?: any) => any): Promise<(undefined)>; /** * Callback function to receive the result of the getSegment operation. * @callback getSegmentCallback * @param {Error|null} error Error object if failed, null otherwise. * @param {SegmentsGetResponseBody} [data] The data returned by the service call. * @param {Object} [response] Full response object if successful. */ /** * Get Segment * Retrieves the segment with a given segment ID. This method doesnt return the customers that belong to the segment. To return a list of customers who belong to a segment, use [GET List customers](/api-reference/customers/list-customers) endpoint with the segment_id query parameter. * @param {String} segmentId A unique customer segment ID. * @param {getSegmentCallback} [callback] The callback function, accepting three arguments: error, data, response * data is of type: {@link SegmentsGetResponseBody} * @returns {Promise<(SegmentsGetResponseBody | undefined)>} Depending on whether the `callback` parameter is provided, the promise will resolve with a `SegmentsGetResponseBody` object or with `undefined`. */ getSegment(segmentId: string, callback?: (error: Error | null, data?: SegmentsGetResponseBody, response?: any) => any): Promise<(SegmentsGetResponseBody | undefined)>; } import SegmentsCreateRequestBody from '../model/SegmentsCreateRequestBody'; import SegmentsCreateResponseBody from '../model/SegmentsCreateResponseBody'; import SegmentsGetResponseBody from '../model/SegmentsGetResponseBody';