class Twilio::REST::Chat::V1::ServiceContext::ChannelContext::InviteContext

Public Class Methods

new(version, service_sid, channel_sid, sid) click to toggle source

Initialize the InviteContext @param [Version] version Version that contains the resource @param [String] service_sid The SID of the

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

@param [String] channel_sid The SID of the

{Channel}[https://www.twilio.com/docs/api/chat/rest/channels] the resource to
fetch belongs to.

@param [String] sid The Twilio-provided string that uniquely identifies the

Invite resource to fetch.

@return [InviteContext] InviteContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
208 def initialize(version, service_sid, channel_sid, sid)
209   super(version)
210 
211   # Path Solution
212   @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid, }
213   @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Invites/#{@solution[:sid]}"
214 end

Public Instance Methods

delete() click to toggle source

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

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
234 def delete
235    @version.delete('DELETE', @uri)
236 end
fetch() click to toggle source

Fetch the InviteInstance @return [InviteInstance] Fetched InviteInstance

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
219 def fetch
220   payload = @version.fetch('GET', @uri)
221 
222   InviteInstance.new(
223       @version,
224       payload,
225       service_sid: @solution[:service_sid],
226       channel_sid: @solution[:channel_sid],
227       sid: @solution[:sid],
228   )
229 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
247 def inspect
248   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
249   "#<Twilio.Chat.V1.InviteContext #{context}>"
250 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
240 def to_s
241   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
242   "#<Twilio.Chat.V1.InviteContext #{context}>"
243 end