Class: Twilio::REST::Conversations::V1::ServiceContext::ConversationWithParticipantsList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Conversations::V1::ServiceContext::ConversationWithParticipantsList
- Defined in:
- lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb
Instance Method Summary collapse
-
#create(friendly_name: :unset, unique_name: :unset, date_created: :unset, date_updated: :unset, messaging_service_sid: :unset, attributes: :unset, state: :unset, timers_inactive: :unset, timers_closed: :unset, bindings_email_address: :unset, bindings_email_name: :unset, participant: :unset, x_twilio_webhook_enabled: :unset) ⇒ ConversationWithParticipantsInstance
Create the ConversationWithParticipantsInstance.
-
#initialize(version, chat_service_sid: nil) ⇒ ConversationWithParticipantsList
constructor
Initialize the ConversationWithParticipantsList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, chat_service_sid: nil) ⇒ ConversationWithParticipantsList
Initialize the ConversationWithParticipantsList
28 29 30 31 32 33 34 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 28 def initialize(version, chat_service_sid: nil) super(version) # Path Solution @solution = { chat_service_sid: chat_service_sid } @uri = "/Services/#{@solution[:chat_service_sid]}/ConversationWithParticipants" end |
Instance Method Details
#create(friendly_name: :unset, unique_name: :unset, date_created: :unset, date_updated: :unset, messaging_service_sid: :unset, attributes: :unset, state: :unset, timers_inactive: :unset, timers_closed: :unset, bindings_email_address: :unset, bindings_email_name: :unset, participant: :unset, x_twilio_webhook_enabled: :unset) ⇒ ConversationWithParticipantsInstance
Create the ConversationWithParticipantsInstance
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 51 def create( friendly_name: :unset, unique_name: :unset, date_created: :unset, date_updated: :unset, messaging_service_sid: :unset, attributes: :unset, state: :unset, timers_inactive: :unset, timers_closed: :unset, bindings_email_address: :unset, bindings_email_name: :unset, participant: :unset, x_twilio_webhook_enabled: :unset ) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'UniqueName' => unique_name, 'DateCreated' => Twilio.serialize_iso8601_datetime(date_created), 'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated), 'MessagingServiceSid' => messaging_service_sid, 'Attributes' => attributes, 'State' => state, 'Timers.Inactive' => timers_inactive, 'Timers.Closed' => timers_closed, 'Bindings.Email.Address' => bindings_email_address, 'Bindings.Email.Name' => bindings_email_name, 'Participant' => Twilio.serialize_list(participant) { |e| e }, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, }) payload = @version.create('POST', @uri, data: data, headers: headers) ConversationWithParticipantsInstance.new( @version, payload, chat_service_sid: @solution[:chat_service_sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
100 101 102 |
# File 'lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb', line 100 def to_s '#<Twilio.Conversations.V1.ConversationWithParticipantsList>' end |