Class: Twilio::REST::Messaging::V1::ServiceContext::UsAppToPersonContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Messaging::V1::ServiceContext::UsAppToPersonContext
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the UsAppToPersonInstance.
-
#fetch ⇒ UsAppToPersonInstance
Fetch the UsAppToPersonInstance.
-
#initialize(version, messaging_service_sid, sid) ⇒ UsAppToPersonContext
constructor
Initialize the UsAppToPersonContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, messaging_service_sid, sid) ⇒ UsAppToPersonContext
Initialize the UsAppToPersonContext
193 194 195 196 197 198 199 200 201 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 193 def initialize(version, messaging_service_sid, sid) super(version) # Path Solution @solution = { messaging_service_sid: messaging_service_sid, sid: sid, } @uri = "/Services/#{@solution[:messaging_service_sid]}/Compliance/Usa2p/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the UsAppToPersonInstance
205 206 207 208 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 205 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ UsAppToPersonInstance
Fetch the UsAppToPersonInstance
213 214 215 216 217 218 219 220 221 222 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 213 def fetch payload = @version.fetch('GET', @uri) UsAppToPersonInstance.new( @version, payload, messaging_service_sid: @solution[:messaging_service_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
234 235 236 237 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 234 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.UsAppToPersonContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
227 228 229 230 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 227 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.UsAppToPersonContext #{context}>" end |