Class: Plivo::Resources::NumberPool

Inherits:
Base::Resource show all
Defined in:
lib/plivo/resources/powerpacks.rb

Constant Summary

Constants included from Utils

Utils::TYPE_WHITELIST

Instance Attribute Summary

Attributes inherited from Base::Resource

#id

Instance Method Summary collapse

Methods included from Utils

expected_type?, expected_value?, raise_invalid_request, valid_account?, valid_mainaccount?, valid_param?, valid_signature?, valid_subaccount?

Constructor Details

#initialize(client, options = nil) ⇒ NumberPool

Returns a new instance of NumberPool.



303
304
305
306
307
# File 'lib/plivo/resources/powerpacks.rb', line 303

def initialize(client, options = nil)
  @_name = 'Numberpool'
  @_identifier_string = 'number_pool_id'
  super
end

Instance Method Details

#numbersObject



309
310
311
312
# File 'lib/plivo/resources/powerpacks.rb', line 309

def numbers
  options = {'number_pool_id' => @number_pool_id}
  Numbers.new(@_client, {resource_json:options })
end

#shortcodesObject



313
314
315
316
# File 'lib/plivo/resources/powerpacks.rb', line 313

def shortcodes
  options = {'number_pool_id' => @number_pool_id}
  Shortcode.new(@_client, {resource_json: options})
end

#tollfreeObject



317
318
319
320
# File 'lib/plivo/resources/powerpacks.rb', line 317

def tollfree
  options = {'number_pool_id' => @number_pool_id}
  Tollfree.new(@_client, {resource_json: options})
end