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,182 @@
|
|
|
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
|
+
# ConversationsV1ConversationWithParticipantsApi
|
|
8
|
+
class ConversationsV1ConversationWithParticipantsApi < BaseApi
|
|
9
|
+
# Create a new conversation with the list of participants in your account's
|
|
10
|
+
# default service
|
|
11
|
+
# @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
|
|
12
|
+
# parameter: The X-Twilio-Webhook-Enabled HTTP request header
|
|
13
|
+
# @param [String] friendly_name Optional parameter: The human-readable name
|
|
14
|
+
# of this conversation, limited to 256 characters. Optional.
|
|
15
|
+
# @param [String] unique_name Optional parameter: An application-defined
|
|
16
|
+
# string that uniquely identifies the resource. It can be used to address
|
|
17
|
+
# the resource in place of the resource's `sid` in the URL.
|
|
18
|
+
# @param [DateTime] date_created Optional parameter: The date that this
|
|
19
|
+
# resource was created.
|
|
20
|
+
# @param [DateTime] date_updated Optional parameter: The date that this
|
|
21
|
+
# resource was last updated.
|
|
22
|
+
# @param [String] messaging_service_sid Optional parameter: The unique ID of
|
|
23
|
+
# the [Messaging
|
|
24
|
+
# Service](https://www.twilio.com/docs/messaging/api/service-resource) this
|
|
25
|
+
# conversation belongs to.
|
|
26
|
+
# @param [String] attributes Optional parameter: An optional string metadata
|
|
27
|
+
# field you can use to store any data you wish. The string value must
|
|
28
|
+
# contain structurally valid JSON if specified. **Note** that if the
|
|
29
|
+
# attributes are not set "{}" will be returned.
|
|
30
|
+
# @param [ConversationWithParticipantsState] state Optional parameter:
|
|
31
|
+
# Current state of this conversation. Can be either `initializing`,
|
|
32
|
+
# `active`, `inactive` or `closed` and defaults to `active`
|
|
33
|
+
# @param [String] timers_inactive Optional parameter: ISO8601 duration when
|
|
34
|
+
# conversation will be switched to `inactive` state. Minimum value for this
|
|
35
|
+
# timer is 1 minute.
|
|
36
|
+
# @param [String] timers_closed Optional parameter: ISO8601 duration when
|
|
37
|
+
# conversation will be switched to `closed` state. Minimum value for this
|
|
38
|
+
# timer is 10 minutes.
|
|
39
|
+
# @param [String] bindings_email_address Optional parameter: The default
|
|
40
|
+
# email address that will be used when sending outbound emails in this
|
|
41
|
+
# conversation.
|
|
42
|
+
# @param [String] bindings_email_name Optional parameter: The default name
|
|
43
|
+
# that will be used when sending outbound emails in this conversation.
|
|
44
|
+
# @param [Array[String]] participant Optional parameter: The participant to
|
|
45
|
+
# be added to the conversation in JSON format. The JSON object attributes
|
|
46
|
+
# are as parameters in [Participant
|
|
47
|
+
# Resource](https://www.twilio.com/docs/conversations/api/conversation-parti
|
|
48
|
+
# cipant-resource). The maximum number of participants that can be added in
|
|
49
|
+
# a single request is 10.
|
|
50
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
51
|
+
def create_conversation_with_participants(x_twilio_webhook_enabled: nil,
|
|
52
|
+
friendly_name: nil,
|
|
53
|
+
unique_name: nil,
|
|
54
|
+
date_created: nil,
|
|
55
|
+
date_updated: nil,
|
|
56
|
+
messaging_service_sid: nil,
|
|
57
|
+
attributes: nil,
|
|
58
|
+
state: nil,
|
|
59
|
+
timers_inactive: nil,
|
|
60
|
+
timers_closed: nil,
|
|
61
|
+
bindings_email_address: nil,
|
|
62
|
+
bindings_email_name: nil,
|
|
63
|
+
participant: nil)
|
|
64
|
+
@api_call
|
|
65
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
66
|
+
'/v1/ConversationWithParticipants',
|
|
67
|
+
Server::DEFAULT2)
|
|
68
|
+
.header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
|
|
69
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
70
|
+
.form_param(new_parameter(unique_name, key: 'UniqueName'))
|
|
71
|
+
.form_param(new_parameter(date_created, key: 'DateCreated'))
|
|
72
|
+
.form_param(new_parameter(date_updated, key: 'DateUpdated'))
|
|
73
|
+
.form_param(new_parameter(messaging_service_sid, key: 'MessagingServiceSid'))
|
|
74
|
+
.form_param(new_parameter(attributes, key: 'Attributes'))
|
|
75
|
+
.form_param(new_parameter(state, key: 'State'))
|
|
76
|
+
.form_param(new_parameter(timers_inactive, key: 'Timers.Inactive'))
|
|
77
|
+
.form_param(new_parameter(timers_closed, key: 'Timers.Closed'))
|
|
78
|
+
.form_param(new_parameter(bindings_email_address, key: 'Bindings.Email.Address'))
|
|
79
|
+
.form_param(new_parameter(bindings_email_name, key: 'Bindings.Email.Name'))
|
|
80
|
+
.form_param(new_parameter(participant, key: 'Participant'))
|
|
81
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
82
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
83
|
+
.auth(Single.new('accountSid_authToken')))
|
|
84
|
+
.response(new_response_handler
|
|
85
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
86
|
+
.deserialize_into(ConversationWithParticipants.method(:from_hash))
|
|
87
|
+
.is_api_response(true))
|
|
88
|
+
.execute
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Create a new conversation with the list of participants in your account's
|
|
92
|
+
# default service
|
|
93
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
94
|
+
# [Conversation
|
|
95
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
96
|
+
# the Conversation resource is associated with.
|
|
97
|
+
# @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
|
|
98
|
+
# parameter: The X-Twilio-Webhook-Enabled HTTP request header
|
|
99
|
+
# @param [String] friendly_name Optional parameter: The human-readable name
|
|
100
|
+
# of this conversation, limited to 256 characters. Optional.
|
|
101
|
+
# @param [String] unique_name Optional parameter: An application-defined
|
|
102
|
+
# string that uniquely identifies the resource. It can be used to address
|
|
103
|
+
# the resource in place of the resource's `sid` in the URL.
|
|
104
|
+
# @param [DateTime] date_created Optional parameter: The date that this
|
|
105
|
+
# resource was created.
|
|
106
|
+
# @param [DateTime] date_updated Optional parameter: The date that this
|
|
107
|
+
# resource was last updated.
|
|
108
|
+
# @param [String] messaging_service_sid Optional parameter: The unique ID of
|
|
109
|
+
# the [Messaging
|
|
110
|
+
# Service](https://www.twilio.com/docs/messaging/api/service-resource) this
|
|
111
|
+
# conversation belongs to.
|
|
112
|
+
# @param [String] attributes Optional parameter: An optional string metadata
|
|
113
|
+
# field you can use to store any data you wish. The string value must
|
|
114
|
+
# contain structurally valid JSON if specified. **Note** that if the
|
|
115
|
+
# attributes are not set "{}" will be returned.
|
|
116
|
+
# @param [ServiceConversationWithParticipantsState] state Optional
|
|
117
|
+
# parameter: Current state of this conversation. Can be either
|
|
118
|
+
# `initializing`, `active`, `inactive` or `closed` and defaults to
|
|
119
|
+
# `active`
|
|
120
|
+
# @param [String] timers_inactive Optional parameter: ISO8601 duration when
|
|
121
|
+
# conversation will be switched to `inactive` state. Minimum value for this
|
|
122
|
+
# timer is 1 minute.
|
|
123
|
+
# @param [String] timers_closed Optional parameter: ISO8601 duration when
|
|
124
|
+
# conversation will be switched to `closed` state. Minimum value for this
|
|
125
|
+
# timer is 10 minutes.
|
|
126
|
+
# @param [String] bindings_email_address Optional parameter: The default
|
|
127
|
+
# email address that will be used when sending outbound emails in this
|
|
128
|
+
# conversation.
|
|
129
|
+
# @param [String] bindings_email_name Optional parameter: The default name
|
|
130
|
+
# that will be used when sending outbound emails in this conversation.
|
|
131
|
+
# @param [Array[String]] participant Optional parameter: The participant to
|
|
132
|
+
# be added to the conversation in JSON format. The JSON object attributes
|
|
133
|
+
# are as parameters in [Participant
|
|
134
|
+
# Resource](https://www.twilio.com/docs/conversations/api/conversation-parti
|
|
135
|
+
# cipant-resource). The maximum number of participants that can be added in
|
|
136
|
+
# a single request is 10.
|
|
137
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
138
|
+
def create_service_conversation_with_participants(chat_service_sid,
|
|
139
|
+
x_twilio_webhook_enabled: nil,
|
|
140
|
+
friendly_name: nil,
|
|
141
|
+
unique_name: nil,
|
|
142
|
+
date_created: nil,
|
|
143
|
+
date_updated: nil,
|
|
144
|
+
messaging_service_sid: nil,
|
|
145
|
+
attributes: nil,
|
|
146
|
+
state: nil,
|
|
147
|
+
timers_inactive: nil,
|
|
148
|
+
timers_closed: nil,
|
|
149
|
+
bindings_email_address: nil,
|
|
150
|
+
bindings_email_name: nil,
|
|
151
|
+
participant: nil)
|
|
152
|
+
@api_call
|
|
153
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
154
|
+
'/v1/Services/{ChatServiceSid}/ConversationWithParticipants',
|
|
155
|
+
Server::DEFAULT2)
|
|
156
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
157
|
+
.is_required(true)
|
|
158
|
+
.should_encode(true))
|
|
159
|
+
.header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
|
|
160
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
161
|
+
.form_param(new_parameter(unique_name, key: 'UniqueName'))
|
|
162
|
+
.form_param(new_parameter(date_created, key: 'DateCreated'))
|
|
163
|
+
.form_param(new_parameter(date_updated, key: 'DateUpdated'))
|
|
164
|
+
.form_param(new_parameter(messaging_service_sid, key: 'MessagingServiceSid'))
|
|
165
|
+
.form_param(new_parameter(attributes, key: 'Attributes'))
|
|
166
|
+
.form_param(new_parameter(state, key: 'State'))
|
|
167
|
+
.form_param(new_parameter(timers_inactive, key: 'Timers.Inactive'))
|
|
168
|
+
.form_param(new_parameter(timers_closed, key: 'Timers.Closed'))
|
|
169
|
+
.form_param(new_parameter(bindings_email_address, key: 'Bindings.Email.Address'))
|
|
170
|
+
.form_param(new_parameter(bindings_email_name, key: 'Bindings.Email.Name'))
|
|
171
|
+
.form_param(new_parameter(participant, key: 'Participant'))
|
|
172
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
173
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
174
|
+
.auth(Single.new('accountSid_authToken')))
|
|
175
|
+
.response(new_response_handler
|
|
176
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
177
|
+
.deserialize_into(ServiceConversationWithParticipants.method(:from_hash))
|
|
178
|
+
.is_api_response(true))
|
|
179
|
+
.execute
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
|
@@ -0,0 +1,189 @@
|
|
|
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
|
+
# ConversationsV1CredentialApi
|
|
8
|
+
class ConversationsV1CredentialApi < BaseApi
|
|
9
|
+
# Add a new push notification credential to your account
|
|
10
|
+
# @param [CredentialPushType] type Required parameter: The type of
|
|
11
|
+
# push-notification service the credential is for. Can be: `fcm`, `gcm`, or
|
|
12
|
+
# `apn`.
|
|
13
|
+
# @param [String] friendly_name Optional parameter: A descriptive string
|
|
14
|
+
# that you create to describe the new resource. It can be up to 64
|
|
15
|
+
# characters long.
|
|
16
|
+
# @param [String] certificate Optional parameter: [APN only] The URL encoded
|
|
17
|
+
# representation of the certificate. For example, `-----BEGIN
|
|
18
|
+
# CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A==
|
|
19
|
+
# -----END CERTIFICATE-----`.
|
|
20
|
+
# @param [String] private_key Optional parameter: [APN only] The URL encoded
|
|
21
|
+
# representation of the private key. For example, `-----BEGIN RSA PRIVATE
|
|
22
|
+
# KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE
|
|
23
|
+
# KEY-----`.
|
|
24
|
+
# @param [TrueClass | FalseClass] sandbox Optional parameter: [APN only]
|
|
25
|
+
# Whether to send the credential to sandbox APNs. Can be `true` to send to
|
|
26
|
+
# sandbox APNs or `false` to send to production.
|
|
27
|
+
# @param [String] api_key Optional parameter: [GCM only] The API key for the
|
|
28
|
+
# project that was obtained from the Google Developer console for your GCM
|
|
29
|
+
# Service application credential.
|
|
30
|
+
# @param [String] secret Optional parameter: [FCM only] The **Server key**
|
|
31
|
+
# of your project from the Firebase console, found under Settings / Cloud
|
|
32
|
+
# messaging.
|
|
33
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
34
|
+
def create_credential(type,
|
|
35
|
+
friendly_name: nil,
|
|
36
|
+
certificate: nil,
|
|
37
|
+
private_key: nil,
|
|
38
|
+
sandbox: nil,
|
|
39
|
+
api_key: nil,
|
|
40
|
+
secret: nil)
|
|
41
|
+
@api_call
|
|
42
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
43
|
+
'/v1/Credentials',
|
|
44
|
+
Server::DEFAULT2)
|
|
45
|
+
.form_param(new_parameter(type, key: 'Type')
|
|
46
|
+
.is_required(true))
|
|
47
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
48
|
+
.form_param(new_parameter(certificate, key: 'Certificate'))
|
|
49
|
+
.form_param(new_parameter(private_key, key: 'PrivateKey'))
|
|
50
|
+
.form_param(new_parameter(sandbox, key: 'Sandbox'))
|
|
51
|
+
.form_param(new_parameter(api_key, key: 'ApiKey'))
|
|
52
|
+
.form_param(new_parameter(secret, key: 'Secret'))
|
|
53
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
54
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
55
|
+
.auth(Single.new('accountSid_authToken')))
|
|
56
|
+
.response(new_response_handler
|
|
57
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
58
|
+
.deserialize_into(Credential.method(:from_hash))
|
|
59
|
+
.is_api_response(true))
|
|
60
|
+
.execute
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Retrieve a list of all push notification credentials on your account
|
|
64
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
65
|
+
# return in each list page. The default is 50, and the maximum is 100.
|
|
66
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
67
|
+
# simply for client state.
|
|
68
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
69
|
+
# provided by the API.
|
|
70
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
71
|
+
def list_credential(page_size: nil,
|
|
72
|
+
page: nil,
|
|
73
|
+
page_token: nil)
|
|
74
|
+
@api_call
|
|
75
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
76
|
+
'/v1/Credentials',
|
|
77
|
+
Server::DEFAULT2)
|
|
78
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
79
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
80
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
81
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
82
|
+
.auth(Single.new('accountSid_authToken')))
|
|
83
|
+
.response(new_response_handler
|
|
84
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
85
|
+
.deserialize_into(ListCredentialResponse.method(:from_hash))
|
|
86
|
+
.is_api_response(true))
|
|
87
|
+
.execute
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Update an existing push notification credential on your account
|
|
91
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
92
|
+
# uniquely identifies this resource.
|
|
93
|
+
# @param [CredentialPushType] type Optional parameter: The type of
|
|
94
|
+
# push-notification service the credential is for. Can be: `fcm`, `gcm`, or
|
|
95
|
+
# `apn`.
|
|
96
|
+
# @param [String] friendly_name Optional parameter: A descriptive string
|
|
97
|
+
# that you create to describe the new resource. It can be up to 64
|
|
98
|
+
# characters long.
|
|
99
|
+
# @param [String] certificate Optional parameter: [APN only] The URL encoded
|
|
100
|
+
# representation of the certificate. For example, `-----BEGIN
|
|
101
|
+
# CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A==
|
|
102
|
+
# -----END CERTIFICATE-----`.
|
|
103
|
+
# @param [String] private_key Optional parameter: [APN only] The URL encoded
|
|
104
|
+
# representation of the private key. For example, `-----BEGIN RSA PRIVATE
|
|
105
|
+
# KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE
|
|
106
|
+
# KEY-----`.
|
|
107
|
+
# @param [TrueClass | FalseClass] sandbox Optional parameter: [APN only]
|
|
108
|
+
# Whether to send the credential to sandbox APNs. Can be `true` to send to
|
|
109
|
+
# sandbox APNs or `false` to send to production.
|
|
110
|
+
# @param [String] api_key Optional parameter: [GCM only] The API key for the
|
|
111
|
+
# project that was obtained from the Google Developer console for your GCM
|
|
112
|
+
# Service application credential.
|
|
113
|
+
# @param [String] secret Optional parameter: [FCM only] The **Server key**
|
|
114
|
+
# of your project from the Firebase console, found under Settings / Cloud
|
|
115
|
+
# messaging.
|
|
116
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
117
|
+
def update_credential(sid,
|
|
118
|
+
type: nil,
|
|
119
|
+
friendly_name: nil,
|
|
120
|
+
certificate: nil,
|
|
121
|
+
private_key: nil,
|
|
122
|
+
sandbox: nil,
|
|
123
|
+
api_key: nil,
|
|
124
|
+
secret: nil)
|
|
125
|
+
@api_call
|
|
126
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
127
|
+
'/v1/Credentials/{Sid}',
|
|
128
|
+
Server::DEFAULT2)
|
|
129
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
130
|
+
.is_required(true)
|
|
131
|
+
.should_encode(true))
|
|
132
|
+
.form_param(new_parameter(type, key: 'Type'))
|
|
133
|
+
.form_param(new_parameter(friendly_name, key: 'FriendlyName'))
|
|
134
|
+
.form_param(new_parameter(certificate, key: 'Certificate'))
|
|
135
|
+
.form_param(new_parameter(private_key, key: 'PrivateKey'))
|
|
136
|
+
.form_param(new_parameter(sandbox, key: 'Sandbox'))
|
|
137
|
+
.form_param(new_parameter(api_key, key: 'ApiKey'))
|
|
138
|
+
.form_param(new_parameter(secret, key: 'Secret'))
|
|
139
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
140
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
141
|
+
.auth(Single.new('accountSid_authToken')))
|
|
142
|
+
.response(new_response_handler
|
|
143
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
144
|
+
.deserialize_into(Credential.method(:from_hash))
|
|
145
|
+
.is_api_response(true))
|
|
146
|
+
.execute
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Remove a push notification credential from your account
|
|
150
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
151
|
+
# uniquely identifies this resource.
|
|
152
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
153
|
+
def delete_credential(sid)
|
|
154
|
+
@api_call
|
|
155
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
156
|
+
'/v1/Credentials/{Sid}',
|
|
157
|
+
Server::DEFAULT2)
|
|
158
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
159
|
+
.is_required(true)
|
|
160
|
+
.should_encode(true))
|
|
161
|
+
.auth(Single.new('accountSid_authToken')))
|
|
162
|
+
.response(new_response_handler
|
|
163
|
+
.is_response_void(true)
|
|
164
|
+
.is_api_response(true))
|
|
165
|
+
.execute
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Fetch a push notification credential from your account
|
|
169
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
170
|
+
# uniquely identifies this resource.
|
|
171
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
172
|
+
def fetch_credential(sid)
|
|
173
|
+
@api_call
|
|
174
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
175
|
+
'/v1/Credentials/{Sid}',
|
|
176
|
+
Server::DEFAULT2)
|
|
177
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
178
|
+
.is_required(true)
|
|
179
|
+
.should_encode(true))
|
|
180
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
181
|
+
.auth(Single.new('accountSid_authToken')))
|
|
182
|
+
.response(new_response_handler
|
|
183
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
184
|
+
.deserialize_into(Credential.method(:from_hash))
|
|
185
|
+
.is_api_response(true))
|
|
186
|
+
.execute
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
end
|
|
@@ -0,0 +1,183 @@
|
|
|
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
|
+
# ConversationsV1DeliveryReceiptApi
|
|
8
|
+
class ConversationsV1DeliveryReceiptApi < BaseApi
|
|
9
|
+
# Fetch the delivery and read receipts of the conversation message
|
|
10
|
+
# @param [String] conversation_sid Required parameter: The unique ID of the
|
|
11
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
12
|
+
# resource) for this message.
|
|
13
|
+
# @param [String] message_sid Required parameter: The SID of the message
|
|
14
|
+
# within a
|
|
15
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
16
|
+
# resource) the delivery receipt belongs to.
|
|
17
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
18
|
+
# uniquely identifies this resource.
|
|
19
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
20
|
+
def fetch_conversation_message_receipt(conversation_sid,
|
|
21
|
+
message_sid,
|
|
22
|
+
sid)
|
|
23
|
+
@api_call
|
|
24
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
25
|
+
'/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}',
|
|
26
|
+
Server::DEFAULT2)
|
|
27
|
+
.template_param(new_parameter(conversation_sid, key: 'ConversationSid')
|
|
28
|
+
.is_required(true)
|
|
29
|
+
.should_encode(true))
|
|
30
|
+
.template_param(new_parameter(message_sid, key: 'MessageSid')
|
|
31
|
+
.is_required(true)
|
|
32
|
+
.should_encode(true))
|
|
33
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
34
|
+
.is_required(true)
|
|
35
|
+
.should_encode(true))
|
|
36
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
37
|
+
.auth(Single.new('accountSid_authToken')))
|
|
38
|
+
.response(new_response_handler
|
|
39
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
40
|
+
.deserialize_into(ConversationMessageReceipt.method(:from_hash))
|
|
41
|
+
.is_api_response(true))
|
|
42
|
+
.execute
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Retrieve a list of all delivery and read receipts of the conversation
|
|
46
|
+
# message
|
|
47
|
+
# @param [String] conversation_sid Required parameter: The unique ID of the
|
|
48
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
49
|
+
# resource) for this message.
|
|
50
|
+
# @param [String] message_sid Required parameter: The SID of the message
|
|
51
|
+
# within a
|
|
52
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
53
|
+
# resource) the delivery receipt belongs to.
|
|
54
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
55
|
+
# return in each list page. The default is 50, and the maximum is 50.
|
|
56
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
57
|
+
# simply for client state.
|
|
58
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
59
|
+
# provided by the API.
|
|
60
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
61
|
+
def list_conversation_message_receipt(conversation_sid,
|
|
62
|
+
message_sid,
|
|
63
|
+
page_size: nil,
|
|
64
|
+
page: nil,
|
|
65
|
+
page_token: nil)
|
|
66
|
+
@api_call
|
|
67
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
68
|
+
'/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts',
|
|
69
|
+
Server::DEFAULT2)
|
|
70
|
+
.template_param(new_parameter(conversation_sid, key: 'ConversationSid')
|
|
71
|
+
.is_required(true)
|
|
72
|
+
.should_encode(true))
|
|
73
|
+
.template_param(new_parameter(message_sid, key: 'MessageSid')
|
|
74
|
+
.is_required(true)
|
|
75
|
+
.should_encode(true))
|
|
76
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
77
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
78
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
79
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
80
|
+
.auth(Single.new('accountSid_authToken')))
|
|
81
|
+
.response(new_response_handler
|
|
82
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
83
|
+
.deserialize_into(ListConversationMessageReceiptResponse.method(:from_hash))
|
|
84
|
+
.is_api_response(true))
|
|
85
|
+
.execute
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Fetch the delivery and read receipts of the conversation message
|
|
89
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
90
|
+
# [Conversation
|
|
91
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
92
|
+
# the Message resource is associated with.
|
|
93
|
+
# @param [String] conversation_sid Required parameter: The unique ID of the
|
|
94
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
95
|
+
# resource) for this message.
|
|
96
|
+
# @param [String] message_sid Required parameter: The SID of the message
|
|
97
|
+
# within a
|
|
98
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
99
|
+
# resource) the delivery receipt belongs to.
|
|
100
|
+
# @param [String] sid Required parameter: A 34 character string that
|
|
101
|
+
# uniquely identifies this resource.
|
|
102
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
103
|
+
def fetch_service_conversation_message_receipt(chat_service_sid,
|
|
104
|
+
conversation_sid,
|
|
105
|
+
message_sid,
|
|
106
|
+
sid)
|
|
107
|
+
@api_call
|
|
108
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
109
|
+
'/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}',
|
|
110
|
+
Server::DEFAULT2)
|
|
111
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
112
|
+
.is_required(true)
|
|
113
|
+
.should_encode(true))
|
|
114
|
+
.template_param(new_parameter(conversation_sid, key: 'ConversationSid')
|
|
115
|
+
.is_required(true)
|
|
116
|
+
.should_encode(true))
|
|
117
|
+
.template_param(new_parameter(message_sid, key: 'MessageSid')
|
|
118
|
+
.is_required(true)
|
|
119
|
+
.should_encode(true))
|
|
120
|
+
.template_param(new_parameter(sid, key: 'Sid')
|
|
121
|
+
.is_required(true)
|
|
122
|
+
.should_encode(true))
|
|
123
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
124
|
+
.auth(Single.new('accountSid_authToken')))
|
|
125
|
+
.response(new_response_handler
|
|
126
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
127
|
+
.deserialize_into(ServiceConversationMessageReceipt.method(:from_hash))
|
|
128
|
+
.is_api_response(true))
|
|
129
|
+
.execute
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Retrieve a list of all delivery and read receipts of the conversation
|
|
133
|
+
# message
|
|
134
|
+
# @param [String] chat_service_sid Required parameter: The SID of the
|
|
135
|
+
# [Conversation
|
|
136
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
137
|
+
# the Message resource is associated with.
|
|
138
|
+
# @param [String] conversation_sid Required parameter: The unique ID of the
|
|
139
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
140
|
+
# resource) for this message.
|
|
141
|
+
# @param [String] message_sid Required parameter: The SID of the message
|
|
142
|
+
# within a
|
|
143
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
144
|
+
# resource) the delivery receipt belongs to.
|
|
145
|
+
# @param [Integer] page_size Optional parameter: How many resources to
|
|
146
|
+
# return in each list page. The default is 50, and the maximum is 50.
|
|
147
|
+
# @param [Integer] page Optional parameter: The page index. This value is
|
|
148
|
+
# simply for client state.
|
|
149
|
+
# @param [String] page_token Optional parameter: The page token. This is
|
|
150
|
+
# provided by the API.
|
|
151
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
152
|
+
def list_service_conversation_message_receipt(chat_service_sid,
|
|
153
|
+
conversation_sid,
|
|
154
|
+
message_sid,
|
|
155
|
+
page_size: nil,
|
|
156
|
+
page: nil,
|
|
157
|
+
page_token: nil)
|
|
158
|
+
@api_call
|
|
159
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
160
|
+
'/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts',
|
|
161
|
+
Server::DEFAULT2)
|
|
162
|
+
.template_param(new_parameter(chat_service_sid, key: 'ChatServiceSid')
|
|
163
|
+
.is_required(true)
|
|
164
|
+
.should_encode(true))
|
|
165
|
+
.template_param(new_parameter(conversation_sid, key: 'ConversationSid')
|
|
166
|
+
.is_required(true)
|
|
167
|
+
.should_encode(true))
|
|
168
|
+
.template_param(new_parameter(message_sid, key: 'MessageSid')
|
|
169
|
+
.is_required(true)
|
|
170
|
+
.should_encode(true))
|
|
171
|
+
.query_param(new_parameter(page_size, key: 'PageSize'))
|
|
172
|
+
.query_param(new_parameter(page, key: 'Page'))
|
|
173
|
+
.query_param(new_parameter(page_token, key: 'PageToken'))
|
|
174
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
175
|
+
.auth(Single.new('accountSid_authToken')))
|
|
176
|
+
.response(new_response_handler
|
|
177
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
178
|
+
.deserialize_into(ListServiceConversationMessageReceiptResponse.method(:from_hash))
|
|
179
|
+
.is_api_response(true))
|
|
180
|
+
.execute
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
end
|