Class: Twilio::REST::Intelligence::V3::ConfigurationList::RuleUpdateRequestPayload

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

Returns a new instance of RuleUpdateRequestPayload.



150
151
152
153
154
155
156
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 150

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

Instance Attribute Details

#actionsObject

Parameters:

  • : (id)
    String

    Optional field used when updating an existing Rule within an Intelligence Configuration. When provided, the Rule with this ‘id` is updated; when omitted, a new Rule is created.

  • : (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


149
150
151
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 149

def actions
  @actions
end

#contextObject

Parameters:

  • : (id)
    String

    Optional field used when updating an existing Rule within an Intelligence Configuration. When provided, the Rule with this ‘id` is updated; when omitted, a new Rule is created.

  • : (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


149
150
151
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 149

def context
  @context
end

#idObject

Parameters:

  • : (id)
    String

    Optional field used when updating an existing Rule within an Intelligence Configuration. When provided, the Rule with this ‘id` is updated; when omitted, a new Rule is created.

  • : (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


149
150
151
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 149

def id
  @id
end

#operatorsObject

Parameters:

  • : (id)
    String

    Optional field used when updating an existing Rule within an Intelligence Configuration. When provided, the Rule with this ‘id` is updated; when omitted, a new Rule is created.

  • : (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


149
150
151
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 149

def operators
  @operators
end

#triggersObject

Parameters:

  • : (id)
    String

    Optional field used when updating an existing Rule within an Intelligence Configuration. When provided, the Rule with this ‘id` is updated; when omitted, a new Rule is created.

  • : (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


149
150
151
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 149

def triggers
  @triggers
end

Instance Method Details

#to_json(options = {}) ⇒ Object



157
158
159
160
161
162
163
164
165
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 157

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