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
228 229 230 231 232 233 234 235 236 |
# File 'lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb', line 228 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
240 241 242 243 |
# File 'lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb', line 240 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ HostedNumberOrderInstance
Fetch the HostedNumberOrderInstance
248 249 250 251 252 253 254 255 256 |
# File 'lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb', line 248 def fetch payload = @version.fetch('GET', @uri) HostedNumberOrderInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
268 269 270 271 |
# File 'lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb', line 268 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.HostedNumberOrderContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
261 262 263 264 |
# File 'lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb', line 261 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.HostedNumberOrderContext #{context}>" end |