Class: Twilio::REST::Messaging::V1::ServiceContext::DestinationAlphaSenderContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Messaging::V1::ServiceContext::DestinationAlphaSenderContext
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the DestinationAlphaSenderInstance.
-
#delete_with_metadata ⇒ Boolean
Delete the DestinationAlphaSenderInstanceMetadata.
-
#fetch ⇒ DestinationAlphaSenderInstance
Fetch the DestinationAlphaSenderInstance.
-
#fetch_with_metadata ⇒ DestinationAlphaSenderInstance
Fetch the DestinationAlphaSenderInstanceMetadata.
-
#initialize(version, service_sid, sid) ⇒ DestinationAlphaSenderContext
constructor
Initialize the DestinationAlphaSenderContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, service_sid, sid) ⇒ DestinationAlphaSenderContext
Initialize the DestinationAlphaSenderContext
234 235 236 237 238 239 240 241 242 243 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb', line 234 def initialize(version, service_sid, sid) super(version) # Path Solution @solution = { service_sid: service_sid, sid: sid, } @uri = "/Services/#{@solution[:service_sid]}/DestinationAlphaSenders/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the DestinationAlphaSenderInstance
247 248 249 250 251 252 253 254 255 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb', line 247 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#delete_with_metadata ⇒ Boolean
Delete the DestinationAlphaSenderInstanceMetadata
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb', line 260 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) destinationAlphaSender_instance = DestinationAlphaSenderInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) DestinationAlphaSenderInstanceMetadata.new(@version, destinationAlphaSender_instance, response.headers, response.status_code) end |
#fetch ⇒ DestinationAlphaSenderInstance
Fetch the DestinationAlphaSenderInstance
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb', line 279 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) DestinationAlphaSenderInstance.new( @version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], ) end |
#fetch_with_metadata ⇒ DestinationAlphaSenderInstance
Fetch the DestinationAlphaSenderInstanceMetadata
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb', line 299 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) destination_alpha_sender_instance = DestinationAlphaSenderInstance.new( @version, response.body, service_sid: @solution[:service_sid], sid: @solution[:sid], ) DestinationAlphaSenderInstanceMetadata.new( @version, destination_alpha_sender_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
332 333 334 335 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb', line 332 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.DestinationAlphaSenderContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
325 326 327 328 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb', line 325 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.DestinationAlphaSenderContext #{context}>" end |