Class: Twilio::REST::Lookups::V2::BucketList::RateLimitRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/lookups/v2/bucket.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ RateLimitRequest

Returns a new instance of RateLimitRequest.



26
27
28
29
# File 'lib/twilio-ruby/rest/lookups/v2/bucket.rb', line 26

def initialize(payload)
        @limit = payload["limit"]
        @ttl = payload["ttl"]
end

Instance Attribute Details

#limitObject

Parameters:

  • : (limit)
    String

    Limit of requests for the bucket

  • : (ttl)
    String

    Time to live of the rule



25
26
27
# File 'lib/twilio-ruby/rest/lookups/v2/bucket.rb', line 25

def limit
  @limit
end

#ttlObject

Parameters:

  • : (limit)
    String

    Limit of requests for the bucket

  • : (ttl)
    String

    Time to live of the rule



25
26
27
# File 'lib/twilio-ruby/rest/lookups/v2/bucket.rb', line 25

def ttl
  @ttl
end

Instance Method Details

#to_json(options = {}) ⇒ Object



30
31
32
33
34
35
# File 'lib/twilio-ruby/rest/lookups/v2/bucket.rb', line 30

def to_json(options = {})
{
        "limit": @limit,
        "ttl": @ttl,
}.to_json(options)
end