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

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ 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.



209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 209

def initialize(version, payload )
    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_sid ⇒ String

Returns The unique ID of the Account responsible for this conversation.

Returns:

  • (String) —

    The unique ID of the Account responsible for this conversation.



235
236
237
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 235

def 
    @properties['account_sid']
end

#attributes ⇒ String

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.



271
272
273
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 271

def attributes
    @properties['attributes']
end

#bindings ⇒ Hash

Returns:

  • (Hash)


307
308
309
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 307

def bindings
    @properties['bindings']
end

#chat_service_sid ⇒ String

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

Returns:



241
242
243
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 241

def chat_service_sid
    @properties['chat_service_sid']
end

#date_created ⇒ Time

Returns The date that this resource was created.

Returns:

  • (Time) —

    The date that this resource was created.



283
284
285
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 283

def date_created
    @properties['date_created']
end

#date_updated ⇒ Time

Returns The date that this resource was last updated.

Returns:

  • (Time) —

    The date that this resource was last updated.



289
290
291
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 289

def date_updated
    @properties['date_updated']
end

#friendly_name ⇒ String

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.



259
260
261
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 259

def friendly_name
    @properties['friendly_name']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



325
326
327
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 325

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

Returns Contains absolute URLs to access the participants, messages and webhooks of this conversation.

Returns:



301
302
303
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 301

def links
    @properties['links']
end

#messaging_service_sid ⇒ String

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

Returns:



247
248
249
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 247

def messaging_service_sid
    @properties['messaging_service_sid']
end

#sid ⇒ String

Returns A 34 character string that uniquely identifies this resource.

Returns:

  • (String) —

    A 34 character string that uniquely identifies this resource.



253
254
255
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 253

def sid
    @properties['sid']
end

#state ⇒ State

Returns:

  • (State)


277
278
279
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 277

def state
    @properties['state']
end

#timers ⇒ Hash

Returns Timer date values representing state update for this conversation.

Returns:

  • (Hash) —

    Timer date values representing state update for this conversation.



295
296
297
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 295

def timers
    @properties['timers']
end

#to_s ⇒ Object

Provide a user friendly representation



319
320
321
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 319

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

#unique_name ⇒ String

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.



265
266
267
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 265

def unique_name
    @properties['unique_name']
end

#url ⇒ String

Returns An absolute API resource URL for this conversation.

Returns:

  • (String) —

    An absolute API resource URL for this conversation.



313
314
315
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 313

def url
    @properties['url']
end