com.ibm.commerce.rest.marketing.handler

Class SegmentHandler

    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • RESOURCE_MAPPING_KEY

        public static final java.lang.String RESOURCE_MAPPING_KEY
        The Constant RESOURCE_MAPPING_KEY.
        See Also:
        Constant Field Values
      • RESOURCE_NAME

        public static final java.lang.String RESOURCE_NAME
        Resource name for checkout profile.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SegmentHandler

        public SegmentHandler()
    • Method Detail

      • getResourceName

        public java.lang.String getResourceName()
        Get the resource name
        Returns:
        String
      • checkIsInSegmentByUserId

        @GET
         @Path(value="{segmentId}/isMember")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response checkIsInSegmentByUserId(@PathParam(value="storeId")
                                                                                                                                                                                                                    java.lang.String storeId,
                                                                                                                                                                                                                    @PathParam(value="segmentId")
                                                                                                                                                                                                                    java.lang.String segmentId,
                                                                                                                                                                                                                    @QueryParam(value="userId")
                                                                                                                                                                                                                    java.lang.Long userId,
                                                                                                                                                                                                                    @QueryParam(value="personalizationId")
                                                                                                                                                                                                                    java.lang.String personalizationId,
                                                                                                                                                                                                                    @QueryParam(value="responseFormat")
                                                                                                                                                                                                                    java.lang.String responseFormat)
        Check whether the given customer(identified by userId or personalizationId) is part of given customer segment store/{storeId}/segment/{segmentId}/isMember
        Parameters:
        storeId - the store ID.
        segmentId - the segment ID.
        userId - the user ID.
        personalizationId - the personalization ID.
        responseFormat - the response format.
        Returns:
        Response
      • getCustomerSegment

        @GET
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response getCustomerSegment(@PathParam(value="storeId")
                                                                                                                                                                         java.lang.String storeId,
                                                                                                                                                                         @QueryParam(value="q")
                                                                                                                                                                         java.lang.String q,
                                                                                                                                                                         @QueryParam(value="qUserId")
                                                                                                                                                                         java.lang.Long userId,
                                                                                                                                                                         @QueryParam(value="qPersonalizationId")
                                                                                                                                                                         java.lang.String personalizationId,
                                                                                                                                                                         @QueryParam(value="qName")
                                                                                                                                                                         java.lang.String name,
                                                                                                                                                                         @QueryParam(value="pageNumber")
                                                                                                                                                                         int pageNumber,
                                                                                                                                                                         @QueryParam(value="pageSize")
                                                                                                                                                                         int pageSize,
                                                                                                                                                                         @QueryParam(value="responseFormat")
                                                                                                                                                                         java.lang.String responseFormat)
        Get Customer segment for store, if q is supplied then it will get customer segment by userId or personalizationId. store/{storeId}/segment
        Parameters:
        storeId - the store ID.
        q - the query name.
        userId - the user ID.
        personalizationId - the personalization ID.
        name - the name.
        pageNumber - the page number.
        pageSize - the page size.
        responseFormat - the response format.
        Returns:
        Response
      • getCustomerSegmentById

        @GET
         @Path(value="{segmentId}")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response getCustomerSegmentById(@PathParam(value="storeId")
                                                                                                                                                                                                         java.lang.String storeId,
                                                                                                                                                                                                         @PathParam(value="segmentId")
                                                                                                                                                                                                         java.lang.String segmentId,
                                                                                                                                                                                                         @QueryParam(value="responseFormat")
                                                                                                                                                                                                         java.lang.String responseFormat)
        Get customer segment by ID store/{storeId}/segment/{segmentId}
        Parameters:
        storeId - The store ID.
        segmentId - The segment ID.
        responseFormat - The response format.
        Returns:
        Response