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



21
22
23
24
25
26
# File 'lib/twilio-ruby/rest/preview/hosted_numbers.rb', line 21

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:



32
33
34
35
36
37
38
39
40
41
# File 'lib/twilio-ruby/rest/preview/hosted_numbers.rb', line 32

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:



46
47
48
49
50
51
52
53
54
55
# File 'lib/twilio-ruby/rest/preview/hosted_numbers.rb', line 46

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



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

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