class Twilio::REST::Conversations::V1::ServiceInstance

Public Class Methods

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

Initialize the ServiceInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid A 34 character string that uniquely identifies this

resource.

@return [ServiceInstance] ServiceInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/conversations/v1/service.rb
312 def initialize(version, payload, sid: nil)
313   super(version)
314 
315   # Marshaled Properties
316   @properties = {
317       'account_sid' => payload['account_sid'],
318       'sid' => payload['sid'],
319       'friendly_name' => payload['friendly_name'],
320       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
321       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
322       'url' => payload['url'],
323       'links' => payload['links'],
324   }
325 
326   # Context
327   @instance_context = nil
328   @params = {'sid' => sid || @properties['sid'], }
329 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The unique ID of the Account responsible for this service.

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
344 def account_sid
345   @properties['account_sid']
346 end
bindings() click to toggle source

Access the bindings @return [bindings] bindings

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
408 def bindings
409   context.bindings
410 end
configuration() click to toggle source

Access the configuration @return [configuration] configuration

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
429 def configuration
430   context.configuration
431 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 [ServiceContext] ServiceContext for this ServiceInstance

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
335 def context
336   unless @instance_context
337     @instance_context = ServiceContext.new(@version, @params['sid'], )
338   end
339   @instance_context
340 end
conversations() click to toggle source

Access the conversations @return [conversations] conversations

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
401 def conversations
402   context.conversations
403 end
date_created() click to toggle source

@return [Time] The date that this resource was created.

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
362 def date_created
363   @properties['date_created']
364 end
date_updated() click to toggle source

@return [Time] The date that this resource was last updated.

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
368 def date_updated
369   @properties['date_updated']
370 end
delete() click to toggle source

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

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
387 def delete
388   context.delete
389 end
fetch() click to toggle source

Fetch the ServiceInstance @return [ServiceInstance] Fetched ServiceInstance

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
394 def fetch
395   context.fetch
396 end
friendly_name() click to toggle source

@return [String] The human-readable name of this service.

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
356 def friendly_name
357   @properties['friendly_name']
358 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
449 def inspect
450   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
451   "<Twilio.Conversations.V1.ServiceInstance #{values}>"
452 end
participant_conversations() click to toggle source

Access the participant_conversations @return [participant_conversations] participant_conversations

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
436 def participant_conversations
437   context.participant_conversations
438 end
roles() click to toggle source

Access the roles @return [roles] roles

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
422 def roles
423   context.roles
424 end
sid() click to toggle source

@return [String] A 34 character string that uniquely identifies this resource.

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
350 def sid
351   @properties['sid']
352 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
442 def to_s
443   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
444   "<Twilio.Conversations.V1.ServiceInstance #{values}>"
445 end
url() click to toggle source

@return [String] An absolute URL for this service.

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
374 def url
375   @properties['url']
376 end
users() click to toggle source

Access the users @return [users] users

    # File lib/twilio-ruby/rest/conversations/v1/service.rb
415 def users
416   context.users
417 end