Class: Twilio::REST::Messaging::V1::DomainConfigMessagingServiceInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Messaging::V1::DomainConfigMessagingServiceInstance
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.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 ⇒ DomainConfigMessagingServiceContext
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.
-
#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 ⇒ DomainConfigMessagingServiceInstance
Fetch the DomainConfigMessagingServiceInstance.
-
#initialize(version, payload, messaging_service_sid: nil) ⇒ DomainConfigMessagingServiceInstance
constructor
Initialize the DomainConfigMessagingServiceInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#messaging_service_sid ⇒ String
The unique string that identifies the messaging service.
-
#to_s ⇒ Object
Provide a user friendly representation.
- #url ⇒ String
Constructor Details
#initialize(version, payload, messaging_service_sid: nil) ⇒ DomainConfigMessagingServiceInstance
Initialize the DomainConfigMessagingServiceInstance
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 131 def initialize(version, payload , messaging_service_sid: nil) super(version) # Marshaled Properties @properties = { 'domain_sid' => payload['domain_sid'], 'config_sid' => payload['config_sid'], 'messaging_service_sid' => payload['messaging_service_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'], } # Context @instance_context = nil @params = { 'messaging_service_sid' => messaging_service_sid || @properties['messaging_service_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.
189 190 191 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 189 def callback_url @properties['callback_url'] end |
#config_sid ⇒ String
Returns The unique string that we created to identify the Domain config (prefix ZK).
171 172 173 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 171 def config_sid @properties['config_sid'] end |
#context ⇒ DomainConfigMessagingServiceContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
156 157 158 159 160 161 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 156 def context unless @instance_context @instance_context = DomainConfigMessagingServiceContext.new(@version , @params['messaging_service_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.
195 196 197 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 195 def continue_on_failure @properties['continue_on_failure'] end |
#date_created ⇒ Time
Returns Date this Domain Config was created.
201 202 203 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 201 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns Date that this Domain Config was last updated.
207 208 209 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 207 def date_updated @properties['date_updated'] end |
#domain_sid ⇒ String
Returns The unique string that we created to identify the Domain resource.
165 166 167 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 165 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.
183 184 185 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 183 def fallback_url @properties['fallback_url'] end |
#fetch ⇒ DomainConfigMessagingServiceInstance
Fetch the DomainConfigMessagingServiceInstance
220 221 222 223 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 220 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
234 235 236 237 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 234 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.DomainConfigMessagingServiceInstance #{values}>" end |
#messaging_service_sid ⇒ String
Returns The unique string that identifies the messaging service.
177 178 179 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 177 def messaging_service_sid @properties['messaging_service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
227 228 229 230 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 227 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.DomainConfigMessagingServiceInstance #{values}>" end |
#url ⇒ String
213 214 215 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 213 def url @properties['url'] end |