Class: Twilio::REST::Conversations::V1::ServiceContext::ConversationWithParticipantsInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, chat_service_sid: nil) ⇒ ConversationWithParticipantsInstance

Initialize the ConversationWithParticipantsInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this ConversationWithParticipants resource.

  • sid (String)

    The SID of the Call resource to fetch.



272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 272

def initialize(version, payload , chat_service_sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'account_sid' => payload['account_sid'],
        'chat_service_sid' => payload['chat_service_sid'],
        'messaging_service_sid' => payload['messaging_service_sid'],
        'sid' => payload['sid'],
        'friendly_name' => payload['friendly_name'],
        'unique_name' => payload['unique_name'],
        'attributes' => payload['attributes'],
        'state' => payload['state'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
        'timers' => payload['timers'],
        'links' => payload['links'],
        'bindings' => payload['bindings'],
        'url' => payload['url'],
    }
end

Instance Method Details

#account_sidString

Returns The unique ID of the [Account](www.twilio.com/docs/iam/api/account) responsible for this conversation.

Returns:



298
299
300
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 298

def 
    @properties['account_sid']
end

#attributesString

Returns An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned.

Returns:

  • (String)

    An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned.



334
335
336
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 334

def attributes
    @properties['attributes']
end

#bindingsHash

Returns:

  • (Hash)


370
371
372
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 370

def bindings
    @properties['bindings']
end

#chat_service_sidString

Returns The unique ID of the [Conversation Service](www.twilio.com/docs/conversations/api/service-resource) this conversation belongs to.

Returns:



304
305
306
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 304

def chat_service_sid
    @properties['chat_service_sid']
end

#date_createdTime

Returns The date that this resource was created.

Returns:

  • (Time)

    The date that this resource was created.



346
347
348
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 346

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The date that this resource was last updated.

Returns:

  • (Time)

    The date that this resource was last updated.



352
353
354
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 352

def date_updated
    @properties['date_updated']
end

#friendly_nameString

Returns The human-readable name of this conversation, limited to 256 characters. Optional.

Returns:

  • (String)

    The human-readable name of this conversation, limited to 256 characters. Optional.



322
323
324
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 322

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



388
389
390
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 388

def inspect
    "<Twilio.Conversations.V1.ConversationWithParticipantsInstance>"
end


364
365
366
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 364

def links
    @properties['links']
end

#messaging_service_sidString

Returns The unique ID of the [Messaging Service](www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to.

Returns:



310
311
312
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 310

def messaging_service_sid
    @properties['messaging_service_sid']
end

#sidString

Returns A 34 character string that uniquely identifies this resource.

Returns:

  • (String)

    A 34 character string that uniquely identifies this resource.



316
317
318
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 316

def sid
    @properties['sid']
end

#stateState

Returns:

  • (State)


340
341
342
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 340

def state
    @properties['state']
end

#timersHash

Returns Timer date values representing state update for this conversation.

Returns:

  • (Hash)

    Timer date values representing state update for this conversation.



358
359
360
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 358

def timers
    @properties['timers']
end

#to_sObject

Provide a user friendly representation



382
383
384
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 382

def to_s
    "<Twilio.Conversations.V1.ConversationWithParticipantsInstance>"
end

#unique_nameString

Returns An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource’s sid in the URL.

Returns:

  • (String)

    An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource’s sid in the URL.



328
329
330
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 328

def unique_name
    @properties['unique_name']
end

#urlString

Returns An absolute API resource URL for this conversation.

Returns:

  • (String)

    An absolute API resource URL for this conversation.



376
377
378
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 376

def url
    @properties['url']
end