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.
-
#fetch ⇒ DestinationAlphaSenderInstance
Fetch the DestinationAlphaSenderInstance.
-
#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
174 175 176 177 178 179 180 181 182 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb', line 174 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
186 187 188 189 190 191 192 193 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb', line 186 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch ⇒ DestinationAlphaSenderInstance
Fetch the DestinationAlphaSenderInstance
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb', line 198 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 |
#inspect ⇒ Object
Provide a detailed, user friendly representation
225 226 227 228 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb', line 225 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.DestinationAlphaSenderContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
218 219 220 221 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb', line 218 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.DestinationAlphaSenderContext #{context}>" end |