Class: Twilio::REST::Numbers::V2::HostedNumberOrderContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Numbers::V2::HostedNumberOrderContext
- Defined in:
- lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the HostedNumberOrderInstance.
-
#fetch ⇒ HostedNumberOrderInstance
Fetch the HostedNumberOrderInstance.
-
#initialize(version, sid) ⇒ HostedNumberOrderContext
constructor
Initialize the HostedNumberOrderContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ HostedNumberOrderContext
Initialize the HostedNumberOrderContext
234 235 236 237 238 239 240 241 242 |
# File 'lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb', line 234 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/HostedNumber/Orders/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the HostedNumberOrderInstance
246 247 248 249 |
# File 'lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb', line 246 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ HostedNumberOrderInstance
Fetch the HostedNumberOrderInstance
254 255 256 257 258 259 260 261 262 |
# File 'lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb', line 254 def fetch payload = @version.fetch('GET', @uri) HostedNumberOrderInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
274 275 276 277 |
# File 'lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb', line 274 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.HostedNumberOrderContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
267 268 269 270 |
# File 'lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb', line 267 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.HostedNumberOrderContext #{context}>" end |