Class: Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceInstance
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb
Instance Method Summary collapse
-
#context ⇒ LinkshorteningMessagingServiceContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#create ⇒ LinkshorteningMessagingServiceInstance
Create the LinkshorteningMessagingServiceInstance.
-
#delete ⇒ Boolean
Delete the LinkshorteningMessagingServiceInstance.
-
#domain_sid ⇒ String
The unique string identifies the domain resource.
-
#initialize(version, payload, domain_sid: nil, messaging_service_sid: nil) ⇒ LinkshorteningMessagingServiceInstance
constructor
Initialize the LinkshorteningMessagingServiceInstance.
-
#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, domain_sid: nil, messaging_service_sid: nil) ⇒ LinkshorteningMessagingServiceInstance
Initialize the LinkshorteningMessagingServiceInstance
145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb', line 145 def initialize(version, payload , domain_sid: nil, messaging_service_sid: nil) super(version) # Marshaled Properties @properties = { 'domain_sid' => payload['domain_sid'], 'messaging_service_sid' => payload['messaging_service_sid'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'domain_sid' => domain_sid || @properties['domain_sid'] ,'messaging_service_sid' => messaging_service_sid || @properties['messaging_service_sid'] , } end |
Instance Method Details
#context ⇒ LinkshorteningMessagingServiceContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
164 165 166 167 168 169 |
# File 'lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb', line 164 def context unless @instance_context @instance_context = LinkshorteningMessagingServiceContext.new(@version , @params['domain_sid'], @params['messaging_service_sid']) end @instance_context end |
#create ⇒ LinkshorteningMessagingServiceInstance
Create the LinkshorteningMessagingServiceInstance
192 193 194 195 |
# File 'lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb', line 192 def create context.create end |
#delete ⇒ Boolean
Delete the LinkshorteningMessagingServiceInstance
200 201 202 203 |
# File 'lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb', line 200 def delete context.delete end |
#domain_sid ⇒ String
Returns The unique string identifies the domain resource.
173 174 175 |
# File 'lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb', line 173 def domain_sid @properties['domain_sid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
214 215 216 217 |
# File 'lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb', line 214 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.LinkshorteningMessagingServiceInstance #{values}>" end |
#messaging_service_sid ⇒ String
Returns The unique string that identifies the messaging service.
179 180 181 |
# File 'lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb', line 179 def messaging_service_sid @properties['messaging_service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
207 208 209 210 |
# File 'lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb', line 207 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.LinkshorteningMessagingServiceInstance #{values}>" end |
#url ⇒ String
185 186 187 |
# File 'lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb', line 185 def url @properties['url'] end |