Class SessionCreator


  • public class SessionCreator
    extends Creator<Session>
    PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
    • Constructor Detail

      • SessionCreator

        public SessionCreator​(String messagingServiceSid)
        Construct a new SessionCreator.
        Parameters:
        messagingServiceSid - The unique id of the SMS Service this session belongs to.
    • Method Detail

      • setFriendlyName

        public SessionCreator setFriendlyName​(String friendlyName)
        The human-readable name of this session. Optional..
        Parameters:
        friendlyName - The human-readable name of this session.
        Returns:
        this
      • setAttributes

        public SessionCreator setAttributes​(String attributes)
        An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned..
        Parameters:
        attributes - An optional string metadata field you can use to store any data you wish.
        Returns:
        this
      • setDateCreated

        public SessionCreator setDateCreated​(org.joda.time.DateTime dateCreated)
        The date that this resource was created..
        Parameters:
        dateCreated - The date that this resource was created.
        Returns:
        this
      • setDateUpdated

        public SessionCreator setDateUpdated​(org.joda.time.DateTime dateUpdated)
        The date that this resource was last updated..
        Parameters:
        dateUpdated - The date that this resource was last updated.
        Returns:
        this
      • setCreatedBy

        public SessionCreator setCreatedBy​(String createdBy)
        Identity of the session's creator. If the Session was created through the API, the value will be `system`.
        Parameters:
        createdBy - Identity of the session's creator.
        Returns:
        this
      • create

        public Session create​(TwilioRestClient client)
        Make the request to the Twilio API to perform the create.
        Specified by:
        create in class Creator<Session>
        Parameters:
        client - TwilioRestClient with which to make the request
        Returns:
        Created Session