Class: Twilio::REST::Conversations::V1::ServiceContext::ParticipantConversationInstance

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

Instance Method Summary collapse

Constructor Details

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

Initialize the ParticipantConversationInstance

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 ParticipantConversation resource.

  • sid (String)

    The SID of the Call resource to fetch.



277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 277

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'],
        'participant_sid' => payload['participant_sid'],
        'participant_user_sid' => payload['participant_user_sid'],
        'participant_identity' => payload['participant_identity'],
        'participant_messaging_binding' => payload['participant_messaging_binding'],
        'conversation_sid' => payload['conversation_sid'],
        'conversation_unique_name' => payload['conversation_unique_name'],
        'conversation_friendly_name' => payload['conversation_friendly_name'],
        'conversation_attributes' => payload['conversation_attributes'],
        'conversation_date_created' => Twilio.deserialize_iso8601_datetime(payload['conversation_date_created']),
        'conversation_date_updated' => Twilio.deserialize_iso8601_datetime(payload['conversation_date_updated']),
        'conversation_created_by' => payload['conversation_created_by'],
        'conversation_state' => payload['conversation_state'],
        'conversation_timers' => payload['conversation_timers'],
        'links' => payload['links'],
    }
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:



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

def 
    @properties['account_sid']
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:



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

def chat_service_sid
    @properties['chat_service_sid']
end

#conversation_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.



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

def conversation_attributes
    @properties['conversation_attributes']
end

#conversation_created_byString

Returns Identity of the creator of this Conversation.

Returns:

  • (String)

    Identity of the creator of this Conversation.



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

def conversation_created_by
    @properties['conversation_created_by']
end

#conversation_date_createdTime

Returns The date that this conversation was created, given in ISO 8601 format.

Returns:

  • (Time)

    The date that this conversation was created, given in ISO 8601 format.



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

def conversation_date_created
    @properties['conversation_date_created']
end

#conversation_date_updatedTime

Returns The date that this conversation was last updated, given in ISO 8601 format.

Returns:

  • (Time)

    The date that this conversation was last updated, given in ISO 8601 format.



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

def conversation_date_updated
    @properties['conversation_date_updated']
end

#conversation_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.



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

def conversation_friendly_name
    @properties['conversation_friendly_name']
end

#conversation_sidString

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

Returns:



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

def conversation_sid
    @properties['conversation_sid']
end

#conversation_stateState

Returns:

  • (State)


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

def conversation_state
    @properties['conversation_state']
end

#conversation_timersHash

Returns Timer date values representing state update for this conversation.

Returns:

  • (Hash)

    Timer date values representing state update for this conversation.



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

def conversation_timers
    @properties['conversation_timers']
end

#conversation_unique_nameString

Returns An application-defined string that uniquely identifies the Conversation resource.

Returns:

  • (String)

    An application-defined string that uniquely identifies the Conversation resource.



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

def conversation_unique_name
    @properties['conversation_unique_name']
end

#inspectObject

Provide a detailed, user friendly representation



407
408
409
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 407

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

Returns Contains absolute URLs to access the [participant](www.twilio.com/docs/conversations/api/conversation-participant-resource) and [conversation](www.twilio.com/docs/conversations/api/conversation-resource) of this conversation.

Returns:



395
396
397
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 395

def links
    @properties['links']
end

#participant_identityString

Returns A unique string identifier for the conversation participant as [Conversation User](www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.

Returns:

  • (String)

    A unique string identifier for the conversation participant as [Conversation User](www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.



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

def participant_identity
    @properties['participant_identity']
end

#participant_messaging_bindingHash

Returns Information about how this participant exchanges messages with the conversation. A JSON parameter consisting of type and address fields of the participant.

Returns:

  • (Hash)

    Information about how this participant exchanges messages with the conversation. A JSON parameter consisting of type and address fields of the participant.



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

def participant_messaging_binding
    @properties['participant_messaging_binding']
end

#participant_sidString

Returns:



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

def participant_sid
    @properties['participant_sid']
end

#participant_user_sidString

Returns The unique string that identifies the conversation participant as [Conversation User](www.twilio.com/docs/conversations/api/user-resource).

Returns:



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

def participant_user_sid
    @properties['participant_user_sid']
end

#to_sObject

Provide a user friendly representation



401
402
403
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 401

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