class Twilio::REST::Chat::V2::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/chat/rest/service-resource] to fetch the
Invite resource from.

@param [String] channel_sid The SID of the

{Channel}[https://www.twilio.com/docs/chat/channels] the Invite resource to
fetch belongs to. This value can be the Channel resource's `sid` or
`unique_name`.

@param [String] sid The SID of the Invite resource to fetch. @return [InviteContext] InviteContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb
204 def initialize(version, service_sid, channel_sid, sid)
205   super(version)
206 
207   # Path Solution
208   @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid, }
209   @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Invites/#{@solution[:sid]}"
210 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/v2/service/channel/invite.rb
230 def delete
231    @version.delete('DELETE', @uri)
232 end
fetch() click to toggle source

Fetch the InviteInstance @return [InviteInstance] Fetched InviteInstance

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

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb
243 def inspect
244   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
245   "#<Twilio.Chat.V2.InviteContext #{context}>"
246 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb
236 def to_s
237   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
238   "#<Twilio.Chat.V2.InviteContext #{context}>"
239 end