Class: Twilio::REST::Messaging::V2::DomainCertsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Messaging::V2::DomainCertsInstance
- Defined in:
- lib/twilio-ruby/rest/messaging/v2/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.
-
#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.
-
#managed ⇒ Boolean
Boolean field that indicates whether the certificate is managed by Twilio or uploaded by the customer.
-
#requesting ⇒ Boolean
Boolean field that indicates whether a Twilio managed cert request is in progress or completed.
-
#to_s ⇒ Object
Provide a user friendly representation.
- #url ⇒ String
Constructor Details
#initialize(version, payload, domain_sid: nil) ⇒ DomainCertsInstance
Initialize the DomainCertsInstance
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 266 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'], 'managed' => payload['managed'], 'requesting' => payload['requesting'], '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.
356 357 358 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 356 def cert_in_validation @properties['cert_in_validation'] end |
#certificate_sid ⇒ String
Returns The unique string that we created to identify this Certificate resource.
332 333 334 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 332 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
293 294 295 296 297 298 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 293 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.
320 321 322 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 320 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.
314 315 316 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 314 def date_expires @properties['date_expires'] end |
#date_updated ⇒ Time
Returns Date that this Domain was last updated.
308 309 310 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 308 def date_updated @properties['date_updated'] end |
#domain_name ⇒ String
Returns Full url path for this domain.
326 327 328 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 326 def domain_name @properties['domain_name'] end |
#domain_sid ⇒ String
Returns The unique string that we created to identify the Domain resource.
302 303 304 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 302 def domain_sid @properties['domain_sid'] end |
#fetch ⇒ DomainCertsInstance
Fetch the DomainCertsInstance
363 364 365 366 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 363 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
377 378 379 380 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 377 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V2.DomainCertsInstance #{values}>" end |
#managed ⇒ Boolean
Returns Boolean field that indicates whether the certificate is managed by Twilio or uploaded by the customer.
338 339 340 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 338 def managed @properties['managed'] end |
#requesting ⇒ Boolean
Returns Boolean field that indicates whether a Twilio managed cert request is in progress or completed. True indicates a request is in progress and false indicates the request has completed or not requested yet.
344 345 346 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 344 def requesting @properties['requesting'] end |
#to_s ⇒ Object
Provide a user friendly representation
370 371 372 373 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 370 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V2.DomainCertsInstance #{values}>" end |
#url ⇒ String
350 351 352 |
# File 'lib/twilio-ruby/rest/messaging/v2/domain_certs.rb', line 350 def url @properties['url'] end |