Class: Twilio::REST::Messaging::V1::DomainConfigInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Messaging::V1::DomainConfigInstance
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/domain_config.rb
Instance Method Summary collapse
-
#callback_url ⇒ String
URL to receive click events to your webhook whenever the recipients click on the shortened links.
-
#config_sid ⇒ String
The unique string that we created to identify the Domain config (prefix ZK).
-
#context ⇒ DomainConfigContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#continue_on_failure ⇒ Boolean
Boolean field to set customer delivery preference when there is a failure in linkShortening service.
-
#date_created ⇒ Time
Date this Domain Config was created.
-
#date_updated ⇒ Time
Date that this Domain Config was last updated.
-
#disable_https ⇒ Boolean
Customer's choice to send links with/without "https://" attached to shortened url.
-
#domain_sid ⇒ String
The unique string that we created to identify the Domain resource.
-
#fallback_url ⇒ String
Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url.
-
#fetch ⇒ DomainConfigInstance
Fetch the DomainConfigInstance.
-
#initialize(version, payload, domain_sid: nil) ⇒ DomainConfigInstance
constructor
Initialize the DomainConfigInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(fallback_url: :unset, callback_url: :unset, continue_on_failure: :unset, disable_https: :unset) ⇒ DomainConfigInstance
Update the DomainConfigInstance.
- #url ⇒ String
Constructor Details
#initialize(version, payload, domain_sid: nil) ⇒ DomainConfigInstance
Initialize the DomainConfigInstance
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 283 def initialize(version, payload , domain_sid: nil) super(version) # Marshaled Properties @properties = { 'domain_sid' => payload['domain_sid'], 'config_sid' => payload['config_sid'], 'fallback_url' => payload['fallback_url'], 'callback_url' => payload['callback_url'], 'continue_on_failure' => payload['continue_on_failure'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], 'disable_https' => payload['disable_https'], } # Context @instance_context = nil @params = { 'domain_sid' => domain_sid || @properties['domain_sid'] , } end |
Instance Method Details
#callback_url ⇒ String
Returns URL to receive click events to your webhook whenever the recipients click on the shortened links.
336 337 338 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 336 def callback_url @properties['callback_url'] end |
#config_sid ⇒ String
Returns The unique string that we created to identify the Domain config (prefix ZK).
324 325 326 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 324 def config_sid @properties['config_sid'] end |
#context ⇒ DomainConfigContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
309 310 311 312 313 314 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 309 def context unless @instance_context @instance_context = DomainConfigContext.new(@version , @params['domain_sid']) end @instance_context end |
#continue_on_failure ⇒ Boolean
Returns Boolean field to set customer delivery preference when there is a failure in linkShortening service.
342 343 344 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 342 def continue_on_failure @properties['continue_on_failure'] end |
#date_created ⇒ Time
Returns Date this Domain Config was created.
348 349 350 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 348 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns Date that this Domain Config was last updated.
354 355 356 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 354 def date_updated @properties['date_updated'] end |
#disable_https ⇒ Boolean
Returns Customer's choice to send links with/without "https://" attached to shortened url. If true, messages will not be sent with https:// at the beginning of the url. If false, messages will be sent with https:// at the beginning of the url. False is the default behavior if it is not specified.
366 367 368 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 366 def disable_https @properties['disable_https'] end |
#domain_sid ⇒ String
Returns The unique string that we created to identify the Domain resource.
318 319 320 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 318 def domain_sid @properties['domain_sid'] end |
#fallback_url ⇒ String
Returns Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping.
330 331 332 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 330 def fallback_url @properties['fallback_url'] end |
#fetch ⇒ DomainConfigInstance
Fetch the DomainConfigInstance
373 374 375 376 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 373 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
409 410 411 412 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 409 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.DomainConfigInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
402 403 404 405 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 402 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.DomainConfigInstance #{values}>" end |
#update(fallback_url: :unset, callback_url: :unset, continue_on_failure: :unset, disable_https: :unset) ⇒ DomainConfigInstance
Update the DomainConfigInstance
385 386 387 388 389 390 391 392 393 394 395 396 397 398 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 385 def update( fallback_url: :unset, callback_url: :unset, continue_on_failure: :unset, disable_https: :unset ) context.update( fallback_url: fallback_url, callback_url: callback_url, continue_on_failure: continue_on_failure, disable_https: disable_https, ) end |
#url ⇒ String
360 361 362 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config.rb', line 360 def url @properties['url'] end |