twilio-api-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +213 -0
- data/bin/console +15 -0
- data/lib/twilio_ap_is/api_helper.rb +10 -0
- data/lib/twilio_ap_is/apis/accounts_v1_auth_token_promotion_api.rb +27 -0
- data/lib/twilio_ap_is/apis/accounts_v1_aws_api.rb +137 -0
- data/lib/twilio_ap_is/apis/accounts_v1_bulk_consents_api.rb +41 -0
- data/lib/twilio_ap_is/apis/accounts_v1_bulk_contacts_api.rb +36 -0
- data/lib/twilio_ap_is/apis/accounts_v1_messaging_geopermissions_api.rb +54 -0
- data/lib/twilio_ap_is/apis/accounts_v1_public_key_api.rb +136 -0
- data/lib/twilio_ap_is/apis/accounts_v1_safelist_api.rb +69 -0
- data/lib/twilio_ap_is/apis/accounts_v1_secondary_auth_token_api.rb +39 -0
- data/lib/twilio_ap_is/apis/base_api.rb +67 -0
- data/lib/twilio_ap_is/apis/chat_v3_channel_api.rb +51 -0
- data/lib/twilio_ap_is/apis/conversations_v1_address_configuration_api.rb +218 -0
- data/lib/twilio_ap_is/apis/conversations_v1_binding_api.rb +116 -0
- data/lib/twilio_ap_is/apis/conversations_v1_configuration_api.rb +133 -0
- data/lib/twilio_ap_is/apis/conversations_v1_conversation_api.rb +550 -0
- data/lib/twilio_ap_is/apis/conversations_v1_conversation_with_participants_api.rb +182 -0
- data/lib/twilio_ap_is/apis/conversations_v1_credential_api.rb +189 -0
- data/lib/twilio_ap_is/apis/conversations_v1_delivery_receipt_api.rb +183 -0
- data/lib/twilio_ap_is/apis/conversations_v1_message_api.rb +497 -0
- data/lib/twilio_ap_is/apis/conversations_v1_notification_api.rb +124 -0
- data/lib/twilio_ap_is/apis/conversations_v1_participant_api.rb +546 -0
- data/lib/twilio_ap_is/apis/conversations_v1_participant_conversation_api.rb +99 -0
- data/lib/twilio_ap_is/apis/conversations_v1_role_api.rb +325 -0
- data/lib/twilio_ap_is/apis/conversations_v1_service_api.rb +98 -0
- data/lib/twilio_ap_is/apis/conversations_v1_user_api.rb +364 -0
- data/lib/twilio_ap_is/apis/conversations_v1_user_conversation_api.rb +335 -0
- data/lib/twilio_ap_is/apis/conversations_v1_webhook_api.rb +561 -0
- data/lib/twilio_ap_is/apis/notify_v1_binding_api.rb +186 -0
- data/lib/twilio_ap_is/apis/notify_v1_credential_api.rb +183 -0
- data/lib/twilio_ap_is/apis/notify_v1_notification_api.rb +174 -0
- data/lib/twilio_ap_is/apis/notify_v1_service_api.rb +262 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_activity_api.rb +177 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_event_api.rb +125 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_api.rb +310 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_channel_api.rb +173 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_api.rb +232 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_bulk_real_time_statistics_api.rb +36 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_cumulative_statistics_api.rb +63 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_real_time_statistics_api.rb +41 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_statistics_api.rb +63 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queues_statistics_api.rb +72 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_reservation_api.rb +396 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_api.rb +232 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_channel_api.rb +126 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_reservation_api.rb +385 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_statistics_api.rb +57 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workers_cumulative_statistics_api.rb +51 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workers_real_time_statistics_api.rb +35 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workers_statistics_api.rb +63 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_api.rb +213 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_cumulative_statistics_api.rb +68 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_real_time_statistics_api.rb +41 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_statistics_api.rb +67 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_api.rb +225 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_cumulative_statistics_api.rb +62 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_real_time_statistics_api.rb +35 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_statistics_api.rb +61 -0
- data/lib/twilio_ap_is/apis/verify_v2_service_api.rb +178 -0
- data/lib/twilio_ap_is/apis/verify_v2_verification_api.rb +143 -0
- data/lib/twilio_ap_is/apis/verify_v2_verification_check_api.rb +61 -0
- data/lib/twilio_ap_is/client.rb +417 -0
- data/lib/twilio_ap_is/configuration.rb +187 -0
- data/lib/twilio_ap_is/exceptions/api_exception.rb +21 -0
- data/lib/twilio_ap_is/exceptions/v2_services_verifications429_error_exception.rb +63 -0
- data/lib/twilio_ap_is/http/api_response.rb +19 -0
- data/lib/twilio_ap_is/http/auth/basic_auth.rb +62 -0
- data/lib/twilio_ap_is/http/http_call_back.rb +10 -0
- data/lib/twilio_ap_is/http/http_method_enum.rb +10 -0
- data/lib/twilio_ap_is/http/http_request.rb +10 -0
- data/lib/twilio_ap_is/http/http_response.rb +10 -0
- data/lib/twilio_ap_is/http/proxy_settings.rb +22 -0
- data/lib/twilio_ap_is/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/twilio_ap_is/logging/sdk_logger.rb +17 -0
- data/lib/twilio_ap_is/models/access_token.rb +188 -0
- data/lib/twilio_ap_is/models/access_token_enum_factor_types.rb +26 -0
- data/lib/twilio_ap_is/models/activity.rb +189 -0
- data/lib/twilio_ap_is/models/auth_token_promotion.rb +142 -0
- data/lib/twilio_ap_is/models/base_model.rb +110 -0
- data/lib/twilio_ap_is/models/binding.rb +269 -0
- data/lib/twilio_ap_is/models/binding_binding_type.rb +53 -0
- data/lib/twilio_ap_is/models/bucket.rb +186 -0
- data/lib/twilio_ap_is/models/bulk_consents.rb +83 -0
- data/lib/twilio_ap_is/models/bulk_contacts.rb +83 -0
- data/lib/twilio_ap_is/models/challenge.rb +317 -0
- data/lib/twilio_ap_is/models/challenge_enum_challenge_reasons.rb +41 -0
- data/lib/twilio_ap_is/models/challenge_enum_challenge_statuses.rb +45 -0
- data/lib/twilio_ap_is/models/challenge_enum_factor_types.rb +41 -0
- data/lib/twilio_ap_is/models/channel.rb +249 -0
- data/lib/twilio_ap_is/models/channel_channel_type.rb +36 -0
- data/lib/twilio_ap_is/models/channel_webhook_enabled_type.rb +36 -0
- data/lib/twilio_ap_is/models/configuration.rb +164 -0
- data/lib/twilio_ap_is/models/configuration_address.rb +199 -0
- data/lib/twilio_ap_is/models/configuration_address_auto_creation_type.rb +40 -0
- data/lib/twilio_ap_is/models/configuration_address_method.rb +36 -0
- data/lib/twilio_ap_is/models/configuration_address_type.rb +60 -0
- data/lib/twilio_ap_is/models/configuration_webhook.rb +154 -0
- data/lib/twilio_ap_is/models/configuration_webhook_method.rb +46 -0
- data/lib/twilio_ap_is/models/configuration_webhook_target.rb +37 -0
- data/lib/twilio_ap_is/models/conversation.rb +264 -0
- data/lib/twilio_ap_is/models/conversation_message.rb +268 -0
- data/lib/twilio_ap_is/models/conversation_message_order_type.rb +36 -0
- data/lib/twilio_ap_is/models/conversation_message_receipt.rb +219 -0
- data/lib/twilio_ap_is/models/conversation_message_receipt_delivery_status.rb +49 -0
- data/lib/twilio_ap_is/models/conversation_participant.rb +240 -0
- data/lib/twilio_ap_is/models/conversation_scoped_webhook.rb +178 -0
- data/lib/twilio_ap_is/models/conversation_scoped_webhook_method.rb +36 -0
- data/lib/twilio_ap_is/models/conversation_scoped_webhook_target.rb +40 -0
- data/lib/twilio_ap_is/models/conversation_state.rb +45 -0
- data/lib/twilio_ap_is/models/conversation_webhook_method.rb +36 -0
- data/lib/twilio_ap_is/models/conversation_webhook_target.rb +37 -0
- data/lib/twilio_ap_is/models/conversation_with_participants.rb +264 -0
- data/lib/twilio_ap_is/models/conversation_with_participants_state.rb +45 -0
- data/lib/twilio_ap_is/models/credential.rb +175 -0
- data/lib/twilio_ap_is/models/credential1.rb +174 -0
- data/lib/twilio_ap_is/models/credential_aws.rb +153 -0
- data/lib/twilio_ap_is/models/credential_public_key.rb +153 -0
- data/lib/twilio_ap_is/models/credential_push_type.rb +41 -0
- data/lib/twilio_ap_is/models/entity.rb +177 -0
- data/lib/twilio_ap_is/models/event.rb +270 -0
- data/lib/twilio_ap_is/models/factor.rb +235 -0
- data/lib/twilio_ap_is/models/factor_enum_factor_statuses.rb +36 -0
- data/lib/twilio_ap_is/models/factor_enum_factor_type.rb +40 -0
- data/lib/twilio_ap_is/models/factor_enum_notification_platforms.rb +40 -0
- data/lib/twilio_ap_is/models/factor_enum_totp_algorithms.rb +40 -0
- data/lib/twilio_ap_is/models/form_enum_form_types.rb +26 -0
- data/lib/twilio_ap_is/models/list_activity_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_binding_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_configuration_address_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_conversation_message_receipt_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_conversation_message_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_conversation_participant_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_conversation_scoped_webhook_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_credential_aws_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_credential_public_key_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_credential_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_event_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_participant_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_role_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_binding_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_message_receipt_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_service_conversation_message_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_participant_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_scoped_webhook_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_participant_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_role_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_user_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_user_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_channel_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_queue_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_queues_statistics_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_task_reservation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_user_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_user_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_worker_channel_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_worker_reservation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_worker_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_workflow_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_workspace_response.rb +94 -0
- data/lib/twilio_ap_is/models/messaging_configuration.rb +170 -0
- data/lib/twilio_ap_is/models/meta.rb +140 -0
- data/lib/twilio_ap_is/models/msg_geopermissions.rb +86 -0
- data/lib/twilio_ap_is/models/new_factor.rb +277 -0
- data/lib/twilio_ap_is/models/new_factor_enum_factor_statuses.rb +36 -0
- data/lib/twilio_ap_is/models/new_factor_enum_factor_types.rb +40 -0
- data/lib/twilio_ap_is/models/new_factor_enum_notification_platforms.rb +40 -0
- data/lib/twilio_ap_is/models/new_factor_enum_totp_algorithms.rb +40 -0
- data/lib/twilio_ap_is/models/notif_priority.rb +43 -0
- data/lib/twilio_ap_is/models/notification.rb +363 -0
- data/lib/twilio_ap_is/models/notification1.rb +181 -0
- data/lib/twilio_ap_is/models/participant_conversation.rb +325 -0
- data/lib/twilio_ap_is/models/participant_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/rate_limit.rb +189 -0
- data/lib/twilio_ap_is/models/role.rb +192 -0
- data/lib/twilio_ap_is/models/role_role_type.rb +40 -0
- data/lib/twilio_ap_is/models/safelist.rb +88 -0
- data/lib/twilio_ap_is/models/safelist1.rb +99 -0
- data/lib/twilio_ap_is/models/secondary_auth_token.rb +145 -0
- data/lib/twilio_ap_is/models/service.rb +164 -0
- data/lib/twilio_ap_is/models/service1.rb +380 -0
- data/lib/twilio_ap_is/models/service2.rb +350 -0
- data/lib/twilio_ap_is/models/service_binding.rb +226 -0
- data/lib/twilio_ap_is/models/service_binding_binding_type.rb +47 -0
- data/lib/twilio_ap_is/models/service_configuration.rb +180 -0
- data/lib/twilio_ap_is/models/service_conversation.rb +264 -0
- data/lib/twilio_ap_is/models/service_conversation_message.rb +282 -0
- data/lib/twilio_ap_is/models/service_conversation_message_order_type.rb +36 -0
- data/lib/twilio_ap_is/models/service_conversation_message_receipt.rb +233 -0
- data/lib/twilio_ap_is/models/service_conversation_message_receipt_delivery_status.rb +49 -0
- data/lib/twilio_ap_is/models/service_conversation_participant.rb +256 -0
- data/lib/twilio_ap_is/models/service_conversation_scoped_webhook.rb +191 -0
- data/lib/twilio_ap_is/models/service_conversation_scoped_webhook_method.rb +36 -0
- data/lib/twilio_ap_is/models/service_conversation_scoped_webhook_target.rb +40 -0
- data/lib/twilio_ap_is/models/service_conversation_state.rb +45 -0
- data/lib/twilio_ap_is/models/service_conversation_with_participants.rb +264 -0
- data/lib/twilio_ap_is/models/service_conversation_with_participants_state.rb +45 -0
- data/lib/twilio_ap_is/models/service_notification.rb +155 -0
- data/lib/twilio_ap_is/models/service_participant_conversation.rb +325 -0
- data/lib/twilio_ap_is/models/service_participant_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/service_role.rb +192 -0
- data/lib/twilio_ap_is/models/service_role_role_type.rb +40 -0
- data/lib/twilio_ap_is/models/service_stats_conversations_rate_limiting_errors_source.rb +36 -0
- data/lib/twilio_ap_is/models/service_user.rb +250 -0
- data/lib/twilio_ap_is/models/service_user_conversation.rb +317 -0
- data/lib/twilio_ap_is/models/service_user_conversation_notification_level.rb +37 -0
- data/lib/twilio_ap_is/models/service_user_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/service_webhook_configuration.rb +160 -0
- data/lib/twilio_ap_is/models/service_webhook_configuration_method.rb +37 -0
- data/lib/twilio_ap_is/models/stats_twilsock_rate_limiting_errors_source.rb +26 -0
- data/lib/twilio_ap_is/models/task_channel.rb +204 -0
- data/lib/twilio_ap_is/models/task_queue.rb +278 -0
- data/lib/twilio_ap_is/models/task_queue_bulk_real_time_statistics.rb +141 -0
- data/lib/twilio_ap_is/models/task_queue_cumulative.rb +356 -0
- data/lib/twilio_ap_is/models/task_queue_real_time_statistics.rb +250 -0
- data/lib/twilio_ap_is/models/task_queue_statistics.rb +135 -0
- data/lib/twilio_ap_is/models/task_queue_task_order.rb +40 -0
- data/lib/twilio_ap_is/models/task_queues_stats.rb +124 -0
- data/lib/twilio_ap_is/models/task_reservation.rb +210 -0
- data/lib/twilio_ap_is/models/task_reservation_call_status.rb +44 -0
- data/lib/twilio_ap_is/models/task_reservation_conference_event.rb +56 -0
- data/lib/twilio_ap_is/models/task_reservation_status.rb +61 -0
- data/lib/twilio_ap_is/models/task_reservation_supervisor_mode.rb +40 -0
- data/lib/twilio_ap_is/models/task_router_task.rb +394 -0
- data/lib/twilio_ap_is/models/task_status.rb +53 -0
- data/lib/twilio_ap_is/models/user.rb +250 -0
- data/lib/twilio_ap_is/models/user_binding_binding_type.rb +52 -0
- data/lib/twilio_ap_is/models/user_conversation.rb +317 -0
- data/lib/twilio_ap_is/models/user_conversation_notification_level.rb +37 -0
- data/lib/twilio_ap_is/models/user_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/v2_form.rb +112 -0
- data/lib/twilio_ap_is/models/verification.rb +262 -0
- data/lib/twilio_ap_is/models/verification_attempt.rb +219 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_attempt_status.rb +40 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_call_status.rb +60 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_channels.rb +49 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_conversion_status.rb +38 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_message_status.rb +80 -0
- data/lib/twilio_ap_is/models/verification_attempts.rb +129 -0
- data/lib/twilio_ap_is/models/verification_attempts_summary_enum_channels.rb +48 -0
- data/lib/twilio_ap_is/models/verification_check.rb +231 -0
- data/lib/twilio_ap_is/models/verification_check_enum_channel.rb +50 -0
- data/lib/twilio_ap_is/models/verification_enum_channel.rb +50 -0
- data/lib/twilio_ap_is/models/verification_enum_risk_check.rb +39 -0
- data/lib/twilio_ap_is/models/verification_enum_status.rb +37 -0
- data/lib/twilio_ap_is/models/verification_template.rb +126 -0
- data/lib/twilio_ap_is/models/webhook.rb +222 -0
- data/lib/twilio_ap_is/models/webhook_enum_status.rb +37 -0
- data/lib/twilio_ap_is/models/webhook_enum_version.rb +37 -0
- data/lib/twilio_ap_is/models/worker.rb +247 -0
- data/lib/twilio_ap_is/models/worker_channel.rb +244 -0
- data/lib/twilio_ap_is/models/worker_instance_statistics.rb +122 -0
- data/lib/twilio_ap_is/models/worker_reservation.rb +210 -0
- data/lib/twilio_ap_is/models/worker_reservation_call_status.rb +44 -0
- data/lib/twilio_ap_is/models/worker_reservation_conference_event.rb +56 -0
- data/lib/twilio_ap_is/models/worker_reservation_status.rb +61 -0
- data/lib/twilio_ap_is/models/worker_statistics.rb +122 -0
- data/lib/twilio_ap_is/models/workers_cumulative_statistics.rb +221 -0
- data/lib/twilio_ap_is/models/workers_real_time_statistics.rb +124 -0
- data/lib/twilio_ap_is/models/workflow.rb +247 -0
- data/lib/twilio_ap_is/models/workflow_cumulative_statistics.rb +347 -0
- data/lib/twilio_ap_is/models/workflow_real_time_statistics.rb +173 -0
- data/lib/twilio_ap_is/models/workflow_statistics.rb +135 -0
- data/lib/twilio_ap_is/models/workspace.rb +285 -0
- data/lib/twilio_ap_is/models/workspace_cumulative_statistics.rb +334 -0
- data/lib/twilio_ap_is/models/workspace_queue_order.rb +40 -0
- data/lib/twilio_ap_is/models/workspace_real_time_statistics.rb +185 -0
- data/lib/twilio_ap_is/models/workspace_statistics.rb +122 -0
- data/lib/twilio_ap_is/utilities/date_time_helper.rb +11 -0
- data/lib/twilio_ap_is/utilities/file_wrapper.rb +28 -0
- data/lib/twilio_ap_is.rb +326 -0
- metadata +361 -0
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# ConversationsV1ConversationApi
|
|
8
|
+
class ConversationsV1ConversationApi < BaseApi
|
|
9
|
+
# Create a new conversation in your account's default service
|
|
10
|
+
# @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
|
|
11
|
+
# parameter: The X-Twilio-Webhook-Enabled HTTP request header
|
|
12
|
+
# @param [String] friendly_name Optional parameter: The human-readable name
|
|
13
|
+
# of this conversation, limited to 256 characters. Optional.
|
|
14
|
+
# @param [String] unique_name Optional parameter: An application-defined
|
|
15
|
+
# string that uniquely identifies the resource. It can be used to address
|
|
16
|
+
# the resource in place of the resource's `sid` in the URL.
|
|
17
|
+
# @param [DateTime] date_created Optional parameter: The date that this
|
|
18
|
+
# resource was created.
|
|
19
|
+
# @param [DateTime] date_updated Optional parameter: The date that this
|
|
20
|
+
# resource was last updated.
|
|
21
|
+
# @param [String] messaging_service_sid Optional parameter: The unique ID of
|
|
22
|
+
# the [Messaging
|
|
23
|
+
# Service](https://www.twilio.com/docs/messaging/api/service-resource) this
|
|
24
|
+
# conversation belongs to.
|
|
25
|
+
# @param [String] attributes Optional parameter: An optional string metadata
|
|
26
|
+
# field you can use to store any data you wish. The string value must
|
|
27
|
+
# contain structurally valid JSON if specified. **Note** that if the
|
|
28
|
+
# attributes are not set "{}" will be returned.
|
|
29
|
+
# @param [ConversationState] state Optional parameter: Current state of this
|
|
30
|
+
# conversation. Can be either `initializing`, `active`, `inactive` or
|
|
31
|
+
# `closed` and defaults to `active`
|
|
32
|
+
# @param [String] timers_inactive Optional parameter: ISO8601 duration when
|
|
33
|
+
# conversation will be switched to `inactive` state. Minimum value for this
|
|
34
|
+
# timer is 1 minute.
|
|
35
|
+
# @param [String] timers_closed Optional parameter: ISO8601 duration when
|
|
36
|
+
# conversation will be switched to `closed` state. Minimum value for this
|
|
37
|
+
# timer is 10 minutes.
|
|
38
|
+
# @param [String] bindings_email_address Optional parameter: The default
|
|
39
|
+
# email address that will be used when sending outbound emails in this
|
|
40
|
+
# conversation.
|
|
41
|
+
# @param [String] bindings_email_name Optional parameter: The default name
|
|
42
|
+
# that will be used when sending outbound emails in this conversation.
|
|
43
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
44
|
+
def create_conversation(x_twilio_webhook_enabled: nil,
|
|
45
|
+
friendly_name: nil,
|
|
46
|
+
unique_name: nil,
|
|
47
|
+
date_created: nil,
|
|
48
|
+
date_updated: nil,
|
|
49
|
+
messaging_service_sid: nil,
|
|
50
|
+
attributes: nil,
|
|
51
|
+
state: nil,
|
|
52
|
+
timers_inactive: nil,
|
|
53
|
+
timers_closed: nil,
|
|
54
|
+
bindings_email_address: nil,
|
|
55
|
+
bindings_email_name: nil)
|
|
56
|
+
@api_call
|
|
57
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
58
|
+
'/v1/Conversations',
|
|
59
|
+
Server::DEFAULT2)
|
|
60
|
+
.header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
|
|
61
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
62
|
+
.form_param(new_parameter(unique_name, key: 'UniqueName'))
|
|
63
|
+
.form_param(new_parameter(date_created, key: 'DateCreated'))
|
|
64
|
+
.form_param(new_parameter(date_updated, key: 'DateUpdated'))
|
|
65
|
+
.form_param(new_parameter(messaging_service_sid, key: 'MessagingServiceSid'))
|
|
66
|
+
.form_param(new_parameter(attributes, key: 'Attributes'))
|
|
67
|
+
.form_param(new_parameter(state, key: 'State'))
|
|
68
|
+
.form_param(new_parameter(timers_inactive, key: 'Timers.Inactive'))
|
|
69
|
+
.form_param(new_parameter(timers_closed, key: 'Timers.Closed'))
|
|
70
|
+
.form_param(new_parameter(bindings_email_address, key: 'Bindings.Email.Address'))
|
|
71
|
+
.form_param(new_parameter(bindings_email_name, key: 'Bindings.Email.Name'))
|
|
72
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
73
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
74
|
+
.auth(Single.new('accountSid_authToken')))
|
|
75
|
+
.response(new_response_handler
|
|
76
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
77
|
+
.deserialize_into(Conversation.method(:from_hash))
|
|
78
|
+
.is_api_response(true))
|
|
79
|
+
.execute
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Retrieve a list of conversations in your account's default service
|
|
83
|
+
# @param [String] start_date Optional parameter: Specifies the beginning of
|
|
84
|
+
# the date range for filtering Conversations based on their creation date.
|
|
85
|
+
# Conversations that were created on or after this date will be included in
|
|
86
|
+
# the results. The date must be in ISO8601 format, specifically starting at
|
|
87
|
+
# the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise
|
|
88
|
+
# filtering. This parameter can be combined with other filters. If this
|
|
89
|
+
# filter is used, the returned list is sorted by latest conversation
|
|
90
|
+
# creation date in descending order.
|
|
91
|
+
# @param [String] end_date Optional parameter: Defines the end of the date
|
|
92
|
+
# range for filtering conversations by their creation date. Only
|
|
93
|
+
# conversations that were created on or before this date will appear in the
|
|
94
|
+
# results. The date must be in ISO8601 format, specifically capturing up to
|
|
95
|
+
# the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that
|
|
96
|
+
# conversations from the entire end day are included. This parameter can be
|
|
97
|
+
# combined with other filters. If this filter is used, the returned list is
|
|
98
|
+
# sorted by latest conversation creation date in descending order.
|
|
99
|
+
# @param [ConversationState] state Optional parameter: State for sorting and
|
|
100
|
+
# filtering list of Conversations. Can be `active`, `inactive` or `closed`
|
|
101
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
102
|
+
# return in each list page. The default is 50, and the maximum is 100.
|
|
103
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
104
|
+
# simply for client state.
|
|
105
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
106
|
+
# provided by the API.
|
|
107
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
108
|
+
def list_conversation(start_date: nil,
|
|
109
|
+
end_date: nil,
|
|
110
|
+
state: nil,
|
|
111
|
+
page_size: nil,
|
|
112
|
+
page: nil,
|
|
113
|
+
page_token: nil)
|
|
114
|
+
@api_call
|
|
115
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
116
|
+
'/v1/Conversations',
|
|
117
|
+
Server::DEFAULT2)
|
|
118
|
+
.query_param(new_parameter(start_date, key: 'StartDate'))
|
|
119
|
+
.query_param(new_parameter(end_date, key: 'EndDate'))
|
|
120
|
+
.query_param(new_parameter(state, key: 'State'))
|
|
121
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
122
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
123
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
124
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
125
|
+
.auth(Single.new('accountSid_authToken')))
|
|
126
|
+
.response(new_response_handler
|
|
127
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
128
|
+
.deserialize_into(ListConversationResponse.method(:from_hash))
|
|
129
|
+
.is_api_response(true))
|
|
130
|
+
.execute
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Update an existing conversation in your account's default service
|
|
134
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
135
|
+
# uniquely identifies this resource. Can also be the `unique_name` of the
|
|
136
|
+
# Conversation.
|
|
137
|
+
# @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
|
|
138
|
+
# parameter: The X-Twilio-Webhook-Enabled HTTP request header
|
|
139
|
+
# @param [String] friendly_name Optional parameter: The human-readable name
|
|
140
|
+
# of this conversation, limited to 256 characters. Optional.
|
|
141
|
+
# @param [DateTime] date_created Optional parameter: The date that this
|
|
142
|
+
# resource was created.
|
|
143
|
+
# @param [DateTime] date_updated Optional parameter: The date that this
|
|
144
|
+
# resource was last updated.
|
|
145
|
+
# @param [String] attributes Optional parameter: An optional string metadata
|
|
146
|
+
# field you can use to store any data you wish. The string value must
|
|
147
|
+
# contain structurally valid JSON if specified. **Note** that if the
|
|
148
|
+
# attributes are not set "{}" will be returned.
|
|
149
|
+
# @param [String] messaging_service_sid Optional parameter: The unique ID of
|
|
150
|
+
# the [Messaging
|
|
151
|
+
# Service](https://www.twilio.com/docs/messaging/api/service-resource) this
|
|
152
|
+
# conversation belongs to.
|
|
153
|
+
# @param [ConversationState] state Optional parameter: Current state of this
|
|
154
|
+
# conversation. Can be either `initializing`, `active`, `inactive` or
|
|
155
|
+
# `closed` and defaults to `active`
|
|
156
|
+
# @param [String] timers_inactive Optional parameter: ISO8601 duration when
|
|
157
|
+
# conversation will be switched to `inactive` state. Minimum value for this
|
|
158
|
+
# timer is 1 minute.
|
|
159
|
+
# @param [String] timers_closed Optional parameter: ISO8601 duration when
|
|
160
|
+
# conversation will be switched to `closed` state. Minimum value for this
|
|
161
|
+
# timer is 10 minutes.
|
|
162
|
+
# @param [String] unique_name Optional parameter: An application-defined
|
|
163
|
+
# string that uniquely identifies the resource. It can be used to address
|
|
164
|
+
# the resource in place of the resource's `sid` in the URL.
|
|
165
|
+
# @param [String] bindings_email_address Optional parameter: The default
|
|
166
|
+
# email address that will be used when sending outbound emails in this
|
|
167
|
+
# conversation.
|
|
168
|
+
# @param [String] bindings_email_name Optional parameter: The default name
|
|
169
|
+
# that will be used when sending outbound emails in this conversation.
|
|
170
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
171
|
+
def update_conversation(sid,
|
|
172
|
+
x_twilio_webhook_enabled: nil,
|
|
173
|
+
friendly_name: nil,
|
|
174
|
+
date_created: nil,
|
|
175
|
+
date_updated: nil,
|
|
176
|
+
attributes: nil,
|
|
177
|
+
messaging_service_sid: nil,
|
|
178
|
+
state: nil,
|
|
179
|
+
timers_inactive: nil,
|
|
180
|
+
timers_closed: nil,
|
|
181
|
+
unique_name: nil,
|
|
182
|
+
bindings_email_address: nil,
|
|
183
|
+
bindings_email_name: nil)
|
|
184
|
+
@api_call
|
|
185
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
186
|
+
'/v1/Conversations/{Sid}',
|
|
187
|
+
Server::DEFAULT2)
|
|
188
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
189
|
+
.is_required(true)
|
|
190
|
+
.should_encode(true))
|
|
191
|
+
.header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
|
|
192
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
193
|
+
.form_param(new_parameter(date_created, key: 'DateCreated'))
|
|
194
|
+
.form_param(new_parameter(date_updated, key: 'DateUpdated'))
|
|
195
|
+
.form_param(new_parameter(attributes, key: 'Attributes'))
|
|
196
|
+
.form_param(new_parameter(messaging_service_sid, key: 'MessagingServiceSid'))
|
|
197
|
+
.form_param(new_parameter(state, key: 'State'))
|
|
198
|
+
.form_param(new_parameter(timers_inactive, key: 'Timers.Inactive'))
|
|
199
|
+
.form_param(new_parameter(timers_closed, key: 'Timers.Closed'))
|
|
200
|
+
.form_param(new_parameter(unique_name, key: 'UniqueName'))
|
|
201
|
+
.form_param(new_parameter(bindings_email_address, key: 'Bindings.Email.Address'))
|
|
202
|
+
.form_param(new_parameter(bindings_email_name, key: 'Bindings.Email.Name'))
|
|
203
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
204
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
205
|
+
.auth(Single.new('accountSid_authToken')))
|
|
206
|
+
.response(new_response_handler
|
|
207
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
208
|
+
.deserialize_into(Conversation.method(:from_hash))
|
|
209
|
+
.is_api_response(true))
|
|
210
|
+
.execute
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Remove a conversation from your account's default service
|
|
214
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
215
|
+
# uniquely identifies this resource. Can also be the `unique_name` of the
|
|
216
|
+
# Conversation.
|
|
217
|
+
# @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
|
|
218
|
+
# parameter: The X-Twilio-Webhook-Enabled HTTP request header
|
|
219
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
220
|
+
def delete_conversation(sid,
|
|
221
|
+
x_twilio_webhook_enabled: nil)
|
|
222
|
+
@api_call
|
|
223
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
224
|
+
'/v1/Conversations/{Sid}',
|
|
225
|
+
Server::DEFAULT2)
|
|
226
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
227
|
+
.is_required(true)
|
|
228
|
+
.should_encode(true))
|
|
229
|
+
.header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
|
|
230
|
+
.auth(Single.new('accountSid_authToken')))
|
|
231
|
+
.response(new_response_handler
|
|
232
|
+
.is_response_void(true)
|
|
233
|
+
.is_api_response(true))
|
|
234
|
+
.execute
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Fetch a conversation from your account's default service
|
|
238
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
239
|
+
# uniquely identifies this resource. Can also be the `unique_name` of the
|
|
240
|
+
# Conversation.
|
|
241
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
242
|
+
def fetch_conversation(sid)
|
|
243
|
+
@api_call
|
|
244
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
245
|
+
'/v1/Conversations/{Sid}',
|
|
246
|
+
Server::DEFAULT2)
|
|
247
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
248
|
+
.is_required(true)
|
|
249
|
+
.should_encode(true))
|
|
250
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
251
|
+
.auth(Single.new('accountSid_authToken')))
|
|
252
|
+
.response(new_response_handler
|
|
253
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
254
|
+
.deserialize_into(Conversation.method(:from_hash))
|
|
255
|
+
.is_api_response(true))
|
|
256
|
+
.execute
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Create a new conversation in your service
|
|
260
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
261
|
+
# [Conversation
|
|
262
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
263
|
+
# the Conversation resource is associated with.
|
|
264
|
+
# @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
|
|
265
|
+
# parameter: The X-Twilio-Webhook-Enabled HTTP request header
|
|
266
|
+
# @param [String] friendly_name Optional parameter: The human-readable name
|
|
267
|
+
# of this conversation, limited to 256 characters. Optional.
|
|
268
|
+
# @param [String] unique_name Optional parameter: An application-defined
|
|
269
|
+
# string that uniquely identifies the resource. It can be used to address
|
|
270
|
+
# the resource in place of the resource's `sid` in the URL.
|
|
271
|
+
# @param [String] attributes Optional parameter: An optional string metadata
|
|
272
|
+
# field you can use to store any data you wish. The string value must
|
|
273
|
+
# contain structurally valid JSON if specified. **Note** that if the
|
|
274
|
+
# attributes are not set "{}" will be returned.
|
|
275
|
+
# @param [String] messaging_service_sid Optional parameter: The unique ID of
|
|
276
|
+
# the [Messaging
|
|
277
|
+
# Service](https://www.twilio.com/docs/messaging/api/service-resource) this
|
|
278
|
+
# conversation belongs to.
|
|
279
|
+
# @param [DateTime] date_created Optional parameter: The date that this
|
|
280
|
+
# resource was created.
|
|
281
|
+
# @param [DateTime] date_updated Optional parameter: The date that this
|
|
282
|
+
# resource was last updated.
|
|
283
|
+
# @param [ServiceConversationState] state Optional parameter: Current state
|
|
284
|
+
# of this conversation. Can be either `initializing`, `active`, `inactive`
|
|
285
|
+
# or `closed` and defaults to `active`
|
|
286
|
+
# @param [String] timers_inactive Optional parameter: ISO8601 duration when
|
|
287
|
+
# conversation will be switched to `inactive` state. Minimum value for this
|
|
288
|
+
# timer is 1 minute.
|
|
289
|
+
# @param [String] timers_closed Optional parameter: ISO8601 duration when
|
|
290
|
+
# conversation will be switched to `closed` state. Minimum value for this
|
|
291
|
+
# timer is 10 minutes.
|
|
292
|
+
# @param [String] bindings_email_address Optional parameter: The default
|
|
293
|
+
# email address that will be used when sending outbound emails in this
|
|
294
|
+
# conversation.
|
|
295
|
+
# @param [String] bindings_email_name Optional parameter: The default name
|
|
296
|
+
# that will be used when sending outbound emails in this conversation.
|
|
297
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
298
|
+
def create_service_conversation(chat_service_sid,
|
|
299
|
+
x_twilio_webhook_enabled: nil,
|
|
300
|
+
friendly_name: nil,
|
|
301
|
+
unique_name: nil,
|
|
302
|
+
attributes: nil,
|
|
303
|
+
messaging_service_sid: nil,
|
|
304
|
+
date_created: nil,
|
|
305
|
+
date_updated: nil,
|
|
306
|
+
state: nil,
|
|
307
|
+
timers_inactive: nil,
|
|
308
|
+
timers_closed: nil,
|
|
309
|
+
bindings_email_address: nil,
|
|
310
|
+
bindings_email_name: nil)
|
|
311
|
+
@api_call
|
|
312
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
313
|
+
'/v1/Services/{ChatServiceSid}/Conversations',
|
|
314
|
+
Server::DEFAULT2)
|
|
315
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
316
|
+
.is_required(true)
|
|
317
|
+
.should_encode(true))
|
|
318
|
+
.header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
|
|
319
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
320
|
+
.form_param(new_parameter(unique_name, key: 'UniqueName'))
|
|
321
|
+
.form_param(new_parameter(attributes, key: 'Attributes'))
|
|
322
|
+
.form_param(new_parameter(messaging_service_sid, key: 'MessagingServiceSid'))
|
|
323
|
+
.form_param(new_parameter(date_created, key: 'DateCreated'))
|
|
324
|
+
.form_param(new_parameter(date_updated, key: 'DateUpdated'))
|
|
325
|
+
.form_param(new_parameter(state, key: 'State'))
|
|
326
|
+
.form_param(new_parameter(timers_inactive, key: 'Timers.Inactive'))
|
|
327
|
+
.form_param(new_parameter(timers_closed, key: 'Timers.Closed'))
|
|
328
|
+
.form_param(new_parameter(bindings_email_address, key: 'Bindings.Email.Address'))
|
|
329
|
+
.form_param(new_parameter(bindings_email_name, key: 'Bindings.Email.Name'))
|
|
330
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
331
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
332
|
+
.auth(Single.new('accountSid_authToken')))
|
|
333
|
+
.response(new_response_handler
|
|
334
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
335
|
+
.deserialize_into(ServiceConversation.method(:from_hash))
|
|
336
|
+
.is_api_response(true))
|
|
337
|
+
.execute
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# Retrieve a list of conversations in your service
|
|
341
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
342
|
+
# [Conversation
|
|
343
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
344
|
+
# the Conversation resource is associated with.
|
|
345
|
+
# @param [String] start_date Optional parameter: Specifies the beginning of
|
|
346
|
+
# the date range for filtering Conversations based on their creation date.
|
|
347
|
+
# Conversations that were created on or after this date will be included in
|
|
348
|
+
# the results. The date must be in ISO8601 format, specifically starting at
|
|
349
|
+
# the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise
|
|
350
|
+
# filtering. This parameter can be combined with other filters. If this
|
|
351
|
+
# filter is used, the returned list is sorted by latest conversation
|
|
352
|
+
# creation date in descending order.
|
|
353
|
+
# @param [String] end_date Optional parameter: Defines the end of the date
|
|
354
|
+
# range for filtering conversations by their creation date. Only
|
|
355
|
+
# conversations that were created on or before this date will appear in the
|
|
356
|
+
# results. The date must be in ISO8601 format, specifically capturing up to
|
|
357
|
+
# the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that
|
|
358
|
+
# conversations from the entire end day are included. This parameter can be
|
|
359
|
+
# combined with other filters. If this filter is used, the returned list is
|
|
360
|
+
# sorted by latest conversation creation date in descending order.
|
|
361
|
+
# @param [ServiceConversationState] state Optional parameter: State for
|
|
362
|
+
# sorting and filtering list of Conversations. Can be `active`, `inactive`
|
|
363
|
+
# or `closed`
|
|
364
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
365
|
+
# return in each list page. The default is 50, and the maximum is 100.
|
|
366
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
367
|
+
# simply for client state.
|
|
368
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
369
|
+
# provided by the API.
|
|
370
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
371
|
+
def list_service_conversation(chat_service_sid,
|
|
372
|
+
start_date: nil,
|
|
373
|
+
end_date: nil,
|
|
374
|
+
state: nil,
|
|
375
|
+
page_size: nil,
|
|
376
|
+
page: nil,
|
|
377
|
+
page_token: nil)
|
|
378
|
+
@api_call
|
|
379
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
380
|
+
'/v1/Services/{ChatServiceSid}/Conversations',
|
|
381
|
+
Server::DEFAULT2)
|
|
382
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
383
|
+
.is_required(true)
|
|
384
|
+
.should_encode(true))
|
|
385
|
+
.query_param(new_parameter(start_date, key: 'StartDate'))
|
|
386
|
+
.query_param(new_parameter(end_date, key: 'EndDate'))
|
|
387
|
+
.query_param(new_parameter(state, key: 'State'))
|
|
388
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
389
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
390
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
391
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
392
|
+
.auth(Single.new('accountSid_authToken')))
|
|
393
|
+
.response(new_response_handler
|
|
394
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
395
|
+
.deserialize_into(ListServiceConversationResponse.method(:from_hash))
|
|
396
|
+
.is_api_response(true))
|
|
397
|
+
.execute
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
# Update an existing conversation in your service
|
|
401
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
402
|
+
# [Conversation
|
|
403
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
404
|
+
# the Conversation resource is associated with.
|
|
405
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
406
|
+
# uniquely identifies this resource. Can also be the `unique_name` of the
|
|
407
|
+
# Conversation.
|
|
408
|
+
# @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
|
|
409
|
+
# parameter: The X-Twilio-Webhook-Enabled HTTP request header
|
|
410
|
+
# @param [String] friendly_name Optional parameter: The human-readable name
|
|
411
|
+
# of this conversation, limited to 256 characters. Optional.
|
|
412
|
+
# @param [DateTime] date_created Optional parameter: The date that this
|
|
413
|
+
# resource was created.
|
|
414
|
+
# @param [DateTime] date_updated Optional parameter: The date that this
|
|
415
|
+
# resource was last updated.
|
|
416
|
+
# @param [String] attributes Optional parameter: An optional string metadata
|
|
417
|
+
# field you can use to store any data you wish. The string value must
|
|
418
|
+
# contain structurally valid JSON if specified. **Note** that if the
|
|
419
|
+
# attributes are not set "{}" will be returned.
|
|
420
|
+
# @param [String] messaging_service_sid Optional parameter: The unique ID of
|
|
421
|
+
# the [Messaging
|
|
422
|
+
# Service](https://www.twilio.com/docs/messaging/api/service-resource) this
|
|
423
|
+
# conversation belongs to.
|
|
424
|
+
# @param [ServiceConversationState] state Optional parameter: Current state
|
|
425
|
+
# of this conversation. Can be either `initializing`, `active`, `inactive`
|
|
426
|
+
# or `closed` and defaults to `active`
|
|
427
|
+
# @param [String] timers_inactive Optional parameter: ISO8601 duration when
|
|
428
|
+
# conversation will be switched to `inactive` state. Minimum value for this
|
|
429
|
+
# timer is 1 minute.
|
|
430
|
+
# @param [String] timers_closed Optional parameter: ISO8601 duration when
|
|
431
|
+
# conversation will be switched to `closed` state. Minimum value for this
|
|
432
|
+
# timer is 10 minutes.
|
|
433
|
+
# @param [String] unique_name Optional parameter: An application-defined
|
|
434
|
+
# string that uniquely identifies the resource. It can be used to address
|
|
435
|
+
# the resource in place of the resource's `sid` in the URL.
|
|
436
|
+
# @param [String] bindings_email_address Optional parameter: The default
|
|
437
|
+
# email address that will be used when sending outbound emails in this
|
|
438
|
+
# conversation.
|
|
439
|
+
# @param [String] bindings_email_name Optional parameter: The default name
|
|
440
|
+
# that will be used when sending outbound emails in this conversation.
|
|
441
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
442
|
+
def update_service_conversation(chat_service_sid,
|
|
443
|
+
sid,
|
|
444
|
+
x_twilio_webhook_enabled: nil,
|
|
445
|
+
friendly_name: nil,
|
|
446
|
+
date_created: nil,
|
|
447
|
+
date_updated: nil,
|
|
448
|
+
attributes: nil,
|
|
449
|
+
messaging_service_sid: nil,
|
|
450
|
+
state: nil,
|
|
451
|
+
timers_inactive: nil,
|
|
452
|
+
timers_closed: nil,
|
|
453
|
+
unique_name: nil,
|
|
454
|
+
bindings_email_address: nil,
|
|
455
|
+
bindings_email_name: nil)
|
|
456
|
+
@api_call
|
|
457
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
458
|
+
'/v1/Services/{ChatServiceSid}/Conversations/{Sid}',
|
|
459
|
+
Server::DEFAULT2)
|
|
460
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
461
|
+
.is_required(true)
|
|
462
|
+
.should_encode(true))
|
|
463
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
464
|
+
.is_required(true)
|
|
465
|
+
.should_encode(true))
|
|
466
|
+
.header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
|
|
467
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
468
|
+
.form_param(new_parameter(date_created, key: 'DateCreated'))
|
|
469
|
+
.form_param(new_parameter(date_updated, key: 'DateUpdated'))
|
|
470
|
+
.form_param(new_parameter(attributes, key: 'Attributes'))
|
|
471
|
+
.form_param(new_parameter(messaging_service_sid, key: 'MessagingServiceSid'))
|
|
472
|
+
.form_param(new_parameter(state, key: 'State'))
|
|
473
|
+
.form_param(new_parameter(timers_inactive, key: 'Timers.Inactive'))
|
|
474
|
+
.form_param(new_parameter(timers_closed, key: 'Timers.Closed'))
|
|
475
|
+
.form_param(new_parameter(unique_name, key: 'UniqueName'))
|
|
476
|
+
.form_param(new_parameter(bindings_email_address, key: 'Bindings.Email.Address'))
|
|
477
|
+
.form_param(new_parameter(bindings_email_name, key: 'Bindings.Email.Name'))
|
|
478
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
479
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
480
|
+
.auth(Single.new('accountSid_authToken')))
|
|
481
|
+
.response(new_response_handler
|
|
482
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
483
|
+
.deserialize_into(ServiceConversation.method(:from_hash))
|
|
484
|
+
.is_api_response(true))
|
|
485
|
+
.execute
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
# Remove a conversation from your service
|
|
489
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
490
|
+
# [Conversation
|
|
491
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
492
|
+
# the Conversation resource is associated with.
|
|
493
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
494
|
+
# uniquely identifies this resource. Can also be the `unique_name` of the
|
|
495
|
+
# Conversation.
|
|
496
|
+
# @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
|
|
497
|
+
# parameter: The X-Twilio-Webhook-Enabled HTTP request header
|
|
498
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
499
|
+
def delete_service_conversation(chat_service_sid,
|
|
500
|
+
sid,
|
|
501
|
+
x_twilio_webhook_enabled: nil)
|
|
502
|
+
@api_call
|
|
503
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
504
|
+
'/v1/Services/{ChatServiceSid}/Conversations/{Sid}',
|
|
505
|
+
Server::DEFAULT2)
|
|
506
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
507
|
+
.is_required(true)
|
|
508
|
+
.should_encode(true))
|
|
509
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
510
|
+
.is_required(true)
|
|
511
|
+
.should_encode(true))
|
|
512
|
+
.header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
|
|
513
|
+
.auth(Single.new('accountSid_authToken')))
|
|
514
|
+
.response(new_response_handler
|
|
515
|
+
.is_response_void(true)
|
|
516
|
+
.is_api_response(true))
|
|
517
|
+
.execute
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
# Fetch a conversation from your service
|
|
521
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
522
|
+
# [Conversation
|
|
523
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
524
|
+
# the Conversation resource is associated with.
|
|
525
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
526
|
+
# uniquely identifies this resource. Can also be the `unique_name` of the
|
|
527
|
+
# Conversation.
|
|
528
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
529
|
+
def fetch_service_conversation(chat_service_sid,
|
|
530
|
+
sid)
|
|
531
|
+
@api_call
|
|
532
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
533
|
+
'/v1/Services/{ChatServiceSid}/Conversations/{Sid}',
|
|
534
|
+
Server::DEFAULT2)
|
|
535
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
536
|
+
.is_required(true)
|
|
537
|
+
.should_encode(true))
|
|
538
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
539
|
+
.is_required(true)
|
|
540
|
+
.should_encode(true))
|
|
541
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
542
|
+
.auth(Single.new('accountSid_authToken')))
|
|
543
|
+
.response(new_response_handler
|
|
544
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
545
|
+
.deserialize_into(ServiceConversation.method(:from_hash))
|
|
546
|
+
.is_api_response(true))
|
|
547
|
+
.execute
|
|
548
|
+
end
|
|
549
|
+
end
|
|
550
|
+
end
|