Class: Twilio::REST::Preview::HostedNumbers::AuthorizationDocumentInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::HostedNumbers::AuthorizationDocumentInstance
- Defined in:
- lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb
Instance Method Summary collapse
-
#address_sid ⇒ String
A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument.
-
#cc_emails ⇒ Array<String>
Email recipients who will be informed when an Authorization Document has been sent and signed.
-
#context ⇒ AuthorizationDocumentContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date this resource was created, given as [GMT RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#date_updated ⇒ Time
The date that this resource was updated, given as [GMT RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#dependent_hosted_number_orders ⇒ dependent_hosted_number_orders
Access the dependent_hosted_number_orders.
-
#email ⇒ String
Email that this AuthorizationDocument will be sent to for signing.
-
#fetch ⇒ AuthorizationDocumentInstance
Fetch the AuthorizationDocumentInstance.
-
#initialize(version, payload, sid: nil) ⇒ AuthorizationDocumentInstance
constructor
Initialize the AuthorizationDocumentInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
- #links ⇒ Hash
-
#sid ⇒ String
A 34 character string that uniquely identifies this AuthorizationDocument.
- #status ⇒ Status
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(hosted_number_order_sids: :unset, address_sid: :unset, email: :unset, cc_emails: :unset, status: :unset, contact_title: :unset, contact_phone_number: :unset) ⇒ AuthorizationDocumentInstance
Update the AuthorizationDocumentInstance.
- #url ⇒ String
Constructor Details
#initialize(version, payload, sid: nil) ⇒ AuthorizationDocumentInstance
Initialize the AuthorizationDocumentInstance
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 326 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'address_sid' => payload['address_sid'], 'status' => payload['status'], 'email' => payload['email'], 'cc_emails' => payload['cc_emails'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#address_sid ⇒ String
Returns A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument.
366 367 368 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 366 def address_sid @properties['address_sid'] end |
#cc_emails ⇒ Array<String>
Returns Email recipients who will be informed when an Authorization Document has been sent and signed.
384 385 386 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 384 def cc_emails @properties['cc_emails'] end |
#context ⇒ AuthorizationDocumentContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
351 352 353 354 355 356 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 351 def context unless @instance_context @instance_context = AuthorizationDocumentContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date this resource was created, given as [GMT RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
390 391 392 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 390 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this resource was updated, given as [GMT RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
396 397 398 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 396 def date_updated @properties['date_updated'] end |
#dependent_hosted_number_orders ⇒ dependent_hosted_number_orders
Access the dependent_hosted_number_orders
454 455 456 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 454 def dependent_hosted_number_orders context.dependent_hosted_number_orders end |
#email ⇒ String
Returns Email that this AuthorizationDocument will be sent to for signing.
378 379 380 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 378 def email @properties['email'] end |
#fetch ⇒ AuthorizationDocumentInstance
Fetch the AuthorizationDocumentInstance
415 416 417 418 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 415 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
467 468 469 470 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 467 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.HostedNumbers.AuthorizationDocumentInstance #{values}>" end |
#links ⇒ Hash
408 409 410 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 408 def links @properties['links'] end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this AuthorizationDocument.
360 361 362 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 360 def sid @properties['sid'] end |
#status ⇒ Status
372 373 374 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 372 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
460 461 462 463 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 460 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.HostedNumbers.AuthorizationDocumentInstance #{values}>" end |
#update(hosted_number_order_sids: :unset, address_sid: :unset, email: :unset, cc_emails: :unset, status: :unset, contact_title: :unset, contact_phone_number: :unset) ⇒ AuthorizationDocumentInstance
Update the AuthorizationDocumentInstance
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 430 def update( hosted_number_order_sids: :unset, address_sid: :unset, email: :unset, cc_emails: :unset, status: :unset, contact_title: :unset, contact_phone_number: :unset ) context.update( hosted_number_order_sids: hosted_number_order_sids, address_sid: address_sid, email: email, cc_emails: cc_emails, status: status, contact_title: contact_title, contact_phone_number: contact_phone_number, ) end |
#url ⇒ String
402 403 404 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 402 def url @properties['url'] end |