Class: Twilio::REST::Numbers::V1::PortingPortInPhoneNumberContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Numbers::V1::PortingPortInPhoneNumberContext
- Defined in:
- lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the PortingPortInPhoneNumberInstance.
-
#fetch ⇒ PortingPortInPhoneNumberInstance
Fetch the PortingPortInPhoneNumberInstance.
-
#initialize(version, port_in_request_sid, phone_number_sid) ⇒ PortingPortInPhoneNumberContext
constructor
Initialize the PortingPortInPhoneNumberContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, port_in_request_sid, phone_number_sid) ⇒ PortingPortInPhoneNumberContext
Initialize the PortingPortInPhoneNumberContext
50 51 52 53 54 55 56 57 58 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 50 def initialize(version, port_in_request_sid, phone_number_sid) super(version) # Path Solution @solution = { port_in_request_sid: port_in_request_sid, phone_number_sid: phone_number_sid, } @uri = "/Porting/PortIn/#{@solution[:port_in_request_sid]}/PhoneNumber/#{@solution[:phone_number_sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the PortingPortInPhoneNumberInstance
62 63 64 65 66 67 68 69 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 62 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch ⇒ PortingPortInPhoneNumberInstance
Fetch the PortingPortInPhoneNumberInstance
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 74 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) PortingPortInPhoneNumberInstance.new( @version, payload, port_in_request_sid: @solution[:port_in_request_sid], phone_number_sid: @solution[:phone_number_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
101 102 103 104 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 101 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V1.PortingPortInPhoneNumberContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
94 95 96 97 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 94 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V1.PortingPortInPhoneNumberContext #{context}>" end |