Class: Twilio::REST::Conversations::V2::ParticipantList::CreateParticipantInConversationRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/conversations/v2/participant.rb,
lib/twilio-ruby/rest/conversations/v2/participant.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ CreateParticipantInConversationRequest

Returns a new instance of CreateParticipantInConversationRequest.



47
48
49
50
51
52
# File 'lib/twilio-ruby/rest/conversations/v2/participant.rb', line 47

def initialize(payload)
        @name = payload["name"]
        @type = payload["type"]
        @profile_id = payload["profile_id"]
        @addresses = payload["addresses"]
end

Instance Attribute Details

#addressesObject

Parameters:

  • : (name)

    [String]

  • : (type)

    [String] Type of Participant in the Conversation.

  • : (profile_id)

    [String]

  • : (addresses)

    [Array<ParticipantList.CreateConversationWithConfigRequestParticipantsAddresses>]



46
47
48
# File 'lib/twilio-ruby/rest/conversations/v2/participant.rb', line 46

def addresses
  @addresses
end

#nameObject

Parameters:

  • : (name)

    [String]

  • : (type)

    [String] Type of Participant in the Conversation.

  • : (profile_id)

    [String]

  • : (addresses)

    [Array<ParticipantList.CreateConversationWithConfigRequestParticipantsAddresses>]



46
47
48
# File 'lib/twilio-ruby/rest/conversations/v2/participant.rb', line 46

def name
  @name
end

#profile_idObject

Parameters:

  • : (name)

    [String]

  • : (type)

    [String] Type of Participant in the Conversation.

  • : (profile_id)

    [String]

  • : (addresses)

    [Array<ParticipantList.CreateConversationWithConfigRequestParticipantsAddresses>]



46
47
48
# File 'lib/twilio-ruby/rest/conversations/v2/participant.rb', line 46

def profile_id
  @profile_id
end

#typeObject

Parameters:

  • : (name)

    [String]

  • : (type)

    [String] Type of Participant in the Conversation.

  • : (profile_id)

    [String]

  • : (addresses)

    [Array<ParticipantList.CreateConversationWithConfigRequestParticipantsAddresses>]



46
47
48
# File 'lib/twilio-ruby/rest/conversations/v2/participant.rb', line 46

def type
  @type
end

Instance Method Details

#to_json(options = {}) ⇒ Object



53
54
55
56
57
58
59
60
# File 'lib/twilio-ruby/rest/conversations/v2/participant.rb', line 53

def to_json(options = {})
{
        "name": @name,
        "type": @type,
        "profileId": @profile_id,
        "addresses": @addresses,
}.to_json(options)
end