public class SmsRegistrationRequest extends java.lang.Object implements Request<SmsRegistrationResponse>
Request.HttpMethod
CONTENT_ENCODING_GZIP, CONTENT_TYPE_JSON, CONTENT_TYPE_TEXT_CSV, UA_VERSION_CSV, UA_VERSION_JSON
Modifier and Type | Method and Description |
---|---|
boolean |
bearerTokenAuthRequired() |
boolean |
canUseBearerTokenAuth() |
ContentType |
getContentType() |
Request.HttpMethod |
getHttpMethod() |
java.lang.String |
getRequestBody() |
java.util.Map<java.lang.String,java.lang.String> |
getRequestHeaders() |
ResponseParser<SmsRegistrationResponse> |
getResponseParser() |
java.net.URI |
getUri(java.net.URI baseUri) |
static SmsRegistrationRequest |
newOptOutRequest(java.lang.String sender,
java.lang.String msisdn)
This will mark an SMS channel as opted-out (inactive) and it will not receive alerts even when they are addressed in the future.
|
static SmsRegistrationRequest |
newRegistrationRequest(java.lang.String sender,
java.lang.String msisdn)
Begin the opt-in process for a new SMS channel.
|
static SmsRegistrationRequest |
newRegistrationRequest(java.lang.String sender,
java.lang.String msisdn,
DateTime optedIn)
Begin the opt-in process for a new SMS channel.
|
static SmsRegistrationRequest |
newUninstallRequest(java.lang.String sender,
java.lang.String msisdn)
Removes phone numbers and accompanying data from Urban Airship.
|
public static SmsRegistrationRequest newOptOutRequest(java.lang.String sender, java.lang.String msisdn)
sender
- The SMS sender ID provided by Urban Airship. Must be numeric characters only.msisdn
- The mobile phone number you want to opt-out of SMS messages.public static SmsRegistrationRequest newUninstallRequest(java.lang.String sender, java.lang.String msisdn)
sender
- A number the app is configured to send from, provided by Urban Airship.msisdn
- The mobile phone number you want to register as an SMS channel (or send a request to opt-in).public static SmsRegistrationRequest newRegistrationRequest(java.lang.String sender, java.lang.String msisdn)
sender
- A number the app is configured to send from, provided by Urban Airship.msisdn
- The mobile phone number you want to register as an SMS channel.public static SmsRegistrationRequest newRegistrationRequest(java.lang.String sender, java.lang.String msisdn, DateTime optedIn)
sender
- A number the app is configured to send from, provided by Urban Airship.msisdn
- The mobile phone number you want to register as an SMS channel.optedIn
- The datetime that represents the date and time when explicit permission was received from the user to receive messages.public Request.HttpMethod getHttpMethod()
getHttpMethod
in interface Request<SmsRegistrationResponse>
public java.lang.String getRequestBody()
getRequestBody
in interface Request<SmsRegistrationResponse>
public ContentType getContentType()
getContentType
in interface Request<SmsRegistrationResponse>
public java.util.Map<java.lang.String,java.lang.String> getRequestHeaders()
getRequestHeaders
in interface Request<SmsRegistrationResponse>
public java.net.URI getUri(java.net.URI baseUri) throws java.net.URISyntaxException
getUri
in interface Request<SmsRegistrationResponse>
java.net.URISyntaxException
public ResponseParser<SmsRegistrationResponse> getResponseParser()
getResponseParser
in interface Request<SmsRegistrationResponse>
public boolean bearerTokenAuthRequired()
bearerTokenAuthRequired
in interface Request<SmsRegistrationResponse>
public boolean canUseBearerTokenAuth()
canUseBearerTokenAuth
in interface Request<SmsRegistrationResponse>