Class: Twilio::REST::Numbers::V1

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/numbers/v1.rb,
lib/twilio-ruby/rest/numbers/v1/webhook.rb,
lib/twilio-ruby/rest/numbers/v1/eligibility.rb,
lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb,
lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb,
lib/twilio-ruby/rest/numbers/v1/porting_portability.rb,
lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb,
lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb,
lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb,
lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb

Defined Under Namespace

Classes: BulkEligibilityContext, BulkEligibilityInstance, BulkEligibilityList, BulkEligibilityPage, EligibilityInstance, EligibilityList, EligibilityPage, PortingPortInContext, PortingPortInInstance, PortingPortInList, PortingPortInPage, PortingPortInPhoneNumberContext, PortingPortInPhoneNumberInstance, PortingPortInPhoneNumberList, PortingPortInPhoneNumberPage, PortingPortabilityContext, PortingPortabilityInstance, PortingPortabilityList, PortingPortabilityPage, PortingWebhookConfigurationDeleteContext, PortingWebhookConfigurationDeleteInstance, PortingWebhookConfigurationDeleteList, PortingWebhookConfigurationDeletePage, PortingWebhookConfigurationInstance, PortingWebhookConfigurationList, PortingWebhookConfigurationPage, SigningRequestConfigurationInstance, SigningRequestConfigurationList, SigningRequestConfigurationPage, WebhookInstance, WebhookList, WebhookPage

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

Initialize the V1 version of Numbers



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/twilio-ruby/rest/numbers/v1.rb', line 21

def initialize(domain)
    super
    @version = 'v1'
    @bulk_eligibilities = nil
    @eligibilities = nil
    @porting_port_ins = nil
    @porting_port_in_phone_number = nil
    @porting_portabilities = nil
    @porting_webhook_configurations = nil
    @porting_webhook_configurations_delete = nil
    @signing_request_configurations = nil
    @webhook = nil
end

Instance Method Details

#bulk_eligibilities(request_id = :unset) ⇒ Twilio::REST::Numbers::V1::BulkEligibilityContext, Twilio::REST::Numbers::V1::BulkEligibilityList

Parameters:

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

    The SID of the bulk eligibility check that you want to know about.

Returns:



39
40
41
42
43
44
45
46
47
48
# File 'lib/twilio-ruby/rest/numbers/v1.rb', line 39

def bulk_eligibilities(request_id=:unset)
    if request_id.nil?
        raise ArgumentError, 'request_id cannot be nil'
    end
    if request_id == :unset
        @bulk_eligibilities ||= BulkEligibilityList.new self
    else
        BulkEligibilityContext.new(self, request_id)
    end
end

#eligibilitiesTwilio::REST::Numbers::V1::EligibilityList



51
52
53
# File 'lib/twilio-ruby/rest/numbers/v1.rb', line 51

def eligibilities
    @eligibilities ||= EligibilityList.new self
end

#porting_port_in_phone_number(port_in_request_sid = :unset, phone_number_sid = :unset) ⇒ Twilio::REST::Numbers::V1::PortingPortInPhoneNumberContext, Twilio::REST::Numbers::V1::PortingPortInPhoneNumberList

Parameters:

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

    The SID of the Port In request. This is a unique identifier of the port in request.

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

    The SID of the Phone number. This is a unique identifier of the phone number.

Returns:



73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/twilio-ruby/rest/numbers/v1.rb', line 73

def porting_port_in_phone_number(port_in_request_sid=:unset, phone_number_sid=:unset)
    if port_in_request_sid.nil?
        raise ArgumentError, 'port_in_request_sid cannot be nil'
    end
    if phone_number_sid.nil?
        raise ArgumentError, 'phone_number_sid cannot be nil'
    end
    if port_in_request_sid == :unset && phone_number_sid == :unset
        @porting_port_in_phone_number ||= PortingPortInPhoneNumberList.new self
    else
        PortingPortInPhoneNumberContext.new(self, port_in_request_sid, phone_number_sid)
    end
end

#porting_port_ins(port_in_request_sid = :unset) ⇒ Twilio::REST::Numbers::V1::PortingPortInContext, Twilio::REST::Numbers::V1::PortingPortInList

Parameters:

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

    The SID of the Port In request. This is a unique identifier of the port in request.

Returns:



58
59
60
61
62
63
64
65
66
67
# File 'lib/twilio-ruby/rest/numbers/v1.rb', line 58

def porting_port_ins(port_in_request_sid=:unset)
    if port_in_request_sid.nil?
        raise ArgumentError, 'port_in_request_sid cannot be nil'
    end
    if port_in_request_sid == :unset
        @porting_port_ins ||= PortingPortInList.new self
    else
        PortingPortInContext.new(self, port_in_request_sid)
    end
end

#porting_portabilities(phone_number = :unset) ⇒ Twilio::REST::Numbers::V1::PortingPortabilityContext, Twilio::REST::Numbers::V1::PortingPortabilityList

Parameters:

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

    Phone number to check portability in e164 format.

Returns:



108
109
110
111
112
113
114
115
116
117
# File 'lib/twilio-ruby/rest/numbers/v1.rb', line 108

def porting_portabilities(phone_number=:unset)
    if phone_number.nil?
        raise ArgumentError, 'phone_number cannot be nil'
    end
    if phone_number == :unset
        @porting_portabilities ||= PortingPortabilityList.new self
    else
        PortingPortabilityContext.new(self, phone_number)
    end
end

#porting_webhook_configurationsTwilio::REST::Numbers::V1::PortingWebhookConfigurationList



120
121
122
# File 'lib/twilio-ruby/rest/numbers/v1.rb', line 120

def porting_webhook_configurations
    @porting_webhook_configurations ||= PortingWebhookConfigurationList.new self
end

#porting_webhook_configurations_delete(webhook_type = :unset) ⇒ Twilio::REST::Numbers::V1::PortingWebhookConfigurationDeleteContext, Twilio::REST::Numbers::V1::PortingWebhookConfigurationDeleteList

Parameters:

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

    The webhook type for the configuration to be delete. ‘PORT_IN`, `PORT_OUT`

Returns:



127
128
129
130
131
132
133
134
135
136
# File 'lib/twilio-ruby/rest/numbers/v1.rb', line 127

def porting_webhook_configurations_delete(webhook_type=:unset)
    if webhook_type.nil?
        raise ArgumentError, 'webhook_type cannot be nil'
    end
    if webhook_type == :unset
        @porting_webhook_configurations_delete ||= PortingWebhookConfigurationDeleteList.new self
    else
        PortingWebhookConfigurationDeleteContext.new(self, webhook_type)
    end
end

#signing_request_configurationsTwilio::REST::Numbers::V1::SigningRequestConfigurationList



139
140
141
# File 'lib/twilio-ruby/rest/numbers/v1.rb', line 139

def signing_request_configurations
    @signing_request_configurations ||= SigningRequestConfigurationList.new self
end

#to_sObject

Provide a user friendly representation



149
150
151
# File 'lib/twilio-ruby/rest/numbers/v1.rb', line 149

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

#webhookTwilio::REST::Numbers::V1::WebhookList



144
145
146
# File 'lib/twilio-ruby/rest/numbers/v1.rb', line 144

def webhook
    @webhook ||= WebhookList.new self
end