Class: Twilio::REST::Intelligence::V3::ConfigurationList::Action

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

Returns a new instance of Action.



27
28
29
30
31
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 27

def initialize(payload)
        @type = payload["type"]
        @method = payload["method"]
        @url = payload["url"]
end

Instance Attribute Details

#methodObject

Parameters:

  • : (type)
    String

    The type of Action to be performed after the Rule is triggered. Supported Actions are: - ‘WEBHOOK`: A webhook Action sends an HTTP request to a specified URL with Rule execution results.

  • : (method)
    String

    The HTTP method to be used when performing the Action. Must be set to ‘POST`.

  • : (url)
    String

    The URL endpoint where the Action will send the HTTP request containing the Rule execution results.



26
27
28
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 26

def method
  @method
end

#typeObject

Parameters:

  • : (type)
    String

    The type of Action to be performed after the Rule is triggered. Supported Actions are: - ‘WEBHOOK`: A webhook Action sends an HTTP request to a specified URL with Rule execution results.

  • : (method)
    String

    The HTTP method to be used when performing the Action. Must be set to ‘POST`.

  • : (url)
    String

    The URL endpoint where the Action will send the HTTP request containing the Rule execution results.



26
27
28
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 26

def type
  @type
end

#urlObject

Parameters:

  • : (type)
    String

    The type of Action to be performed after the Rule is triggered. Supported Actions are: - ‘WEBHOOK`: A webhook Action sends an HTTP request to a specified URL with Rule execution results.

  • : (method)
    String

    The HTTP method to be used when performing the Action. Must be set to ‘POST`.

  • : (url)
    String

    The URL endpoint where the Action will send the HTTP request containing the Rule execution results.



26
27
28
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 26

def url
  @url
end

Instance Method Details

#to_json(options = {}) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 32

def to_json(options = {})
{
        "type": @type,
        "method": @method,
        "url": @url,
}.to_json(options)
end