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.



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 140

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_sidString

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

Returns:



165
166
167
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 165

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.



201
202
203
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 201

def attributes
    @properties['attributes']
end

#bindingsHash

Returns:

  • (Hash)


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

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:



171
172
173
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 171

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.



213
214
215
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 213

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.



219
220
221
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 219

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.



189
190
191
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 189

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



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

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


231
232
233
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 231

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:



177
178
179
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 177

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.



183
184
185
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 183

def sid
    @properties['sid']
end

#stateState

Returns:

  • (State)


207
208
209
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 207

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.



225
226
227
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 225

def timers
    @properties['timers']
end

#to_sObject

Provide a user friendly representation



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

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.



195
196
197
# File 'lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb', line 195

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.



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

def url
    @properties['url']
end