class Twilio::REST::Verify::V2::ServiceContext::RateLimitInstance

Public Class Methods

new(version, payload, service_sid: nil, sid: nil) click to toggle source

Initialize the RateLimitInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] service_sid The SID of the

{Service}[https://www.twilio.com/docs/verify/api/service] the resource is
associated with.

@param [String] sid The Twilio-provided string that uniquely identifies the Rate

Limit resource to fetch.

@return [RateLimitInstance] RateLimitInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
258 def initialize(version, payload, service_sid: nil, sid: nil)
259   super(version)
260 
261   # Marshaled Properties
262   @properties = {
263       'sid' => payload['sid'],
264       'service_sid' => payload['service_sid'],
265       'account_sid' => payload['account_sid'],
266       'unique_name' => payload['unique_name'],
267       'description' => payload['description'],
268       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
269       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
270       'url' => payload['url'],
271       'links' => payload['links'],
272   }
273 
274   # Context
275   @instance_context = nil
276   @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'], }
277 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
304 def account_sid
305   @properties['account_sid']
306 end
buckets() click to toggle source

Access the buckets @return [buckets] buckets

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
369 def buckets
370   context.buckets
371 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [RateLimitContext] RateLimitContext for this RateLimitInstance

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
283 def context
284   unless @instance_context
285     @instance_context = RateLimitContext.new(@version, @params['service_sid'], @params['sid'], )
286   end
287   @instance_context
288 end
date_created() click to toggle source

@return [Time] The RFC 2822 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
322 def date_created
323   @properties['date_created']
324 end
date_updated() click to toggle source

@return [Time] The RFC 2822 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
328 def date_updated
329   @properties['date_updated']
330 end
delete() click to toggle source

Delete the RateLimitInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
362 def delete
363   context.delete
364 end
description() click to toggle source

@return [String] Description of this Rate Limit

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
316 def description
317   @properties['description']
318 end
fetch() click to toggle source

Fetch the RateLimitInstance @return [RateLimitInstance] Fetched RateLimitInstance

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
355 def fetch
356   context.fetch
357 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
382 def inspect
383   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
384   "<Twilio.Verify.V2.RateLimitInstance #{values}>"
385 end
service_sid() click to toggle source

@return [String] The SID of the Service that the resource is associated with

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
298 def service_sid
299   @properties['service_sid']
300 end
sid() click to toggle source

@return [String] A string that uniquely identifies this Rate Limit.

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
292 def sid
293   @properties['sid']
294 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
375 def to_s
376   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
377   "<Twilio.Verify.V2.RateLimitInstance #{values}>"
378 end
unique_name() click to toggle source

@return [String] A unique, developer assigned name of this Rate Limit.

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
310 def unique_name
311   @properties['unique_name']
312 end
update(description: :unset) click to toggle source

Update the RateLimitInstance @param [String] description Description of this Rate Limit @return [RateLimitInstance] Updated RateLimitInstance

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
348 def update(description: :unset)
349   context.update(description: description, )
350 end
url() click to toggle source

@return [String] The URL of this resource.

    # File lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
334 def url
335   @properties['url']
336 end