Constructor and Description |
---|
TriggerCreator(String pathAccountSid,
URI callbackUrl,
String triggerValue,
Trigger.UsageCategory usageCategory)
Construct a new TriggerCreator.
|
TriggerCreator(URI callbackUrl,
String triggerValue,
Trigger.UsageCategory usageCategory)
Construct a new TriggerCreator.
|
Modifier and Type | Method and Description |
---|---|
Trigger |
create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.
|
TriggerCreator |
setCallbackMethod(HttpMethod callbackMethod)
The HTTP method we should use to call `callback_url`.
|
TriggerCreator |
setFriendlyName(String friendlyName)
A descriptive string that you create to describe the resource.
|
TriggerCreator |
setRecurring(Trigger.Recurring recurring)
The frequency of a recurring UsageTrigger.
|
TriggerCreator |
setTriggerBy(Trigger.TriggerField triggerBy)
The field in the UsageRecord
resource that should fire the trigger.
|
create, createAsync, createAsync
public TriggerCreator(URI callbackUrl, String triggerValue, Trigger.UsageCategory usageCategory)
callbackUrl
- The URL we call when the trigger firestriggerValue
- The usage value at which the trigger should fireusageCategory
- The usage category the trigger watchespublic TriggerCreator(String pathAccountSid, URI callbackUrl, String triggerValue, Trigger.UsageCategory usageCategory)
pathAccountSid
- The SID of the Account that will create the resourcecallbackUrl
- The URL we call when the trigger firestriggerValue
- The usage value at which the trigger should fireusageCategory
- The usage category the trigger watchespublic TriggerCreator setCallbackMethod(HttpMethod callbackMethod)
callbackMethod
- The HTTP method to use to call callback_urlpublic TriggerCreator setFriendlyName(String friendlyName)
friendlyName
- A string to describe the resourcepublic TriggerCreator setRecurring(Trigger.Recurring recurring)
recurring
- The frequency of a recurring UsageTriggerpublic TriggerCreator setTriggerBy(Trigger.TriggerField triggerBy)
triggerBy
- The field in the UsageRecord resource that fires the triggerpublic Trigger create(TwilioRestClient client)
Copyright © 2019 Twilio, Inc. All Rights Reserved.