Class: Twilio::REST::Numbers::V2

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/numbers/v2.rb,
lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb,
lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb,
lib/twilio-ruby/rest/numbers/v2/authorization_document.rb,
lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb,
lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb

Defined Under Namespace

Classes: AuthorizationDocumentContext, AuthorizationDocumentInstance, AuthorizationDocumentList, AuthorizationDocumentPage, BulkHostedNumberOrderContext, BulkHostedNumberOrderInstance, BulkHostedNumberOrderList, BulkHostedNumberOrderPage, BundleCloneContext, BundleCloneInstance, BundleCloneList, BundleClonePage, HostedNumberOrderContext, HostedNumberOrderInstance, HostedNumberOrderList, HostedNumberOrderPage, RegulatoryComplianceInstance, RegulatoryComplianceList, RegulatoryCompliancePage

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) ⇒ V2

Initialize the V2 version of Numbers



21
22
23
24
25
26
27
28
29
# File 'lib/twilio-ruby/rest/numbers/v2.rb', line 21

def initialize(domain)
    super
    @version = 'v2'
    @authorization_documents = nil
    @bulk_hosted_number_orders = nil
    @bundle_clone = nil
    @hosted_number_orders = nil
    @regulatory_compliance = nil
end

Instance Method Details

#authorization_documents(sid = :unset) ⇒ Twilio::REST::Numbers::V2::AuthorizationDocumentContext, Twilio::REST::Numbers::V2::AuthorizationDocumentList

Parameters:

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

    A 34 character string that uniquely identifies this AuthorizationDocument.

Returns:



35
36
37
38
39
40
41
42
43
44
# File 'lib/twilio-ruby/rest/numbers/v2.rb', line 35

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

#bulk_hosted_number_orders(bulk_hosting_sid = :unset) ⇒ Twilio::REST::Numbers::V2::BulkHostedNumberOrderContext, Twilio::REST::Numbers::V2::BulkHostedNumberOrderList

Parameters:

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

    A 34 character string that uniquely identifies this BulkHostedNumberOrder.

Returns:



49
50
51
52
53
54
55
56
57
58
# File 'lib/twilio-ruby/rest/numbers/v2.rb', line 49

def bulk_hosted_number_orders(bulk_hosting_sid=:unset)
    if bulk_hosting_sid.nil?
        raise ArgumentError, 'bulk_hosting_sid cannot be nil'
    end
    if bulk_hosting_sid == :unset
        @bulk_hosted_number_orders ||= BulkHostedNumberOrderList.new self
    else
        BulkHostedNumberOrderContext.new(self, bulk_hosting_sid)
    end
end

#bundle_clone(bundle_sid = :unset) ⇒ Twilio::REST::Numbers::V2::BundleCloneContext, Twilio::REST::Numbers::V2::BundleCloneList

Parameters:

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

    The unique string that identifies the Bundle to be cloned.

Returns:



63
64
65
66
67
68
69
70
71
72
# File 'lib/twilio-ruby/rest/numbers/v2.rb', line 63

def bundle_clone(bundle_sid=:unset)
    if bundle_sid.nil?
        raise ArgumentError, 'bundle_sid cannot be nil'
    end
    if bundle_sid == :unset
        @bundle_clone ||= BundleCloneList.new self
    else
        BundleCloneContext.new(self, bundle_sid)
    end
end

#hosted_number_orders(sid = :unset) ⇒ Twilio::REST::Numbers::V2::HostedNumberOrderContext, Twilio::REST::Numbers::V2::HostedNumberOrderList

Parameters:

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

    A 34 character string that uniquely identifies this HostedNumberOrder.

Returns:



77
78
79
80
81
82
83
84
85
86
# File 'lib/twilio-ruby/rest/numbers/v2.rb', line 77

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

#regulatory_complianceTwilio::REST::Numbers::V2::RegulatoryComplianceList



89
90
91
# File 'lib/twilio-ruby/rest/numbers/v2.rb', line 89

def regulatory_compliance
    @regulatory_compliance ||= RegulatoryComplianceList.new self
end

#to_sObject

Provide a user friendly representation



94
95
96
# File 'lib/twilio-ruby/rest/numbers/v2.rb', line 94

def to_s
    '<Twilio::REST::Numbers::V2>';
end