Class TokenAddSingleParams
-
- All Implemented Interfaces:
-
com.courier.core.Params
public final class TokenAddSingleParams implements Params
Adds a single token to a user and overwrites a matching existing token.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classTokenAddSingleParams.BuilderA builder for TokenAddSingleParams.
public final classTokenAddSingleParams.BodyRequest body for adding a single token. The token value itself is provided via the path parameter, so it is omitted from the body.
public final classTokenAddSingleParams.ProviderKeypublic final classTokenAddSingleParams.DeviceInformation about the device the token came from.
public final classTokenAddSingleParams.ExpiryDateISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to disable expiration.
public final classTokenAddSingleParams.TrackingTracking information about the device the token came from.
-
Method Summary
Modifier and Type Method Description final StringuserId()final Optional<String>token()final TokenAddSingleParams.ProviderKeyproviderKey()final Optional<TokenAddSingleParams.Device>device()Information about the device the token came from. final Optional<TokenAddSingleParams.ExpiryDate>expiryDate()ISO 8601 formatted date the token expires. final JsonValue_properties()Properties about the token. final Optional<TokenAddSingleParams.Tracking>tracking()Tracking information about the device the token came from. final JsonField<TokenAddSingleParams.ProviderKey>_providerKey()Returns the raw JSON value of providerKey. final JsonField<TokenAddSingleParams.Device>_device()Returns the raw JSON value of device. final JsonField<TokenAddSingleParams.ExpiryDate>_expiryDate()Returns the raw JSON value of expiryDate. final JsonField<TokenAddSingleParams.Tracking>_tracking()Returns the raw JSON value of tracking. final Map<String, JsonValue>_additionalBodyProperties()final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final TokenAddSingleParams.BuildertoBuilder()final TokenAddSingleParams.Body_body()final String_pathParam(Integer index)Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. Booleanequals(Object other)IntegerhashCode()StringtoString()final static TokenAddSingleParams.Builderbuilder()Returns a mutable builder for constructing an instance of TokenAddSingleParams. -
-
Method Detail
-
providerKey
final TokenAddSingleParams.ProviderKey providerKey()
-
device
final Optional<TokenAddSingleParams.Device> device()
Information about the device the token came from.
-
expiryDate
final Optional<TokenAddSingleParams.ExpiryDate> expiryDate()
ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to disable expiration.
-
_properties
final JsonValue _properties()
Properties about the token.
This arbitrary value can be deserialized into a custom type using the
convertmethod:MyClass myObject = tokenAddSingleParams.properties().convert(MyClass.class);
-
tracking
final Optional<TokenAddSingleParams.Tracking> tracking()
Tracking information about the device the token came from.
-
_providerKey
final JsonField<TokenAddSingleParams.ProviderKey> _providerKey()
Returns the raw JSON value of providerKey.
Unlike providerKey, this method doesn't throw if the JSON field has an unexpected type.
-
_device
final JsonField<TokenAddSingleParams.Device> _device()
Returns the raw JSON value of device.
Unlike device, this method doesn't throw if the JSON field has an unexpected type.
-
_expiryDate
final JsonField<TokenAddSingleParams.ExpiryDate> _expiryDate()
Returns the raw JSON value of expiryDate.
Unlike expiryDate, this method doesn't throw if the JSON field has an unexpected type.
-
_tracking
final JsonField<TokenAddSingleParams.Tracking> _tracking()
Returns the raw JSON value of tracking.
Unlike tracking, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
Additional headers to send with the request.
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
Additional query param to send with the request.
-
toBuilder
final TokenAddSingleParams.Builder toBuilder()
-
_body
final TokenAddSingleParams.Body _body()
-
_pathParam
final String _pathParam(Integer index)
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
builder
final static TokenAddSingleParams.Builder builder()
Returns a mutable builder for constructing an instance of TokenAddSingleParams.
The following fields are required:
.userId() .providerKey()
-
-
-
-