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

Public Class Methods

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

Initialize the InviteInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] service_sid The SID of the

{Service}[https://www.twilio.com/docs/api/chat/rest/services] the resource is
associated with.

@param [String] channel_sid The SID of the

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

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

Invite resource to fetch.

@return [InviteInstance] InviteInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
267 def initialize(version, payload, service_sid: nil, channel_sid: nil, sid: nil)
268   super(version)
269 
270   # Marshaled Properties
271   @properties = {
272       'sid' => payload['sid'],
273       'account_sid' => payload['account_sid'],
274       'channel_sid' => payload['channel_sid'],
275       'service_sid' => payload['service_sid'],
276       'identity' => payload['identity'],
277       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
278       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
279       'role_sid' => payload['role_sid'],
280       'created_by' => payload['created_by'],
281       'url' => payload['url'],
282   }
283 
284   # Context
285   @instance_context = nil
286   @params = {
287       'service_sid' => service_sid,
288       'channel_sid' => channel_sid,
289       'sid' => sid || @properties['sid'],
290   }
291 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
317 def account_sid
318   @properties['account_sid']
319 end
channel_sid() click to toggle source

@return [String] The SID of the Channel the new resource belongs to

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
323 def channel_sid
324   @properties['channel_sid']
325 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [InviteContext] InviteContext for this InviteInstance

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
297 def context
298   unless @instance_context
299     @instance_context = InviteContext.new(
300         @version,
301         @params['service_sid'],
302         @params['channel_sid'],
303         @params['sid'],
304     )
305   end
306   @instance_context
307 end
created_by() click to toggle source

@return [String] The identity of the User that created the invite

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
359 def created_by
360   @properties['created_by']
361 end
date_created() click to toggle source

@return [Time] The RFC 2822 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
341 def date_created
342   @properties['date_created']
343 end
date_updated() click to toggle source

@return [Time] The RFC 2822 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
347 def date_updated
348   @properties['date_updated']
349 end
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
379 def delete
380   context.delete
381 end
fetch() click to toggle source

Fetch the InviteInstance @return [InviteInstance] Fetched InviteInstance

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
372 def fetch
373   context.fetch
374 end
identity() click to toggle source

@return [String] The string that identifies the resource's User

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
335 def identity
336   @properties['identity']
337 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
392 def inspect
393   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
394   "<Twilio.Chat.V1.InviteInstance #{values}>"
395 end
role_sid() click to toggle source

@return [String] The SID of the Role assigned to the member

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
353 def role_sid
354   @properties['role_sid']
355 end
service_sid() click to toggle source

@return [String] The SID of the Service that the resource is associated with

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
329 def service_sid
330   @properties['service_sid']
331 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
311 def sid
312   @properties['sid']
313 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
385 def to_s
386   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
387   "<Twilio.Chat.V1.InviteInstance #{values}>"
388 end
url() click to toggle source

@return [String] The absolute URL of the Invite resource

    # File lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb
365 def url
366   @properties['url']
367 end