Class: Twilio::REST::Intelligence::V3::ConfigurationList::Trigger

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/intelligence/v3/configuration.rb,
lib/twilio-ruby/rest/intelligence/v3/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ Trigger

Returns a new instance of Trigger.



172
173
174
175
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 172

def initialize(payload)
        @on = payload["on"]
        @parameters = payload["parameters"]
end

Instance Attribute Details

#onObject

Parameters:

  • : (on)
    String

    The conversational lifecycle event that will activate execution of the Rule. Available values are: - ‘COMMUNICATION`: Trigger the Rule on each communication within the Conversation. - `CONVERSATION_END`: Trigger the Rule when the Conversation moves to the `closed` state - `CONVERSATION_INACTIVE`: Trigger the Rule when the Conversation moves to `inactive` state

  • : (parameters)
    ConfigurationList.TriggerParameters


171
172
173
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 171

def on
  @on
end

#parametersObject

Parameters:

  • : (on)
    String

    The conversational lifecycle event that will activate execution of the Rule. Available values are: - ‘COMMUNICATION`: Trigger the Rule on each communication within the Conversation. - `CONVERSATION_END`: Trigger the Rule when the Conversation moves to the `closed` state - `CONVERSATION_INACTIVE`: Trigger the Rule when the Conversation moves to `inactive` state

  • : (parameters)
    ConfigurationList.TriggerParameters


171
172
173
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 171

def parameters
  @parameters
end

Instance Method Details

#to_json(options = {}) ⇒ Object



176
177
178
179
180
181
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 176

def to_json(options = {})
{
        "on": @on,
        "parameters": @parameters,
}.to_json(options)
end