Class ServiceCreator


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

      • ServiceCreator

        public ServiceCreator()
    • Method Detail

      • setFriendlyName

        public ServiceCreator setFriendlyName​(String friendlyName)
        A descriptive string that you create to describe the resource. It can be up to 64 characters long..
        Parameters:
        friendlyName - A string to describe the resource
        Returns:
        this
      • setApnCredentialSid

        public ServiceCreator setApnCredentialSid​(String apnCredentialSid)
        The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings..
        Parameters:
        apnCredentialSid - The SID of the Credential to use for APN Bindings
        Returns:
        this
      • setGcmCredentialSid

        public ServiceCreator setGcmCredentialSid​(String gcmCredentialSid)
        The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings..
        Parameters:
        gcmCredentialSid - The SID of the Credential to use for GCM Bindings
        Returns:
        this
      • setMessagingServiceSid

        public ServiceCreator setMessagingServiceSid​(String messagingServiceSid)
        The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications..
        Parameters:
        messagingServiceSid - The SID of the Messaging Service to use for SMS Bindings
        Returns:
        this
      • setFacebookMessengerPageId

        public ServiceCreator setFacebookMessengerPageId​(String facebookMessengerPageId)
        Deprecated..
        Parameters:
        facebookMessengerPageId - Deprecated
        Returns:
        this
      • setDefaultApnNotificationProtocolVersion

        public ServiceCreator setDefaultApnNotificationProtocolVersion​(String defaultApnNotificationProtocolVersion)
        The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource..
        Parameters:
        defaultApnNotificationProtocolVersion - The protocol version to use for sending APNS notifications
        Returns:
        this
      • setDefaultGcmNotificationProtocolVersion

        public ServiceCreator setDefaultGcmNotificationProtocolVersion​(String defaultGcmNotificationProtocolVersion)
        The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource..
        Parameters:
        defaultGcmNotificationProtocolVersion - The protocol version to use for sending GCM notifications
        Returns:
        this
      • setFcmCredentialSid

        public ServiceCreator setFcmCredentialSid​(String fcmCredentialSid)
        The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings..
        Parameters:
        fcmCredentialSid - The SID of the Credential to use for FCM Bindings
        Returns:
        this
      • setDefaultFcmNotificationProtocolVersion

        public ServiceCreator setDefaultFcmNotificationProtocolVersion​(String defaultFcmNotificationProtocolVersion)
        The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource..
        Parameters:
        defaultFcmNotificationProtocolVersion - The protocol version to use for sending FCM notifications
        Returns:
        this
      • setLogEnabled

        public ServiceCreator setLogEnabled​(Boolean logEnabled)
        Whether to log notifications. Can be: `true` or `false` and the default is `true`..
        Parameters:
        logEnabled - Whether to log notifications
        Returns:
        this
      • setAlexaSkillId

        public ServiceCreator setAlexaSkillId​(String alexaSkillId)
        Deprecated..
        Parameters:
        alexaSkillId - Deprecated
        Returns:
        this
      • setDefaultAlexaNotificationProtocolVersion

        public ServiceCreator setDefaultAlexaNotificationProtocolVersion​(String defaultAlexaNotificationProtocolVersion)
        Deprecated..
        Parameters:
        defaultAlexaNotificationProtocolVersion - Deprecated
        Returns:
        this
      • create

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