Class OfferParams.Builder
- java.lang.Object
-
- com.cheetahdigital.corekit.rest.params.BaseParams.BaseBuilder<P,B>
-
- com.cheetahdigital.corekit.rest.params.BaseListQueryParams.BaseListQueryBuilder<OfferParams,OfferParams.Builder>
-
- com.cheetahdigital.offers.core.api.OfferParams.Builder
-
- Enclosing class:
- OfferParams
public static class OfferParams.Builder extends BaseListQueryParams.BaseListQueryBuilder<OfferParams,OfferParams.Builder>
Builder class forOfferParams
-
-
Field Summary
-
Fields inherited from class com.cheetahdigital.corekit.rest.params.BaseParams.BaseBuilder
mQueryParams
-
-
Constructor Summary
Constructors Constructor Description Builder()
Default constructorBuilder(OfferParams queryParams)
Create a builder class from an existingOfferParams
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OfferParams.Builder
addProcessingStatus(java.lang.String processingStatus)
Add a processing status to the listOfferParams.Builder
addProcessingStatus(java.lang.String... processingStatus)
Set the status if clipped or unclippedprotected OfferParams
createQueryParams()
Instantiates the implementation classOfferParams.Builder
setApplyToCategories(java.lang.String applyToCategories)
Set the category to apply has_usable and has_processing_status response filters only to Offers with categories matching with the provided valueOfferParams.Builder
setClipStatus(java.lang.String clipStatus)
Set the clip statusOfferParams.Builder
setDisplayableProcessingStatuses(java.lang.String displayableProcessingStatuses)
Set visibility of embedded responses with processing status matching its value.OfferParams.Builder
setEndIndex(java.lang.Integer endIndex)
Set the end index of the available Offers subset.OfferParams.Builder
setHasProcessingStatus(java.lang.String hasProcessingStatus)
Set the processing status to only show offers with responses having processing_status = to submitted values.OfferParams.Builder
setHasUsable(java.lang.Boolean hasUsable)
Set to only show offers with responses that are still usable.OfferParams.Builder
setIncludeClipped(java.lang.Boolean includeClipped)
Set the visibility of is_clipped tagOfferParams.Builder
setIncludeResponses(java.lang.Boolean includeResponses)
Set to include offer responsesOfferParams.Builder
setOfferType(java.lang.String offerType)
Set the offer type that will be used to filter the type of offers that will be included in the response.OfferParams.Builder
setOfferWithResponses(java.lang.Boolean offerWithResponses)
Set the visibility of offer responsesOfferParams.Builder
setPlacement(java.lang.String placement)
Set the offer set nameOfferParams.Builder
setPrioritizedCategory(java.lang.String prioritizedCategory)
Set the prioritized category to sort the Offers by the given valueOfferParams.Builder
setRespondable(java.lang.Boolean respondable)
Set to show respondable offersOfferParams.Builder
setResultWithCategories(java.lang.Boolean resultWithCategories)
Set to show the categories associated by the offerOfferParams.Builder
setSet(java.lang.String set)
Set the internal name of Offer setOfferParams.Builder
setShowClipped(java.lang.Boolean showClipped)
Set to show is_clipped attributeOfferParams.Builder
setShowTarget(java.lang.Boolean showTarget)
Set the visibility of offer targetOfferParams.Builder
setStartIndex(java.lang.Integer startIndex)
Set the start index of the available Offers subset.OfferParams.Builder
setUsable(java.lang.Boolean usable)
Set the visibility of usable offer responses-
Methods inherited from class com.cheetahdigital.corekit.rest.params.BaseListQueryParams.BaseListQueryBuilder
addCategories, addCategory, setItemsPerPage, setLayout, setPage, setSortBy, setSortOrder
-
Methods inherited from class com.cheetahdigital.corekit.rest.params.BaseParams.BaseBuilder
build, setId
-
-
-
-
Constructor Detail
-
Builder
public Builder(OfferParams queryParams)
Create a builder class from an existingOfferParams
- Parameters:
queryParams
-OfferParams
to be reused
-
Builder
public Builder()
Default constructor
-
-
Method Detail
-
setIncludeClipped
public OfferParams.Builder setIncludeClipped(@Nullable java.lang.Boolean includeClipped)
Set the visibility of is_clipped tag- Parameters:
includeClipped
-true
to show is_clipped tag- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setIncludeResponses
public OfferParams.Builder setIncludeResponses(@Nullable java.lang.Boolean includeResponses)
Set to include offer responses- Parameters:
includeResponses
-true
to include offer responses- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setResultWithCategories
public OfferParams.Builder setResultWithCategories(@Nullable java.lang.Boolean resultWithCategories)
Set to show the categories associated by the offer- Parameters:
resultWithCategories
-true
to show the categories associated by the offer- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setSet
public OfferParams.Builder setSet(@Nullable java.lang.String set)
Set the internal name of Offer set- Parameters:
set
- internal name of Offer set- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setStartIndex
public OfferParams.Builder setStartIndex(@Nullable java.lang.Integer startIndex)
Set the start index of the available Offers subset. Used in conjunction with set.- Parameters:
startIndex
- start index- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setEndIndex
public OfferParams.Builder setEndIndex(@Nullable java.lang.Integer endIndex)
Set the end index of the available Offers subset. Used in conjunction with set.- Parameters:
endIndex
- end index- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setPlacement
public OfferParams.Builder setPlacement(@Nullable java.lang.String placement)
Set the offer set name- Parameters:
placement
- offer set name- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setRespondable
public OfferParams.Builder setRespondable(@Nullable java.lang.Boolean respondable)
Set to show respondable offers- Parameters:
respondable
-true
to show respondable offers- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setShowClipped
public OfferParams.Builder setShowClipped(@Nullable java.lang.Boolean showClipped)
Set to show is_clipped attribute- Parameters:
showClipped
-true
to show is_clipped attributes.- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setShowTarget
public OfferParams.Builder setShowTarget(@Nullable java.lang.Boolean showTarget)
Set the visibility of offer target- Parameters:
showTarget
-true
to show offer target- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
addProcessingStatus
public OfferParams.Builder addProcessingStatus(@NonNull java.lang.String... processingStatus)
Set the status if clipped or unclipped- Parameters:
processingStatus
- status if clipped or unclipped- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
addProcessingStatus
public OfferParams.Builder addProcessingStatus(@Nullable java.lang.String processingStatus)
Add a processing status to the list- Parameters:
processingStatus
- status if clipped or unclipped- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setUsable
public OfferParams.Builder setUsable(@NonNull java.lang.Boolean usable)
Set the visibility of usable offer responses- Parameters:
usable
-true
to show usable offer response}- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setOfferWithResponses
public OfferParams.Builder setOfferWithResponses(@NonNull java.lang.Boolean offerWithResponses)
Set the visibility of offer responses- Parameters:
offerWithResponses
-true
to show offer responses- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setDisplayableProcessingStatuses
public OfferParams.Builder setDisplayableProcessingStatuses(@NonNull java.lang.String displayableProcessingStatuses)
Set visibility of embedded responses with processing status matching its value. Default is clipped and pending if not provided- Parameters:
displayableProcessingStatuses
- value for processing status- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setApplyToCategories
public OfferParams.Builder setApplyToCategories(@NonNull java.lang.String applyToCategories)
Set the category to apply has_usable and has_processing_status response filters only to Offers with categories matching with the provided value- Parameters:
applyToCategories
- value to apply category- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setHasProcessingStatus
public OfferParams.Builder setHasProcessingStatus(@NonNull java.lang.String hasProcessingStatus)
Set the processing status to only show offers with responses having processing_status = to submitted values.- Parameters:
hasProcessingStatus
- processing status- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setHasUsable
public OfferParams.Builder setHasUsable(@NonNull java.lang.Boolean hasUsable)
Set to only show offers with responses that are still usable. Defaults to false (ignore response usage periods) if not provided.- Parameters:
hasUsable
- has usable flag- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setPrioritizedCategory
public OfferParams.Builder setPrioritizedCategory(@NonNull java.lang.String prioritizedCategory)
Set the prioritized category to sort the Offers by the given value- Parameters:
prioritizedCategory
- category- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setClipStatus
public OfferParams.Builder setClipStatus(@NonNull java.lang.String clipStatus)
Set the clip status- Parameters:
clipStatus
- clip status- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setOfferType
public OfferParams.Builder setOfferType(@Nullable java.lang.String offerType)
Set the offer type that will be used to filter the type of offers that will be included in the response. Can be any of ‘barcode’, ‘certificate’, ‘coupon’, ‘url’ or ‘stellar’. Can also be multiple by passing a comma-separated string. (e.g. "url,coupon")- Parameters:
offerType
- value for offer type- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
createQueryParams
protected OfferParams createQueryParams()
Description copied from class:BaseParams.BaseBuilder
Instantiates the implementation class- Specified by:
createQueryParams
in classBaseParams.BaseBuilder<OfferParams,OfferParams.Builder>
- Returns:
- implementation class of
BaseParams.BaseBuilder
-
-