Class: Twilio::REST::Lookups::V2::RateLimitList

Inherits:
Twilio::REST::ListResource show all
Defined in:
lib/twilio-ruby/rest/lookups/v2/rate_limit.rb

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ RateLimitList

Initialize the RateLimitList

Parameters:

  • version (Version)

    Version that contains the resource



26
27
28
29
30
31
32
# File 'lib/twilio-ruby/rest/lookups/v2/rate_limit.rb', line 26

def initialize(version)
    super(version)
    # Path Solution
    @solution = {  }
    @uri = "/RateLimits"
    
end

Instance Method Details

#fetch(fields: :unset) ⇒ RateLimitInstance

Fetch the RateLimitInstance

Parameters:

  • fields (Array[String]) (defaults to: :unset)

Returns:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/twilio-ruby/rest/lookups/v2/rate_limit.rb', line 37

def fetch(
    fields: :unset
)

    params = Twilio::Values.of({
        'Fields' => Twilio.serialize_list(fields) { |e| e },
    })
    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.fetch('GET', @uri, params: params, headers: headers)
    RateLimitInstance.new(
        @version,
        payload,
    )
end

#to_sObject

Provide a user friendly representation



61
62
63
# File 'lib/twilio-ruby/rest/lookups/v2/rate_limit.rb', line 61

def to_s
    '#<Twilio.Lookups.V2.RateLimitList>'
end