Constructor and Description |
---|
Builder(String recipient,
String content)
Set the recipient and message content.
|
Modifier and Type | Method and Description |
---|---|
Sms |
build() |
Sms.Builder |
withAge(int age)
Sets the minimum age of the recipient.
|
Sms.Builder |
withClientReference(String clientReference)
Arbitrary client reference ID that will be returned in the message response.
|
Sms.Builder |
withDifferentiator(String differentiator)
Sets the name of the message group.
|
Sms.Builder |
withGasSettings(GasSettings gasSettings)
Specify GAS (Goods and Services) values.
|
Sms.Builder |
withInvoiceNode(String invoiceNode)
Sets a custom group name for the invoice.
|
Sms.Builder |
withNewSession(boolean newSession)
Start a new session.
|
Sms.Builder |
withOriginatorSettings(com.intele.chimera.gw.xsd.smsgateway.request._2013._02.OriginatorTypeEnum originatorType,
String originator)
Sets the originator.
|
Sms.Builder |
withParameters(List<com.intele.chimera.gw.xsd.smsgateway.request._2013._02.Parameter> parameters)
Used add special parameters to the message.
|
Sms.Builder |
withPrice(int price)
Set the price of the message.
|
Sms.Builder |
withPriority(int priority)
Set the priority of the message.
|
Sms.Builder |
withSafeRemoveNonGsmCharacters(boolean safeRemoveNonGsmCharacters)
Decides if non-GSM characters should be removed from the content text.
|
Sms.Builder |
withSendWindow(SendWindow sendWindow)
Specify the send window for the message.
|
Sms.Builder |
withSessionId(String sessionId)
Use an existing session.
|
Sms.Builder |
withValidity(int validity)
Set a validity for the message.
|
public Builder(String recipient, String content)
recipient
- The MSISDN of the recipient. The format should follow the ITU-T E.164 standard with a + prefix, e.g. +4792000001.content
- The message payload to send, typically the message text.
See chapter 3.4 in the ITC SMS Gateway API specification for more detailspublic Sms.Builder withPrice(int price)
price
- The cost for the recipient to receive the message. In lowest
monetary unit. See chapter 3.1 in the ITC SMS Gateway API specification for details.
Example: 200 (2,- NOK)public Sms.Builder withClientReference(String clientReference)
clientReference
- the client message IDpublic Sms.Builder withPriority(int priority)
priority
- Uses service value unless specified.
Used to prioritize between messages sent from the same
service.
1: low (slower)
2: medium
3: high (faster)public Sms.Builder withValidity(int validity)
validity
- Uses service value unless specified.
Specifies the TTL (time to live) for the message, i.e. how long
before the message times out in cases where it cannot be
delivered to a handset.
See chapter 3.3 in the ITC SMS Gateway API specification for valid values.
Example: 173public Sms.Builder withDifferentiator(String differentiator)
differentiator
- Arbitrary string set by the client to enable grouping messages in
certain statistic reports. Example: pincode_messagespublic Sms.Builder withAge(int age)
age
- Only relevant for CPA/GAS messages.
Defines an age limit for message content. The mobile network operators enforces this.
IMPORTANT: If the service is a subscription service all CPA/GAS
messages must have age set to 18.public Sms.Builder withNewSession(boolean newSession)
newSession
- Used to start a new session. See chapter 3.5 in the
ITC SMS Gateway API specification for details.public Sms.Builder withSessionId(String sessionId)
sessionId
- Used to continue an existing session. See chapter 3.5 in the
ITC SMS Gateway API for details.public Sms.Builder withInvoiceNode(String invoiceNode)
invoiceNode
- Arbitrary string set by the client to enable grouping messages
on the service invoice.public Sms.Builder withSafeRemoveNonGsmCharacters(boolean safeRemoveNonGsmCharacters)
safeRemoveNonGsmCharacters
- Default value is false.
If set to true the SMSGW will remove or safely substitute invalid
characters in the message content instead of rejecting the
message. See chapter 3.4 in the ITC SMS Gateway API for details.public Sms.Builder withParameters(List<com.intele.chimera.gw.xsd.smsgateway.request._2013._02.Parameter> parameters)
Used add special parameters to the message. See 3.7.3.4 in the ITC SMS Gateway API for valid keys and values.
key
- value
- public Sms.Builder withOriginatorSettings(com.intele.chimera.gw.xsd.smsgateway.request._2013._02.OriginatorTypeEnum originatorType, String originator)
originatorType
- Specifies the type of originator. See chapter 3.2 in the ITC SMS Gateway API for details.originator
- Depends on the originatorType. Examples: "+4799999999", "Intelecom", "1960"public Sms.Builder withGasSettings(GasSettings gasSettings)
Specify GAS (Goods and Services) values. See chapter 3.1 in the ITC SMS Gateway API for details.
gasSettings
- public Sms.Builder withSendWindow(SendWindow sendWindow)
Specify the send window for the message. See chapter 3.6 in the ITC SMS Gateway API.
Used if the message should be queued and sent in the future instead of immediately.
sendWindow
- public Sms build()
Copyright © 2016. All rights reserved.