Constructor and Description |
---|
TriggerCreator(String accountSid,
URI callbackUrl,
String triggerValue,
Trigger.UsageCategory usageCategory)
Construct a new TriggerCreator.
|
Modifier and Type | Method and Description |
---|---|
Trigger |
execute(TwilioRestClient client)
Make the request to the Twilio API to perform the create.
|
TriggerCreator |
setCallbackMethod(HttpMethod callbackMethod)
The HTTP method Twilio will use when making a request to the CallbackUrl.
|
TriggerCreator |
setFriendlyName(String friendlyName)
A user-specified, human-readable name for the trigger..
|
TriggerCreator |
setRecurring(Trigger.Recurring recurring)
How this trigger recurs.
|
TriggerCreator |
setTriggerBy(Trigger.TriggerField triggerBy)
The field in the UsageRecord that fires the trigger.
|
public TriggerCreator(String accountSid, URI callbackUrl, String triggerValue, Trigger.UsageCategory usageCategory)
accountSid
- The account_sidcallbackUrl
- URL Twilio will request when the trigger firestriggerValue
- the value at which the trigger will fireusageCategory
- The usage category the trigger watchespublic TriggerCreator setCallbackMethod(HttpMethod callbackMethod)
callbackMethod
- HTTP method to use with callback_urlpublic TriggerCreator setFriendlyName(String friendlyName)
friendlyName
- A user-specified, human-readable name for the trigger.public TriggerCreator setRecurring(Trigger.Recurring recurring)
recurring
- How this trigger recurspublic TriggerCreator setTriggerBy(Trigger.TriggerField triggerBy)
triggerBy
- The field in the UsageRecord that fires the triggerpublic Trigger execute(TwilioRestClient client)
Copyright © 2011 Twilio, Inc. All Rights Reserved.