Class Trigger

    • Method Detail

      • fetcher

        public static TriggerFetcher fetcher​(String pathAccountSid,
                                             String pathSid)
        Create a TriggerFetcher to execute fetch.
        Parameters:
        pathAccountSid - The SID of the Account that created the resource to fetch
        pathSid - The unique string that identifies the resource
        Returns:
        TriggerFetcher capable of executing the fetch
      • fetcher

        public static TriggerFetcher fetcher​(String pathSid)
        Create a TriggerFetcher to execute fetch.
        Parameters:
        pathSid - The unique string that identifies the resource
        Returns:
        TriggerFetcher capable of executing the fetch
      • updater

        public static TriggerUpdater updater​(String pathAccountSid,
                                             String pathSid)
        Create a TriggerUpdater to execute update.
        Parameters:
        pathAccountSid - The SID of the Account that created the resources to update
        pathSid - The unique string that identifies the resource
        Returns:
        TriggerUpdater capable of executing the update
      • updater

        public static TriggerUpdater updater​(String pathSid)
        Create a TriggerUpdater to execute update.
        Parameters:
        pathSid - The unique string that identifies the resource
        Returns:
        TriggerUpdater capable of executing the update
      • deleter

        public static TriggerDeleter deleter​(String pathAccountSid,
                                             String pathSid)
        Create a TriggerDeleter to execute delete.
        Parameters:
        pathAccountSid - The SID of the Account that created the resources to delete
        pathSid - The unique string that identifies the resource
        Returns:
        TriggerDeleter capable of executing the delete
      • deleter

        public static TriggerDeleter deleter​(String pathSid)
        Create a TriggerDeleter to execute delete.
        Parameters:
        pathSid - The unique string that identifies the resource
        Returns:
        TriggerDeleter capable of executing the delete
      • creator

        public static TriggerCreator creator​(String pathAccountSid,
                                             URI callbackUrl,
                                             String triggerValue,
                                             Trigger.UsageCategory usageCategory)
        Create a TriggerCreator to execute create.
        Parameters:
        pathAccountSid - The SID of the Account that will create the resource
        callbackUrl - The URL we call when the trigger fires
        triggerValue - The usage value at which the trigger should fire
        usageCategory - The usage category the trigger watches
        Returns:
        TriggerCreator capable of executing the create
      • creator

        public static TriggerCreator creator​(URI callbackUrl,
                                             String triggerValue,
                                             Trigger.UsageCategory usageCategory)
        Create a TriggerCreator to execute create.
        Parameters:
        callbackUrl - The URL we call when the trigger fires
        triggerValue - The usage value at which the trigger should fire
        usageCategory - The usage category the trigger watches
        Returns:
        TriggerCreator capable of executing the create
      • reader

        public static TriggerReader reader​(String pathAccountSid)
        Create a TriggerReader to execute read.
        Parameters:
        pathAccountSid - The SID of the Account that created the resources to read
        Returns:
        TriggerReader capable of executing the read
      • reader

        public static TriggerReader reader()
        Create a TriggerReader to execute read.
        Returns:
        TriggerReader capable of executing the read
      • fromJson

        public static Trigger fromJson​(String json,
                                       com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Converts a JSON String into a Trigger object using the provided ObjectMapper.
        Parameters:
        json - Raw JSON String
        objectMapper - Jackson ObjectMapper
        Returns:
        Trigger object represented by the provided JSON
      • fromJson

        public static Trigger fromJson​(InputStream json,
                                       com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Converts a JSON InputStream into a Trigger object using the provided ObjectMapper.
        Parameters:
        json - Raw JSON InputStream
        objectMapper - Jackson ObjectMapper
        Returns:
        Trigger object represented by the provided JSON
      • getAccountSid

        public final String getAccountSid()
        Returns The The SID of the Account that this trigger monitors.
        Returns:
        The SID of the Account that this trigger monitors
      • getApiVersion

        public final String getApiVersion()
        Returns The The API version used to create the resource.
        Returns:
        The API version used to create the resource
      • getCallbackMethod

        public final HttpMethod getCallbackMethod()
        Returns The The HTTP method we use to call callback_url.
        Returns:
        The HTTP method we use to call callback_url
      • getCallbackUrl

        public final URI getCallbackUrl()
        Returns The he URL we call when the trigger fires.
        Returns:
        he URL we call when the trigger fires
      • getCurrentValue

        public final String getCurrentValue()
        Returns The The current value of the field the trigger is watching.
        Returns:
        The current value of the field the trigger is watching
      • getDateCreated

        public final org.joda.time.DateTime getDateCreated()
        Returns The The RFC 2822 date and time in GMT that the resource was created.
        Returns:
        The RFC 2822 date and time in GMT that the resource was created
      • getDateFired

        public final org.joda.time.DateTime getDateFired()
        Returns The The RFC 2822 date and time in GMT that the trigger was last fired.
        Returns:
        The RFC 2822 date and time in GMT that the trigger was last fired
      • getDateUpdated

        public final org.joda.time.DateTime getDateUpdated()
        Returns The The RFC 2822 date and time in GMT that the resource was last updated.
        Returns:
        The RFC 2822 date and time in GMT that the resource was last updated
      • getFriendlyName

        public final String getFriendlyName()
        Returns The The string that you assigned to describe the trigger.
        Returns:
        The string that you assigned to describe the trigger
      • getRecurring

        public final Trigger.Recurring getRecurring()
        Returns The The frequency of a recurring UsageTrigger.
        Returns:
        The frequency of a recurring UsageTrigger
      • getSid

        public final String getSid()
        Returns The The unique string that identifies the resource.
        Returns:
        The unique string that identifies the resource
      • getTriggerBy

        public final Trigger.TriggerField getTriggerBy()
        Returns The The field in the UsageRecord resource that fires the trigger.
        Returns:
        The field in the UsageRecord resource that fires the trigger
      • getTriggerValue

        public final String getTriggerValue()
        Returns The The value at which the trigger will fire.
        Returns:
        The value at which the trigger will fire
      • getUri

        public final String getUri()
        Returns The The URI of the resource, relative to `https://api.twilio.com`.
        Returns:
        The URI of the resource, relative to `https://api.twilio.com`
      • getUsageCategory

        public final Trigger.UsageCategory getUsageCategory()
        Returns The The usage category the trigger watches.
        Returns:
        The usage category the trigger watches
      • getUsageRecordUri

        public final String getUsageRecordUri()
        Returns The The URI of the UsageRecord resource this trigger watches.
        Returns:
        The URI of the UsageRecord resource this trigger watches
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object