pub struct MessageBuilder { /* private fields */ }Expand description
A builder to construct the properties of a Message.
Implementations§
Source§impl MessageBuilder
impl MessageBuilder
Sourcepub fn da(self, da: impl Into<String>) -> Self
pub fn da(self, da: impl Into<String>) -> Self
Sets the da, or Destination Address, for the Message.
This is the number to which the message is to be sent and should be a full international format number (however, national format is also accepted). This may be a SIP2SIM ICCID to send direct to a SIM.
This is the same as MessageBuilder::destination()
Sourcepub fn destination(self, destination: impl Into<String>) -> Self
pub fn destination(self, destination: impl Into<String>) -> Self
Sets the da, or Destination Address, for the Message.
This is the same as MessageBuilder::da()
Sourcepub fn ud(self, ud: impl Into<String>) -> Self
pub fn ud(self, ud: impl Into<String>) -> Self
Sets the ud, or User Data ie. the text body, for the Message.
This is the message to send, encoded in UTF-8.
This is the same as MessageBuilder::message()
Sourcepub fn message(self, message: impl Into<String>) -> Self
pub fn message(self, message: impl Into<String>) -> Self
Sets the ud, or User Data ie. the text body, for the Message.
This is the same as MessageBuilder::ud()
Sourcepub fn limit(self, limit: u8) -> Self
pub fn limit(self, limit: u8) -> Self
Sets the limit for the Message.
This is the limit on the number of parts that the message may be sent in.
Sourcepub fn costcentre(self, costcentre: impl Into<String>) -> Self
pub fn costcentre(self, costcentre: impl Into<String>) -> Self
Sets the costcentre for the Message.
This is the optional, up to 10 characters, code that is included in the bill XML data.
Sourcepub fn private(self, private: bool) -> Self
pub fn private(self, private: bool) -> Self
Sets the private setting for the Message.
This marks the message as private, such that it is not included in the itemised billing.
Sourcepub fn oa(self, oa: impl Into<String>) -> Self
pub fn oa(self, oa: impl Into<String>) -> Self
Sets the oa, or originator, for the Message.
This is used to set where the message is from. Normally this is not
needed as it will default to your username phone number.