Class: Twilio::REST::Conversations::V2::ConversationList::CreateConversationWithConfigRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ CreateConversationWithConfigRequest

Returns a new instance of CreateConversationWithConfigRequest.



82
83
84
85
86
87
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 82

def initialize(payload)
        @configuration_id = payload["configuration_id"]
        @name = payload["name"]
        @configuration = payload["configuration"]
        @participants = payload["participants"]
end

Instance Attribute Details

#configurationObject

Parameters:

  • : (configuration_id)
    String

    The ID of an existing configuration.

  • : (name)
    String

    The name of the conversation.

  • : (configuration)
    ConversationList.CreateConversationWithConfigRequestConfiguration
  • : (participants)
    Array<ConversationList.CreateConversationWithConfigRequestParticipants>

    Optional list of Participants to create with the Conversation.



81
82
83
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 81

def configuration
  @configuration
end

#configuration_idObject

Parameters:

  • : (configuration_id)
    String

    The ID of an existing configuration.

  • : (name)
    String

    The name of the conversation.

  • : (configuration)
    ConversationList.CreateConversationWithConfigRequestConfiguration
  • : (participants)
    Array<ConversationList.CreateConversationWithConfigRequestParticipants>

    Optional list of Participants to create with the Conversation.



81
82
83
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 81

def configuration_id
  @configuration_id
end

#nameObject

Parameters:

  • : (configuration_id)
    String

    The ID of an existing configuration.

  • : (name)
    String

    The name of the conversation.

  • : (configuration)
    ConversationList.CreateConversationWithConfigRequestConfiguration
  • : (participants)
    Array<ConversationList.CreateConversationWithConfigRequestParticipants>

    Optional list of Participants to create with the Conversation.



81
82
83
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 81

def name
  @name
end

#participantsObject

Parameters:

  • : (configuration_id)
    String

    The ID of an existing configuration.

  • : (name)
    String

    The name of the conversation.

  • : (configuration)
    ConversationList.CreateConversationWithConfigRequestConfiguration
  • : (participants)
    Array<ConversationList.CreateConversationWithConfigRequestParticipants>

    Optional list of Participants to create with the Conversation.



81
82
83
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 81

def participants
  @participants
end

Instance Method Details

#to_json(options = {}) ⇒ Object



88
89
90
91
92
93
94
95
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 88

def to_json(options = {})
{
        "configurationId": @configuration_id,
        "name": @name,
        "configuration": @configuration,
        "participants": @participants,
}.to_json(options)
end