Class: Twilio::REST::Messaging::V1::DomainCertsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Messaging::V1::DomainCertsInstance
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/domain_certs.rb
Instance Method Summary collapse
-
#cert_in_validation ⇒ Hash
Optional JSON field describing the status and upload date of a new certificate in the process of validation.
-
#certificate_sid ⇒ String
The unique string that we created to identify this Certificate resource.
-
#context ⇒ DomainCertsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
Date that this Domain was registered to the Twilio platform to create a new Domain object.
-
#date_expires ⇒ Time
Date that the private certificate associated with this domain expires.
-
#date_updated ⇒ Time
Date that this Domain was last updated.
-
#delete ⇒ Boolean
Delete the DomainCertsInstance.
-
#domain_name ⇒ String
Full url path for this domain.
-
#domain_sid ⇒ String
The unique string that we created to identify the Domain resource.
-
#fetch ⇒ DomainCertsInstance
Fetch the DomainCertsInstance.
-
#initialize(version, payload, domain_sid: nil) ⇒ DomainCertsInstance
constructor
Initialize the DomainCertsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(tls_cert: nil) ⇒ DomainCertsInstance
Update the DomainCertsInstance.
- #url ⇒ String
Constructor Details
#initialize(version, payload, domain_sid: nil) ⇒ DomainCertsInstance
Initialize the DomainCertsInstance
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 297 def initialize(version, payload , domain_sid: nil) super(version) # Marshaled Properties @properties = { 'domain_sid' => payload['domain_sid'], 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'date_expires' => Twilio.deserialize_iso8601_datetime(payload['date_expires']), 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'domain_name' => payload['domain_name'], 'certificate_sid' => payload['certificate_sid'], 'url' => payload['url'], 'cert_in_validation' => payload['cert_in_validation'], } # Context @instance_context = nil @params = { 'domain_sid' => domain_sid || @properties['domain_sid'] , } end |
Instance Method Details
#cert_in_validation ⇒ Hash
Returns Optional JSON field describing the status and upload date of a new certificate in the process of validation.
373 374 375 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 373 def cert_in_validation @properties['cert_in_validation'] end |
#certificate_sid ⇒ String
Returns The unique string that we created to identify this Certificate resource.
361 362 363 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 361 def certificate_sid @properties['certificate_sid'] end |
#context ⇒ DomainCertsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
322 323 324 325 326 327 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 322 def context unless @instance_context @instance_context = DomainCertsContext.new(@version , @params['domain_sid']) end @instance_context end |
#date_created ⇒ Time
Returns Date that this Domain was registered to the Twilio platform to create a new Domain object.
349 350 351 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 349 def date_created @properties['date_created'] end |
#date_expires ⇒ Time
Returns Date that the private certificate associated with this domain expires. You will need to update the certificate before that date to ensure your shortened links will continue to work.
343 344 345 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 343 def date_expires @properties['date_expires'] end |
#date_updated ⇒ Time
Returns Date that this Domain was last updated.
337 338 339 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 337 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the DomainCertsInstance
380 381 382 383 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 380 def delete context.delete end |
#domain_name ⇒ String
Returns Full url path for this domain.
355 356 357 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 355 def domain_name @properties['domain_name'] end |
#domain_sid ⇒ String
Returns The unique string that we created to identify the Domain resource.
331 332 333 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 331 def domain_sid @properties['domain_sid'] end |
#fetch ⇒ DomainCertsInstance
Fetch the DomainCertsInstance
388 389 390 391 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 388 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
415 416 417 418 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 415 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.DomainCertsInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
408 409 410 411 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 408 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.DomainCertsInstance #{values}>" end |
#update(tls_cert: nil) ⇒ DomainCertsInstance
Update the DomainCertsInstance
397 398 399 400 401 402 403 404 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 397 def update( tls_cert: nil ) context.update( tls_cert: tls_cert, ) end |
#url ⇒ String
367 368 369 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_certs.rb', line 367 def url @properties['url'] end |