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.BuilderaddProcessingStatus(java.lang.String processingStatus)Add a processing status to the listOfferParams.BuilderaddProcessingStatus(java.lang.String... processingStatus)Set the status if clipped or unclippedprotected OfferParamscreateQueryParams()Instantiates the implementation classOfferParams.BuildersetApplyToCategories(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.BuildersetClipStatus(java.lang.String clipStatus)Set the clip statusOfferParams.BuildersetDisplayableProcessingStatuses(java.lang.String displayableProcessingStatuses)Set visibility of embedded responses with processing status matching its value.OfferParams.BuildersetEndIndex(java.lang.Integer endIndex)Set the end index of the available Offers subset.OfferParams.BuildersetHasProcessingStatus(java.lang.String hasProcessingStatus)Set the processing status to only show offers with responses having processing_status = to submitted values.OfferParams.BuildersetHasUsable(java.lang.Boolean hasUsable)Set to only show offers with responses that are still usable.OfferParams.BuildersetIncludeClipped(java.lang.Boolean includeClipped)Set the visibility of is_clipped tagOfferParams.BuildersetIncludeResponses(java.lang.Boolean includeResponses)Set to include offer responsesOfferParams.BuildersetOfferType(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.BuildersetOfferWithResponses(java.lang.Boolean offerWithResponses)Set the visibility of offer responsesOfferParams.BuildersetPlacement(java.lang.String placement)Set the offer set nameOfferParams.BuildersetPrioritizedCategory(java.lang.String prioritizedCategory)Set the prioritized category to sort the Offers by the given valueOfferParams.BuildersetRespondable(java.lang.Boolean respondable)Set to show respondable offersOfferParams.BuildersetResultWithCategories(java.lang.Boolean resultWithCategories)Set to show the categories associated by the offerOfferParams.BuildersetSet(java.lang.String set)Set the internal name of Offer setOfferParams.BuildersetShowClipped(java.lang.Boolean showClipped)Set to show is_clipped attributeOfferParams.BuildersetShowTarget(java.lang.Boolean showTarget)Set the visibility of offer targetOfferParams.BuildersetStartIndex(java.lang.Integer startIndex)Set the start index of the available Offers subset.OfferParams.BuildersetUsable(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-OfferParamsto 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-trueto 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-trueto 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-trueto 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-trueto 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-trueto 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-trueto 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-trueto 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-trueto 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.BaseBuilderInstantiates the implementation class- Specified by:
createQueryParamsin classBaseParams.BaseBuilder<OfferParams,OfferParams.Builder>- Returns:
- implementation class of
BaseParams.BaseBuilder
-
-