class Twilio::REST::Messaging::V1::ServiceContext::UsAppToPersonContext

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Public Class Methods

new(version, messaging_service_sid, sid) click to toggle source

Initialize the UsAppToPersonContext @param [Version] version Version that contains the resource @param [String] messaging_service_sid The SID of the {Messaging

Service}[https://www.twilio.com/docs/messaging/services/api] to fetch the
resource from.

@param [String] sid The SID of the US A2P Compliance resource to fetch

`QE2c6890da8086d771620e9b13fadeba0b`.

@return [UsAppToPersonContext] UsAppToPersonContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
198 def initialize(version, messaging_service_sid, sid)
199   super(version)
200 
201   # Path Solution
202   @solution = {messaging_service_sid: messaging_service_sid, sid: sid, }
203   @uri = "/Services/#{@solution[:messaging_service_sid]}/Compliance/Usa2p/#{@solution[:sid]}"
204 end

Public Instance Methods

delete() click to toggle source

Delete the UsAppToPersonInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
209 def delete
210    @version.delete('DELETE', @uri)
211 end
fetch() click to toggle source

Fetch the UsAppToPersonInstance @return [UsAppToPersonInstance] Fetched UsAppToPersonInstance

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
216 def fetch
217   payload = @version.fetch('GET', @uri)
218 
219   UsAppToPersonInstance.new(
220       @version,
221       payload,
222       messaging_service_sid: @solution[:messaging_service_sid],
223       sid: @solution[:sid],
224   )
225 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
236 def inspect
237   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
238   "#<Twilio.Messaging.V1.UsAppToPersonContext #{context}>"
239 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
229 def to_s
230   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
231   "#<Twilio.Messaging.V1.UsAppToPersonContext #{context}>"
232 end