Class: Twilio::REST::Numbers::V2::AuthorizationDocumentContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Numbers::V2::AuthorizationDocumentContext
- Defined in:
- lib/twilio-ruby/rest/numbers/v2/authorization_document.rb,
lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb
Defined Under Namespace
Classes: DependentHostedNumberOrderInstance, DependentHostedNumberOrderList, DependentHostedNumberOrderListResponse, DependentHostedNumberOrderPage, DependentHostedNumberOrderPageMetadata
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the AuthorizationDocumentInstance.
-
#delete_with_metadata ⇒ Boolean
Delete the AuthorizationDocumentInstanceMetadata.
-
#dependent_hosted_number_orders ⇒ DependentHostedNumberOrderList, DependentHostedNumberOrderContext
Access the dependent_hosted_number_orders.
-
#fetch ⇒ AuthorizationDocumentInstance
Fetch the AuthorizationDocumentInstance.
-
#fetch_with_metadata ⇒ AuthorizationDocumentInstance
Fetch the AuthorizationDocumentInstanceMetadata.
-
#initialize(version, sid) ⇒ AuthorizationDocumentContext
constructor
Initialize the AuthorizationDocumentContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ AuthorizationDocumentContext
Initialize the AuthorizationDocumentContext
261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 261 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/HostedNumber/AuthorizationDocuments/#{@solution[:sid]}" # Dependents @dependent_hosted_number_orders = nil end |
Instance Method Details
#delete ⇒ Boolean
Delete the AuthorizationDocumentInstance
275 276 277 278 279 280 281 282 283 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 275 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#delete_with_metadata ⇒ Boolean
Delete the AuthorizationDocumentInstanceMetadata
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 288 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) = AuthorizationDocumentInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) AuthorizationDocumentInstanceMetadata.new(@version, , response.headers, response.status_code) end |
#dependent_hosted_number_orders ⇒ DependentHostedNumberOrderList, DependentHostedNumberOrderContext
Access the dependent_hosted_number_orders
352 353 354 355 356 357 358 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 352 def dependent_hosted_number_orders unless @dependent_hosted_number_orders @dependent_hosted_number_orders = DependentHostedNumberOrderList.new( @version, signing_document_sid: @solution[:sid], ) end @dependent_hosted_number_orders end |
#fetch ⇒ AuthorizationDocumentInstance
Fetch the AuthorizationDocumentInstance
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 307 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) AuthorizationDocumentInstance.new( @version, payload, sid: @solution[:sid], ) end |
#fetch_with_metadata ⇒ AuthorizationDocumentInstance
Fetch the AuthorizationDocumentInstanceMetadata
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 326 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) = AuthorizationDocumentInstance.new( @version, response.body, sid: @solution[:sid], ) AuthorizationDocumentInstanceMetadata.new( @version, , response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
369 370 371 372 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 369 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.AuthorizationDocumentContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
362 363 364 365 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 362 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.AuthorizationDocumentContext #{context}>" end |