Class: Twilio::REST::Preview::HostedNumbers

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/preview/hosted_numbers.rb,
lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb,
lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb,
lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb

Defined Under Namespace

Classes: AuthorizationDocumentContext, AuthorizationDocumentInstance, AuthorizationDocumentList, AuthorizationDocumentPage, HostedNumberOrderContext, HostedNumberOrderInstance, HostedNumberOrderList, HostedNumberOrderPage

Instance Attribute Summary

Attributes inherited from Version

#domain

Instance Method Summary collapse

Methods inherited from Version

#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update

Constructor Details

#initialize(domain) ⇒ HostedNumbers

Initialize the HostedNumbers version of Preview


15
16
17
18
19
20
# File 'lib/twilio-ruby/rest/preview/hosted_numbers.rb', line 15

def initialize(domain)
  super
  @version = 'HostedNumbers'
  @authorization_documents = nil
  @hosted_number_orders = nil
end

Instance Method Details

#authorization_documents(sid = :unset) ⇒ Twilio::REST::Preview::HostedNumbers::AuthorizationDocumentContext, Twilio::REST::Preview::HostedNumbers::AuthorizationDocumentList

Parameters:

  • sid (String) (defaults to: :unset)

    A 34 character string that uniquely identifies this AuthorizationDocument.

Returns:


27
28
29
30
31
32
33
34
35
36
# File 'lib/twilio-ruby/rest/preview/hosted_numbers.rb', line 27

def authorization_documents(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @authorization_documents ||= AuthorizationDocumentList.new self
  else
      AuthorizationDocumentContext.new(self, sid)
  end
end

#hosted_number_orders(sid = :unset) ⇒ Twilio::REST::Preview::HostedNumbers::HostedNumberOrderContext, Twilio::REST::Preview::HostedNumbers::HostedNumberOrderList

Parameters:

  • sid (String) (defaults to: :unset)

    A 34 character string that uniquely identifies this HostedNumberOrder.

Returns:


43
44
45
46
47
48
49
50
51
52
# File 'lib/twilio-ruby/rest/preview/hosted_numbers.rb', line 43

def hosted_number_orders(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @hosted_number_orders ||= HostedNumberOrderList.new self
  else
      HostedNumberOrderContext.new(self, sid)
  end
end

#to_sObject

Provide a user friendly representation


56
57
58
# File 'lib/twilio-ruby/rest/preview/hosted_numbers.rb', line 56

def to_s
  '<Twilio::REST::Preview::HostedNumbers>'
end