Class: Twilio::REST::Intelligence::V3::ConfigurationList::RuleCreationRequestPayload

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) ⇒ RuleCreationRequestPayload

Returns a new instance of RuleCreationRequestPayload.



127
128
129
130
131
132
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 127

def initialize(payload)
        @operators = payload["operators"]
        @triggers = payload["triggers"]
        @actions = payload["actions"]
        @context = payload["context"]
end

Instance Attribute Details

#actionsObject

Parameters:

  • : (operators)
    Array<ConfigurationList.Operator>

    List of Operators to be executed by the Rule. Minimum of one (1) and maximum of five (5) Operators allowed per Rule.

  • : (triggers)
    Array<ConfigurationList.Trigger>

    List of Triggers that determine when to activate the Rule. Maximum of one (1) Trigger allowed per Rule.

  • : (actions)
    Array<ConfigurationList.Action>

    List of Actions to be performed after the Rule is triggered. Maximum of two (2) Actions allowed per Rule.

  • : (context)
    ConfigurationList.Context


126
127
128
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 126

def actions
  @actions
end

#contextObject

Parameters:

  • : (operators)
    Array<ConfigurationList.Operator>

    List of Operators to be executed by the Rule. Minimum of one (1) and maximum of five (5) Operators allowed per Rule.

  • : (triggers)
    Array<ConfigurationList.Trigger>

    List of Triggers that determine when to activate the Rule. Maximum of one (1) Trigger allowed per Rule.

  • : (actions)
    Array<ConfigurationList.Action>

    List of Actions to be performed after the Rule is triggered. Maximum of two (2) Actions allowed per Rule.

  • : (context)
    ConfigurationList.Context


126
127
128
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 126

def context
  @context
end

#operatorsObject

Parameters:

  • : (operators)
    Array<ConfigurationList.Operator>

    List of Operators to be executed by the Rule. Minimum of one (1) and maximum of five (5) Operators allowed per Rule.

  • : (triggers)
    Array<ConfigurationList.Trigger>

    List of Triggers that determine when to activate the Rule. Maximum of one (1) Trigger allowed per Rule.

  • : (actions)
    Array<ConfigurationList.Action>

    List of Actions to be performed after the Rule is triggered. Maximum of two (2) Actions allowed per Rule.

  • : (context)
    ConfigurationList.Context


126
127
128
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 126

def operators
  @operators
end

#triggersObject

Parameters:

  • : (operators)
    Array<ConfigurationList.Operator>

    List of Operators to be executed by the Rule. Minimum of one (1) and maximum of five (5) Operators allowed per Rule.

  • : (triggers)
    Array<ConfigurationList.Trigger>

    List of Triggers that determine when to activate the Rule. Maximum of one (1) Trigger allowed per Rule.

  • : (actions)
    Array<ConfigurationList.Action>

    List of Actions to be performed after the Rule is triggered. Maximum of two (2) Actions allowed per Rule.

  • : (context)
    ConfigurationList.Context


126
127
128
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 126

def triggers
  @triggers
end

Instance Method Details

#to_json(options = {}) ⇒ Object



133
134
135
136
137
138
139
140
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 133

def to_json(options = {})
{
        "operators": @operators,
        "triggers": @triggers,
        "actions": @actions,
        "context": @context,
}.to_json(options)
end