Class: Twilio::REST::Webhooks::V1::SettingList::RetryPolicy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ RetryPolicy

Returns a new instance of RetryPolicy.



163
164
165
166
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 163

def initialize(payload)
        @retry_count = payload["retry_count"]
        @retry_on = payload["retry_on"]
end

Instance Attribute Details

#retry_count ⇒ Object

Parameters:

  • : (retry_count) —

    [String] Number of retry attempts (default: 0, no retries)

  • : (retry_on) —

    [Array] Conditions that trigger retries: - HTTP_4XX: Retry on 4xx HTTP status codes - HTTP_5XX: Retry on 5xx HTTP status codes - CONNECTION_TIMEOUT: Retry on TCP/TLS connection failures - READ_TIMEOUT: Retry when server doesn't respond in time - ALL: Retry on all failure types



162
163
164
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 162

def retry_count
  @retry_count
end

#retry_on ⇒ Object

Parameters:

  • : (retry_count) —

    [String] Number of retry attempts (default: 0, no retries)

  • : (retry_on) —

    [Array] Conditions that trigger retries: - HTTP_4XX: Retry on 4xx HTTP status codes - HTTP_5XX: Retry on 5xx HTTP status codes - CONNECTION_TIMEOUT: Retry on TCP/TLS connection failures - READ_TIMEOUT: Retry when server doesn't respond in time - ALL: Retry on all failure types



162
163
164
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 162

def retry_on
  @retry_on
end

Instance Method Details

#to_json(options = {}) ⇒ Object



167
168
169
170
171
172
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 167

def to_json(options = {})
{
        "retryCount": @retry_count,
        "retryOn": @retry_on,
}.to_json(options)
end