Class: Twilio::REST::Lookups::V2::BucketListResponse

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, key, limit = :unset) ⇒ BucketListResponse

Returns a new instance of BucketListResponse.

Parameters:

  • instance (Array<BucketInstance>)
  • headers (Hash{String => Object})
  • status_code (Integer)


256
257
258
259
260
261
262
# File 'lib/twilio-ruby/rest/lookups/v2/bucket.rb', line 256

def initialize(version, payload, key)
   @bucket_instance = payload.body[key].map do |data|
    BucketInstance.new(version, data)
   end
   @headers = payload.headers
   @status_code = payload.status_code
end

Instance Method Details

#bucketObject



345
346
347
# File 'lib/twilio-ruby/rest/lookups/v2/bucket.rb', line 345

def bucket
    @bucket
end

#bucket_instanceObject



264
265
266
# File 'lib/twilio-ruby/rest/lookups/v2/bucket.rb', line 264

def bucket_instance
    @instance
end

#headersObject



349
350
351
# File 'lib/twilio-ruby/rest/lookups/v2/bucket.rb', line 349

def headers
  @headers
end

#status_codeObject



353
354
355
# File 'lib/twilio-ruby/rest/lookups/v2/bucket.rb', line 353

def status_code
  @status_code
end