Class: Twilio::REST::Webhooks::V1::RuleList::PatchRule

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/webhooks/v1/rule.rb,
lib/twilio-ruby/rest/webhooks/v1/rule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ PatchRule

Returns a new instance of PatchRule.



30
31
32
33
34
35
36
37
# File 'lib/twilio-ruby/rest/webhooks/v1/rule.rb', line 30

def initialize(payload)
        @friendly_name = payload["friendly_name"]
        @description = payload["description"]
        @match_type = payload["match_type"]
        @prefix = payload["prefix"]
        @settings = payload["settings"]
        @value = payload["value"]
end

Instance Attribute Details

#description ⇒ Object

Parameters:

  • : (friendly_name) —

    [String] Human-readable name for the Rule

  • : (description) —

    [String] Optional description of the Rule's purpose and usage

  • : (match_type) —

    [String]

  • : (prefix) —

    [String] New URL prefix to match, MUST be unique across all prefix match rules and MUST end with /.

  • : (settings) —

    [Array<RuleList.SettingReference>] Settings to apply with traffic distribution (percentages must sum to 100)

  • : (value) —

    [String] New exact URL to match, MUST be unique across all exact match rules and MUST NOT end with /.



29
30
31
# File 'lib/twilio-ruby/rest/webhooks/v1/rule.rb', line 29

def description
  @description
end

#friendly_name ⇒ Object

Parameters:

  • : (friendly_name) —

    [String] Human-readable name for the Rule

  • : (description) —

    [String] Optional description of the Rule's purpose and usage

  • : (match_type) —

    [String]

  • : (prefix) —

    [String] New URL prefix to match, MUST be unique across all prefix match rules and MUST end with /.

  • : (settings) —

    [Array<RuleList.SettingReference>] Settings to apply with traffic distribution (percentages must sum to 100)

  • : (value) —

    [String] New exact URL to match, MUST be unique across all exact match rules and MUST NOT end with /.



29
30
31
# File 'lib/twilio-ruby/rest/webhooks/v1/rule.rb', line 29

def friendly_name
  @friendly_name
end

#match_type ⇒ Object

Parameters:

  • : (friendly_name) —

    [String] Human-readable name for the Rule

  • : (description) —

    [String] Optional description of the Rule's purpose and usage

  • : (match_type) —

    [String]

  • : (prefix) —

    [String] New URL prefix to match, MUST be unique across all prefix match rules and MUST end with /.

  • : (settings) —

    [Array<RuleList.SettingReference>] Settings to apply with traffic distribution (percentages must sum to 100)

  • : (value) —

    [String] New exact URL to match, MUST be unique across all exact match rules and MUST NOT end with /.



29
30
31
# File 'lib/twilio-ruby/rest/webhooks/v1/rule.rb', line 29

def match_type
  @match_type
end

#prefix ⇒ Object

Parameters:

  • : (friendly_name) —

    [String] Human-readable name for the Rule

  • : (description) —

    [String] Optional description of the Rule's purpose and usage

  • : (match_type) —

    [String]

  • : (prefix) —

    [String] New URL prefix to match, MUST be unique across all prefix match rules and MUST end with /.

  • : (settings) —

    [Array<RuleList.SettingReference>] Settings to apply with traffic distribution (percentages must sum to 100)

  • : (value) —

    [String] New exact URL to match, MUST be unique across all exact match rules and MUST NOT end with /.



29
30
31
# File 'lib/twilio-ruby/rest/webhooks/v1/rule.rb', line 29

def prefix
  @prefix
end

#settings ⇒ Object

Parameters:

  • : (friendly_name) —

    [String] Human-readable name for the Rule

  • : (description) —

    [String] Optional description of the Rule's purpose and usage

  • : (match_type) —

    [String]

  • : (prefix) —

    [String] New URL prefix to match, MUST be unique across all prefix match rules and MUST end with /.

  • : (settings) —

    [Array<RuleList.SettingReference>] Settings to apply with traffic distribution (percentages must sum to 100)

  • : (value) —

    [String] New exact URL to match, MUST be unique across all exact match rules and MUST NOT end with /.



29
30
31
# File 'lib/twilio-ruby/rest/webhooks/v1/rule.rb', line 29

def settings
  @settings
end

#value ⇒ Object

Parameters:

  • : (friendly_name) —

    [String] Human-readable name for the Rule

  • : (description) —

    [String] Optional description of the Rule's purpose and usage

  • : (match_type) —

    [String]

  • : (prefix) —

    [String] New URL prefix to match, MUST be unique across all prefix match rules and MUST end with /.

  • : (settings) —

    [Array<RuleList.SettingReference>] Settings to apply with traffic distribution (percentages must sum to 100)

  • : (value) —

    [String] New exact URL to match, MUST be unique across all exact match rules and MUST NOT end with /.



29
30
31
# File 'lib/twilio-ruby/rest/webhooks/v1/rule.rb', line 29

def value
  @value
end

Instance Method Details

#to_json(options = {}) ⇒ Object



38
39
40
41
42
43
44
45
46
47
# File 'lib/twilio-ruby/rest/webhooks/v1/rule.rb', line 38

def to_json(options = {})
{
        "friendlyName": @friendly_name,
        "description": @description,
        "matchType": @match_type,
        "prefix": @prefix,
        "settings": @settings,
        "value": @value,
}.to_json(options)
end