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
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 126 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.
184 185 186 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 184 def callback_url @properties['callback_url'] end |
#config_sid ⇒ String
Returns The unique string that we created to identify the Domain config (prefix ZK).
166 167 168 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 166 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
151 152 153 154 155 156 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 151 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.
190 191 192 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 190 def continue_on_failure @properties['continue_on_failure'] end |
#date_created ⇒ Time
Returns Date this Domain Config was created.
196 197 198 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 196 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns Date that this Domain Config was last updated.
202 203 204 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 202 def date_updated @properties['date_updated'] end |
#domain_sid ⇒ String
Returns The unique string that we created to identify the Domain resource.
160 161 162 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 160 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.
178 179 180 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 178 def fallback_url @properties['fallback_url'] end |
#fetch ⇒ DomainConfigMessagingServiceInstance
Fetch the DomainConfigMessagingServiceInstance
215 216 217 218 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 215 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
229 230 231 232 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 229 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.
172 173 174 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 172 def messaging_service_sid @properties['messaging_service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
222 223 224 225 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 222 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.DomainConfigMessagingServiceInstance #{values}>" end |
#url ⇒ String
208 209 210 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 208 def url @properties['url'] end |