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

  • chat_service_sid (String) (defaults to: nil)

    The unique ID of the Conversation Service this conversation belongs to.


188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 188

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 responsible for this conversation.

Returns:

  • (String)

    The unique ID of the Account responsible for this conversation.


214
215
216
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 214

def 
  @properties['account_sid']
end

#chat_service_sidString

Returns The unique ID of the Conversation Service this conversation belongs to.

Returns:

  • (String)

    The unique ID of the Conversation Service this conversation belongs to.


220
221
222
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 220

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.

Returns:

  • (String)

    An optional string metadata field you can use to store any data you wish.


268
269
270
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 268

def conversation_attributes
  @properties['conversation_attributes']
end

#conversation_created_byString

Returns Creator of this conversation.

Returns:

  • (String)

    Creator of this conversation.


286
287
288
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 286

def conversation_created_by
  @properties['conversation_created_by']
end

#conversation_date_createdTime

Returns The date that this conversation was created.

Returns:

  • (Time)

    The date that this conversation was created.


274
275
276
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 274

def conversation_date_created
  @properties['conversation_date_created']
end

#conversation_date_updatedTime

Returns The date that this conversation was last updated.

Returns:

  • (Time)

    The date that this conversation was last updated.


280
281
282
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 280

def conversation_date_updated
  @properties['conversation_date_updated']
end

#conversation_friendly_nameString

Returns The human-readable name of this conversation.

Returns:

  • (String)

    The human-readable name of this conversation.


262
263
264
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 262

def conversation_friendly_name
  @properties['conversation_friendly_name']
end

#conversation_sidString

Returns The unique ID of the Conversation this Participant belongs to.

Returns:

  • (String)

    The unique ID of the Conversation this Participant belongs to.


250
251
252
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 250

def conversation_sid
  @properties['conversation_sid']
end

#conversation_stateparticipant_conversation.State

Returns The current state of this User Conversation.

Returns:

  • (participant_conversation.State)

    The current state of this User Conversation


292
293
294
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 292

def conversation_state
  @properties['conversation_state']
end

#conversation_timersHash

Returns Timer date values for this conversation.

Returns:

  • (Hash)

    Timer date values for this conversation.


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

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.


256
257
258
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 256

def conversation_unique_name
  @properties['conversation_unique_name']
end

#inspectObject

Provide a detailed, user friendly representation


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

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

Returns Absolute URLs to access the participant and conversation of this Participant Conversation.

Returns:

  • (String)

    Absolute URLs to access the participant and conversation of this Participant Conversation.


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

def links
  @properties['links']
end

#participant_identityString

Returns A unique string identifier for the conversation participant as Conversation User.

Returns:

  • (String)

    A unique string identifier for the conversation participant as Conversation User.


238
239
240
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 238

def participant_identity
  @properties['participant_identity']
end

#participant_messaging_bindingHash

Returns Information about how this participant exchanges messages with the conversation.

Returns:

  • (Hash)

    Information about how this participant exchanges messages with the conversation.


244
245
246
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 244

def participant_messaging_binding
  @properties['participant_messaging_binding']
end

#participant_sidString

Returns The unique ID of the Participant.

Returns:

  • (String)

    The unique ID of the Participant.


226
227
228
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 226

def participant_sid
  @properties['participant_sid']
end

#participant_user_sidString

Returns The unique ID for the conversation participant as Conversation User.

Returns:

  • (String)

    The unique ID for the conversation participant as Conversation User.


232
233
234
# File 'lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb', line 232

def participant_user_sid
  @properties['participant_user_sid']
end

#to_sObject

Provide a user friendly representation


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

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