Class DocumentCreator


  • public class DocumentCreator
    extends Creator<Document>
    PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
    • Constructor Detail

      • DocumentCreator

        public DocumentCreator​(String pathServiceSid)
        Construct a new DocumentCreator.
        Parameters:
        pathServiceSid - The service_sid
    • Method Detail

      • setUniqueName

        public DocumentCreator setUniqueName​(String uniqueName)
        Human-readable name for this document.
        Parameters:
        uniqueName - Human-readable name for this document
        Returns:
        this
      • setData

        public DocumentCreator setData​(Map<String,​Object> data)
        JSON data to be stored in this document.
        Parameters:
        data - JSON data to be stored in this document
        Returns:
        this
      • setTtl

        public DocumentCreator setTtl​(Integer ttl)
        Time-to-live of this Document in seconds, defaults to no expiration. In the range [1, 31 536 000 (1 year)], or 0 for infinity..
        Parameters:
        ttl - Time-to-live of this Document in seconds, defaults to no expiration.
        Returns:
        this
      • create

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