Class PunchcardParams.Builder
- java.lang.Object
-
- com.cheetahdigital.corekit.rest.params.BaseParams.BaseBuilder<P,B>
-
- com.cheetahdigital.corekit.rest.params.BaseListQueryParams.BaseListQueryBuilder<PunchcardParams,PunchcardParams.Builder>
-
- com.cheetahdigital.punchcards.core.api.PunchcardParams.Builder
-
- Enclosing class:
- PunchcardParams
public static class PunchcardParams.Builder extends BaseListQueryParams.BaseListQueryBuilder<PunchcardParams,PunchcardParams.Builder>
Builder class forPunchcardParams
-
-
Field Summary
-
Fields inherited from class com.cheetahdigital.corekit.rest.params.BaseParams.BaseBuilder
mQueryParams
-
-
Constructor Summary
Constructors Constructor Description Builder()Default constructorBuilder(PunchcardParams queryParams)Create a builder class from an existingPunchcardParams
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PunchcardParamscreateQueryParams()Instantiates the implementation classPunchcardParams.BuildersetDetailsSortBy(java.lang.String sortBy)Set the property for sorting that is used to arrange the list in detailsPunchcardParams.BuildersetDetailsSortOrder(java.lang.String sortOrder)Set the property for sorting arrangement that is used to arrange the order of the list in detailsPunchcardParams.BuildersetPunchcard(java.lang.String punchcard)An optional parameter to specify the name of the punch card type to usePunchcardParams.BuildersetPunchcardNames(java.lang.String punchcardNames)A comma separated string of named punches.PunchcardParams.BuildersetPunchcardValues(java.lang.String punchcardValues)Similar to punch_names but use the code/value lookup associated to a named punch instead.PunchcardParams.BuildersetPunches(java.lang.Integer punches)Set the number of punches to be given on the punchcardPunchcardParams.BuildersetRespondable(java.lang.Boolean respondable)Set the property for respondable used in API callPunchcardParams.BuildersetVirtual(java.lang.Boolean virtual)Set the property for virtual used for API call-
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(PunchcardParams queryParams)
Create a builder class from an existingPunchcardParams- Parameters:
queryParams- query params used for Punchcard API
-
Builder
public Builder()
Default constructor
-
-
Method Detail
-
createQueryParams
protected PunchcardParams createQueryParams()
Description copied from class:BaseParams.BaseBuilderInstantiates the implementation class- Specified by:
createQueryParamsin classBaseParams.BaseBuilder<PunchcardParams,PunchcardParams.Builder>- Returns:
- implementation class of
BaseParams.BaseBuilder
-
setRespondable
public PunchcardParams.Builder setRespondable(@Nullable java.lang.Boolean respondable)
Set the property for respondable used in API call- Parameters:
respondable- true to retrieve only punchcard types that the user is allowed to obtain- Returns:
- The Builder object to allow chaining calls of set/add methods
-
setVirtual
public PunchcardParams.Builder setVirtual(@Nullable java.lang.Boolean virtual)
Set the property for virtual used for API call- Parameters:
virtual- true to include the punchcard that the user doesn't have but can avail the list- Returns:
- The Builder object to allow chaining calls of set/add methods
-
setDetailsSortBy
public PunchcardParams.Builder setDetailsSortBy(@Nullable java.lang.String sortBy)
Set the property for sorting that is used to arrange the list in details- Parameters:
sortBy- the property used for sorting the punchcard list details- Returns:
- The Builder object to allow chaining calls of set/add methods
-
setDetailsSortOrder
public PunchcardParams.Builder setDetailsSortOrder(@Nullable java.lang.String sortOrder)
Set the property for sorting arrangement that is used to arrange the order of the list in details- Parameters:
sortOrder- the property used for sorting order of the punchcard list details- Returns:
- The Builder object to allow chaining calls of set/add methods
-
setPunches
public PunchcardParams.Builder setPunches(@Nullable java.lang.Integer punches)
Set the number of punches to be given on the punchcard- Parameters:
punches- number of punches to punch on a certain punchcard- Returns:
- The Builder object to allow chaining calls of set/add methods
-
setPunchcard
public PunchcardParams.Builder setPunchcard(@Nullable java.lang.String punchcard)
An optional parameter to specify the name of the punch card type to use- Parameters:
punchcard- name of the punchcard type to use- Returns:
- The Builder object to allow chaining calls of set/add methods
-
setPunchcardNames
public PunchcardParams.Builder setPunchcardNames(@Nullable java.lang.String punchcardNames)
A comma separated string of named punches. (If no punch qty is indicated, a default value of 1 is assumed).e.g. "seasonal,regular" or "seasonal:3,regular:2"
- Parameters:
punchcardNames- punchcards that will be updated- Returns:
- The Builder object to allow chaining calls of set/add methods
-
setPunchcardValues
public PunchcardParams.Builder setPunchcardValues(@Nullable java.lang.String punchcardValues)
Similar to punch_names but use the code/value lookup associated to a named punch instead. (If no punch qty is indicated, a default value of 1 is assumed)e.g. "VAL001,SKU33456" or "VAL001:2,SKU33456:4"
- Parameters:
punchcardValues- punchcard code/value that will be updated- Returns:
- The Builder object to allow chaining calls of set/add methods
-
-