Class UserToken.Builder
- java.lang.Object
-
- com.courier.api.resources.users.tokens.types.UserToken.Builder
-
- All Implemented Interfaces:
UserToken._FinalStage,UserToken.ProviderKeyStage
- Enclosing class:
- UserToken
public static final class UserToken.Builder extends java.lang.Object implements UserToken.ProviderKeyStage, UserToken._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserTokenbuild()UserToken._FinalStagedevice(Device device)Information about the device the token is associated with.UserToken._FinalStagedevice(java.util.Optional<Device> device)UserToken._FinalStageexpiryDate(ExpiryDate expiryDate)ISO 8601 formatted date the token expires.UserToken._FinalStageexpiryDate(java.util.Optional<ExpiryDate> expiryDate)UserToken.Builderfrom(UserToken other)UserToken._FinalStageproperties(java.lang.Object properties)Properties sent to the provider along with the tokenUserToken._FinalStageproperties(java.util.Optional<java.lang.Object> properties)UserToken._FinalStageproviderKey(ProviderKey providerKey)UserToken._FinalStagetoken(java.lang.String token)Full body of the token.UserToken._FinalStagetoken(java.util.Optional<java.lang.String> token)UserToken._FinalStagetracking(Tracking tracking)Information about the device the token is associated with.UserToken._FinalStagetracking(java.util.Optional<Tracking> tracking)
-
-
-
Method Detail
-
from
public UserToken.Builder from(UserToken other)
- Specified by:
fromin interfaceUserToken.ProviderKeyStage
-
providerKey
public UserToken._FinalStage providerKey(ProviderKey providerKey)
- Specified by:
providerKeyin interfaceUserToken.ProviderKeyStage
-
tracking
public UserToken._FinalStage tracking(Tracking tracking)
Information about the device the token is associated with.
- Specified by:
trackingin interfaceUserToken._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
tracking
public UserToken._FinalStage tracking(java.util.Optional<Tracking> tracking)
- Specified by:
trackingin interfaceUserToken._FinalStage
-
device
public UserToken._FinalStage device(Device device)
Information about the device the token is associated with.
- Specified by:
devicein interfaceUserToken._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
device
public UserToken._FinalStage device(java.util.Optional<Device> device)
- Specified by:
devicein interfaceUserToken._FinalStage
-
properties
public UserToken._FinalStage properties(java.lang.Object properties)
Properties sent to the provider along with the token
- Specified by:
propertiesin interfaceUserToken._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
properties
public UserToken._FinalStage properties(java.util.Optional<java.lang.Object> properties)
- Specified by:
propertiesin interfaceUserToken._FinalStage
-
expiryDate
public UserToken._FinalStage expiryDate(ExpiryDate expiryDate)
ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to disable expiration.
- Specified by:
expiryDatein interfaceUserToken._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
expiryDate
public UserToken._FinalStage expiryDate(java.util.Optional<ExpiryDate> expiryDate)
- Specified by:
expiryDatein interfaceUserToken._FinalStage
-
token
public UserToken._FinalStage token(java.lang.String token)
Full body of the token. Must match token in URL.
- Specified by:
tokenin interfaceUserToken._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
token
public UserToken._FinalStage token(java.util.Optional<java.lang.String> token)
- Specified by:
tokenin interfaceUserToken._FinalStage
-
build
public UserToken build()
- Specified by:
buildin interfaceUserToken._FinalStage
-
-