Class: Twilio::REST::Numbers::V1::PortingPortInList::NumbersV1PortingPortInCreatePhoneNumbers

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ NumbersV1PortingPortInCreatePhoneNumbers

Returns a new instance of NumbersV1PortingPortInCreatePhoneNumbers.



97
98
99
100
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 97

def initialize(payload)
        @phone_number = payload["phone_number"]
        @pin = payload["pin"]
end

Instance Attribute Details

#phone_numberObject

Parameters:

  • : (phone_number)
    String

    Phone number to be ported. This must be in the E164 Format.

  • : (pin)
    String

    Some losing carriers require a PIN to authorize the port of a phone number. If the phone number is a US mobile phone number, the PIN is mandatory to process a porting request. Other carriers and number types may also require a PIN, you’ll need to contact the losing carrier to determine what your phone number’s PIN is.



96
97
98
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 96

def phone_number
  @phone_number
end

#pinObject

Parameters:

  • : (phone_number)
    String

    Phone number to be ported. This must be in the E164 Format.

  • : (pin)
    String

    Some losing carriers require a PIN to authorize the port of a phone number. If the phone number is a US mobile phone number, the PIN is mandatory to process a porting request. Other carriers and number types may also require a PIN, you’ll need to contact the losing carrier to determine what your phone number’s PIN is.



96
97
98
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 96

def pin
  @pin
end

Instance Method Details

#to_json(options = {}) ⇒ Object



101
102
103
104
105
106
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 101

def to_json(options = {})
{
        "phone_number": @phone_number,
        "pin": @pin,
}.to_json(options)
end