Class PunchcardParams
- java.lang.Object
-
- com.cheetahdigital.corekit.rest.params.BaseParams
-
- com.cheetahdigital.corekit.rest.params.BaseListQueryParams
-
- com.cheetahdigital.punchcards.core.api.PunchcardParams
-
- All Implemented Interfaces:
android.os.Parcelable
public class PunchcardParams extends BaseListQueryParams
Class for setting the query parameters of Punchcard API AllNullable
parameters means you can remove the parameter by passing anull
value.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PunchcardParams.Builder
Builder class forPunchcardParams
-
Nested classes/interfaces inherited from class com.cheetahdigital.corekit.rest.params.BaseListQueryParams
BaseListQueryParams.BaseListQueryBuilder<P extends BaseListQueryParams,B extends BaseListQueryParams.BaseListQueryBuilder>
-
Nested classes/interfaces inherited from class com.cheetahdigital.corekit.rest.params.BaseParams
BaseParams.BaseBuilder<T extends BaseParams,B extends BaseParams.BaseBuilder>
-
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<PunchcardParams>
CREATOR
-
Fields inherited from class com.cheetahdigital.corekit.rest.params.BaseParams
mId, mQueryMap
-
-
Constructor Summary
Constructors Modifier Constructor Description PunchcardParams()
protected
PunchcardParams(android.os.Parcel in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
describeContents()
java.lang.String
getDetailsSortBy()
Get the value stored for details_sort_by parameterjava.lang.String
getDetailsSortOrder()
Get the current value stored for details_sort_dir parameterjava.lang.String
getPunchcard()
Get the current value of punchcard parameterjava.lang.String
getPunchcardNames()
Get the current value of punch_names parameterjava.lang.String
getPunchcardValues()
Get the current value of punch_value parameterjava.lang.Integer
getPunches()
Get the current value stored for punches parameterjava.lang.Boolean
getRespondable()
Get the value stored for respondable parameterjava.lang.Boolean
getVirtual()
Get the value stored for virtual parametervoid
setDetailsSortBy(java.lang.String sortBy)
Set the property for sorting that is used to arrange the list in detailsvoid
setDetailsSortOrder(java.lang.String sortOrder)
Set the property for sorting arrangement that is used to arrange the order of the list in detailsvoid
setPunchcard(java.lang.String punchcard)
An optional parameter to specify the name of the punch card type to usevoid
setPunchcardNames(java.lang.String punchcardNames)
A comma separated string of named punches.void
setPunchcardValues(java.lang.String punchcardValues)
Similar to punch_names but use the code/value lookup associated to a named punch instead.void
setPunches(java.lang.Integer punches)
Set the number of punches to be given on the punchcardvoid
setRespondable(java.lang.Boolean respondable)
Set the property for respondable used in API callvoid
setVirtual(java.lang.Boolean virtual)
Set the property for virtual used for API callvoid
writeToParcel(android.os.Parcel dest, int flags)
-
Methods inherited from class com.cheetahdigital.corekit.rest.params.BaseListQueryParams
addCategories, addCategory, clearCategories, getCategories, getItemsPerPage, getLayout, getPage, getSortBy, getSortOrder, removeCategory, setItemsPerPage, setLayout, setPage, setSortBy, setSortOrder
-
Methods inherited from class com.cheetahdigital.corekit.rest.params.BaseParams
addParam, getAccessToken, getId, getParam, getQueryMap, setAccessToken, setId
-
-
-
-
Field Detail
-
CREATOR
public static final android.os.Parcelable.Creator<PunchcardParams> CREATOR
-
-
Method Detail
-
describeContents
public int describeContents()
- Specified by:
describeContents
in interfaceandroid.os.Parcelable
- Overrides:
describeContents
in classBaseListQueryParams
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags)
- Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
- Overrides:
writeToParcel
in classBaseListQueryParams
-
setRespondable
public void 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
-
getRespondable
@Nullable public java.lang.Boolean getRespondable()
Get the value stored for respondable parameter- Returns:
- current value of respondable parameter
-
setVirtual
public void 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
-
getVirtual
@Nullable public java.lang.Boolean getVirtual()
Get the value stored for virtual parameter- Returns:
- current value of virtual parameter
-
setDetailsSortBy
public void 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
-
getDetailsSortBy
@Nullable public java.lang.String getDetailsSortBy()
Get the value stored for details_sort_by parameter- Returns:
- current value of details_sort_by parameter
-
setDetailsSortOrder
public void 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
-
getDetailsSortOrder
@Nullable public java.lang.String getDetailsSortOrder()
Get the current value stored for details_sort_dir parameter- Returns:
- current value of details_sort_dir parameter
-
setPunches
public void 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
-
getPunches
@Nullable public java.lang.Integer getPunches()
Get the current value stored for punches parameter- Returns:
- current value of punches parameter
-
setPunchcard
public void 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
-
getPunchcard
@Nullable public java.lang.String getPunchcard()
Get the current value of punchcard parameter- Returns:
- current value of punchcard parameter
-
setPunchcardNames
public void 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
-
getPunchcardNames
@Nullable public java.lang.String getPunchcardNames()
Get the current value of punch_names parameter- Returns:
- current value of punch_names parameter
-
setPunchcardValues
public void 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
-
getPunchcardValues
@Nullable public java.lang.String getPunchcardValues()
Get the current value of punch_value parameter- Returns:
- current value of punch_value parameter
-
-