lib/twilio-ruby/rest/conversations/v1/service/conversation.rb in twilio-ruby-6.6.0 vs lib/twilio-ruby/rest/conversations/v1/service/conversation.rb in twilio-ruby-6.7.0

- old
+ new

@@ -34,16 +34,18 @@ ## # Create the ConversationInstance # @param [String] friendly_name The human-readable name of this conversation, limited to 256 characters. Optional. # @param [String] unique_name 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. # @param [String] attributes 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. - # @param [String] messaging_service_sid The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + # @param [String] messaging_service_sid The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. # @param [Time] date_created The date that this resource was created. # @param [Time] date_updated The date that this resource was last updated. # @param [State] state # @param [String] timers_inactive ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. # @param [String] timers_closed ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + # @param [String] bindings_email_address The default email address that will be used when sending outbound emails in this conversation. + # @param [String] bindings_email_name The default name that will be used when sending outbound emails in this conversation. # @param [ServiceConversationEnumWebhookEnabledType] x_twilio_webhook_enabled The X-Twilio-Webhook-Enabled HTTP request header # @return [ConversationInstance] Created ConversationInstance def create( friendly_name: :unset, unique_name: :unset, @@ -52,10 +54,12 @@ date_created: :unset, date_updated: :unset, state: :unset, timers_inactive: :unset, timers_closed: :unset, + bindings_email_address: :unset, + bindings_email_name: :unset, x_twilio_webhook_enabled: :unset ) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, @@ -65,10 +69,12 @@ 'DateCreated' => Twilio.serialize_iso8601_datetime(date_created), 'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated), 'State' => state, 'Timers.Inactive' => timers_inactive, 'Timers.Closed' => timers_closed, + 'Bindings.Email.Address' => bindings_email_address, + 'Bindings.Email.Name' => bindings_email_name, }) headers = Twilio::Values.of({ 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, }) payload = @version.create('POST', @uri, data: data, headers: headers) ConversationInstance.new( @@ -239,15 +245,17 @@ # Update the ConversationInstance # @param [String] friendly_name The human-readable name of this conversation, limited to 256 characters. Optional. # @param [Time] date_created The date that this resource was created. # @param [Time] date_updated The date that this resource was last updated. # @param [String] attributes 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. - # @param [String] messaging_service_sid The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + # @param [String] messaging_service_sid The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. # @param [State] state # @param [String] timers_inactive ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. # @param [String] timers_closed ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. # @param [String] unique_name 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. + # @param [String] bindings_email_address The default email address that will be used when sending outbound emails in this conversation. + # @param [String] bindings_email_name The default name that will be used when sending outbound emails in this conversation. # @param [ServiceConversationEnumWebhookEnabledType] x_twilio_webhook_enabled The X-Twilio-Webhook-Enabled HTTP request header # @return [ConversationInstance] Updated ConversationInstance def update( friendly_name: :unset, date_created: :unset, @@ -256,10 +264,12 @@ messaging_service_sid: :unset, state: :unset, timers_inactive: :unset, timers_closed: :unset, unique_name: :unset, + bindings_email_address: :unset, + bindings_email_name: :unset, x_twilio_webhook_enabled: :unset ) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, @@ -269,10 +279,12 @@ 'MessagingServiceSid' => messaging_service_sid, 'State' => state, 'Timers.Inactive' => timers_inactive, 'Timers.Closed' => timers_closed, 'UniqueName' => unique_name, + 'Bindings.Email.Address' => bindings_email_address, + 'Bindings.Email.Name' => bindings_email_name, }) headers = Twilio::Values.of({ 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, }) payload = @version.update('POST', @uri, data: data, headers: headers) ConversationInstance.new( @@ -295,11 +307,11 @@ return ParticipantContext.new(@version, @solution[:chat_service_sid], @solution[:sid],sid ) end unless @participants @participants = ParticipantList.new( - @version, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:sid], ) + @version, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:sid], ) end @participants end ## @@ -314,11 +326,11 @@ return MessageContext.new(@version, @solution[:chat_service_sid], @solution[:sid],sid ) end unless @messages @messages = MessageList.new( - @version, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:sid], ) + @version, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:sid], ) end @messages end ## @@ -333,11 +345,11 @@ return WebhookContext.new(@version, @solution[:chat_service_sid], @solution[:sid],sid ) end unless @webhooks @webhooks = WebhookList.new( - @version, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:sid], ) + @version, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:sid], ) end @webhooks end @@ -442,11 +454,11 @@ def chat_service_sid @properties['chat_service_sid'] end ## - # @return [String] The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + # @return [String] The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. def messaging_service_sid @properties['messaging_service_sid'] end ## @@ -540,15 +552,17 @@ # Update the ConversationInstance # @param [String] friendly_name The human-readable name of this conversation, limited to 256 characters. Optional. # @param [Time] date_created The date that this resource was created. # @param [Time] date_updated The date that this resource was last updated. # @param [String] attributes 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. - # @param [String] messaging_service_sid The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + # @param [String] messaging_service_sid The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. # @param [State] state # @param [String] timers_inactive ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. # @param [String] timers_closed ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. # @param [String] unique_name 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. + # @param [String] bindings_email_address The default email address that will be used when sending outbound emails in this conversation. + # @param [String] bindings_email_name The default name that will be used when sending outbound emails in this conversation. # @param [ServiceConversationEnumWebhookEnabledType] x_twilio_webhook_enabled The X-Twilio-Webhook-Enabled HTTP request header # @return [ConversationInstance] Updated ConversationInstance def update( friendly_name: :unset, date_created: :unset, @@ -557,10 +571,12 @@ messaging_service_sid: :unset, state: :unset, timers_inactive: :unset, timers_closed: :unset, unique_name: :unset, + bindings_email_address: :unset, + bindings_email_name: :unset, x_twilio_webhook_enabled: :unset ) context.update( friendly_name: friendly_name, @@ -570,9 +586,11 @@ messaging_service_sid: messaging_service_sid, state: state, timers_inactive: timers_inactive, timers_closed: timers_closed, unique_name: unique_name, + bindings_email_address: bindings_email_address, + bindings_email_name: bindings_email_name, x_twilio_webhook_enabled: x_twilio_webhook_enabled, ) end ##