Class: Twilio::REST::Numbers::V1::PortingPortInContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Numbers::V1::PortingPortInContext
- Defined in:
- lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the PortingPortInInstance.
-
#fetch ⇒ PortingPortInInstance
Fetch the PortingPortInInstance.
-
#initialize(version, port_in_request_sid) ⇒ PortingPortInContext
constructor
Initialize the PortingPortInContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, port_in_request_sid) ⇒ PortingPortInContext
Initialize the PortingPortInContext
69 70 71 72 73 74 75 76 77 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 69 def initialize(version, port_in_request_sid) super(version) # Path Solution @solution = { port_in_request_sid: port_in_request_sid, } @uri = "/Porting/PortIn/#{@solution[:port_in_request_sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the PortingPortInInstance
81 82 83 84 85 86 87 88 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 81 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch ⇒ PortingPortInInstance
Fetch the PortingPortInInstance
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 93 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) PortingPortInInstance.new( @version, payload, port_in_request_sid: @solution[:port_in_request_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
119 120 121 122 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 119 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V1.PortingPortInContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
112 113 114 115 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 112 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V1.PortingPortInContext #{context}>" end |