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
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
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.
-
#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
We will redirect requests to urls we are unable to identify to this 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
The url.
Constructor Details
#initialize(version, payload, messaging_service_sid: nil) ⇒ DomainConfigMessagingServiceInstance
Initialize the DomainConfigMessagingServiceInstance
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 120 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'], '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.
180 181 182 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 180 def callback_url @properties['callback_url'] end |
#config_sid ⇒ String
Returns The unique string that we created to identify the Domain config (prefix ZK).
162 163 164 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 162 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
144 145 146 147 148 149 150 151 152 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 144 def context unless @instance_context @instance_context = DomainConfigMessagingServiceContext.new( @version, @params['messaging_service_sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns Date this Domain Config was created.
186 187 188 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 186 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns Date that this Domain Config was last updated.
192 193 194 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 192 def date_updated @properties['date_updated'] end |
#domain_sid ⇒ String
Returns The unique string that we created to identify the Domain resource.
156 157 158 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 156 def domain_sid @properties['domain_sid'] end |
#fallback_url ⇒ String
Returns We will redirect requests to urls we are unable to identify to this url.
174 175 176 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 174 def fallback_url @properties['fallback_url'] end |
#fetch ⇒ DomainConfigMessagingServiceInstance
Fetch the DomainConfigMessagingServiceInstance
205 206 207 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 205 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
218 219 220 221 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 218 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.
168 169 170 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 168 def messaging_service_sid @properties['messaging_service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
211 212 213 214 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 211 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.DomainConfigMessagingServiceInstance #{values}>" end |
#url ⇒ String
Returns The url.
198 199 200 |
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 198 def url @properties['url'] end |