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
269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 269 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
283 284 285 286 287 288 289 290 291 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 283 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
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 296 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
360 361 362 363 364 365 366 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 360 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
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 315 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
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 334 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
377 378 379 380 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 377 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.AuthorizationDocumentContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
370 371 372 373 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 370 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.AuthorizationDocumentContext #{context}>" end |