twilio-ruby 5.74.0 → 7.10.1
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 +4 -4
- data/.dockerignore +1 -1
- data/.github/ISSUE_TEMPLATE/bug_report.yml +69 -0
- data/.github/workflows/test-and-deploy.yml +20 -2
- data/.gitignore +4 -0
- data/.rubocop.yml +1 -0
- data/CHANGES.md +1367 -0
- data/CONTRIBUTING.md +11 -9
- data/Dockerfile +2 -1
- data/Gemfile +5 -0
- data/LICENSE +1 -1
- data/Makefile +6 -0
- data/README.md +138 -40
- data/UPGRADE.md +21 -0
- data/advanced-examples/custom-http-client.md +170 -0
- data/cluster/cluster_oauth_spec.rb +19 -0
- data/cluster/cluster_orgs_spec.rb +40 -0
- data/cluster/cluster_spec.rb +75 -0
- data/examples/public_oauth.rb +13 -0
- data/lib/twilio-ruby/auth_strategy/auth_strategy.rb +19 -0
- data/lib/twilio-ruby/auth_strategy/no_auth_strategy.rb +17 -0
- data/lib/twilio-ruby/auth_strategy/token_auth_strategy.rb +39 -0
- data/lib/twilio-ruby/base/client_base.rb +131 -0
- data/lib/twilio-ruby/credential/auth_type.rb +17 -0
- data/lib/twilio-ruby/credential/client_credential_provider.rb +28 -0
- data/lib/twilio-ruby/credential/credential_provider.rb +11 -0
- data/lib/twilio-ruby/credential/orgs_credential_provider.rb +30 -0
- data/lib/twilio-ruby/framework/request.rb +8 -1
- data/lib/twilio-ruby/framework/rest/api_v1_version.rb +22 -0
- data/lib/twilio-ruby/framework/rest/domain.rb +0 -1
- data/lib/twilio-ruby/framework/rest/error.rb +27 -12
- data/lib/twilio-ruby/framework/rest/page.rb +1 -0
- data/lib/twilio-ruby/framework/rest/page_metadata.rb +83 -0
- data/lib/twilio-ruby/framework/rest/resource.rb +16 -0
- data/lib/twilio-ruby/framework/rest/token_page.rb +73 -0
- data/lib/twilio-ruby/framework/rest/version.rb +91 -4
- data/lib/twilio-ruby/http/client_token_manager.rb +31 -0
- data/lib/twilio-ruby/http/http_client.rb +22 -5
- data/lib/twilio-ruby/http/org_token_manager.rb +31 -0
- data/lib/twilio-ruby/jwt/access_token.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +338 -176
- data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +231 -0
- data/lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb +231 -0
- data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +644 -332
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +644 -332
- data/lib/twilio-ruby/rest/accounts/v1/credential.rb +185 -114
- data/lib/twilio-ruby/rest/accounts/v1/messaging_geopermissions.rb +285 -0
- data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +336 -0
- data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +378 -190
- data/lib/twilio-ruby/rest/accounts/v1.rb +69 -42
- data/lib/twilio-ruby/rest/accounts.rb +4 -34
- data/lib/twilio-ruby/rest/accounts_base.rb +38 -0
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +459 -365
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +886 -530
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +977 -586
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +482 -320
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/local.rb +519 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/machine_to_machine.rb +519 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb +519 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/national.rb +519 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/shared_cost.rb +519 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb +519 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/voip.rb +519 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +601 -0
- data/lib/twilio-ruby/rest/api/v2010/account/balance.rb +231 -118
- data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +289 -192
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +578 -417
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +556 -364
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +791 -511
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +1658 -663
- data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +1658 -663
- data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +541 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +260 -151
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +409 -240
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +1368 -1050
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +1124 -756
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +694 -458
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +719 -493
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +679 -407
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +483 -344
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +627 -416
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +737 -554
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +737 -553
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +737 -553
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +1261 -903
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +567 -302
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +268 -164
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +540 -350
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +970 -641
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +246 -125
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +246 -125
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +577 -399
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +604 -358
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +553 -338
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +702 -390
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb +343 -0
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +572 -378
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +560 -383
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +558 -372
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +718 -513
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +644 -408
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +567 -306
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +642 -359
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +667 -371
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_credential_list_mapping.rb +579 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.rb +579 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls.rb +204 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations/auth_registrations_credential_list_mapping.rb +579 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations.rb +190 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +158 -103
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +564 -331
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +564 -330
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +987 -641
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +694 -418
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +667 -372
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +205 -150
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +258 -139
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +557 -350
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +407 -335
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +407 -335
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +407 -335
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +407 -335
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +407 -335
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +407 -335
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +407 -335
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +407 -335
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +478 -416
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +785 -484
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +176 -104
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +278 -150
- data/lib/twilio-ruby/rest/api/v2010/account.rb +1229 -943
- data/lib/twilio-ruby/rest/api/v2010.rb +126 -148
- data/lib/twilio-ruby/rest/api.rb +25 -34
- data/lib/twilio-ruby/rest/api_base.rb +38 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_knowledge.rb +550 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_tool.rb +550 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +423 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant/message.rb +296 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +918 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +317 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb +349 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +862 -0
- data/lib/twilio-ruby/rest/assistants/v1/policy.rb +356 -0
- data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +352 -0
- data/lib/twilio-ruby/rest/assistants/v1/session.rb +493 -0
- data/lib/twilio-ruby/rest/assistants/v1/tool.rb +838 -0
- data/lib/twilio-ruby/rest/assistants/v1.rb +100 -0
- data/lib/twilio-ruby/rest/assistants.rb +6 -0
- data/lib/twilio-ruby/rest/assistants_base.rb +38 -0
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +468 -279
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +440 -279
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +438 -248
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +389 -235
- data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +430 -216
- data/lib/twilio-ruby/rest/bulkexports/v1.rb +57 -55
- data/lib/twilio-ruby/rest/bulkexports.rb +3 -34
- data/lib/twilio-ruby/rest/bulkexports_base.rb +38 -0
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +719 -403
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +613 -391
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +704 -440
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +722 -437
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +822 -515
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +672 -367
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +331 -237
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +750 -440
- data/lib/twilio-ruby/rest/chat/v1/service.rb +1287 -894
- data/lib/twilio-ruby/rest/chat/v1.rb +57 -55
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +719 -401
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +570 -370
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +613 -386
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +799 -527
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +825 -533
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +746 -467
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +916 -605
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +672 -369
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +561 -381
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +648 -419
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +796 -491
- data/lib/twilio-ruby/rest/chat/v2/service.rb +1121 -778
- data/lib/twilio-ruby/rest/chat/v2.rb +57 -53
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +444 -267
- data/lib/twilio-ruby/rest/chat/v3.rb +64 -41
- data/lib/twilio-ruby/rest/chat.rb +4 -48
- data/lib/twilio-ruby/rest/chat_base.rb +48 -0
- data/lib/twilio-ruby/rest/client.rb +338 -584
- data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +280 -0
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +327 -173
- data/lib/twilio-ruby/rest/content/v1/content.rb +1909 -334
- data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +340 -0
- data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +354 -0
- data/lib/twilio-ruby/rest/content/v1.rb +54 -38
- data/lib/twilio-ruby/rest/content/v2/content.rb +425 -0
- data/lib/twilio-ruby/rest/content/v2/content_and_approvals.rb +418 -0
- data/lib/twilio-ruby/rest/content/v2.rb +46 -0
- data/lib/twilio-ruby/rest/content.rb +2 -34
- data/lib/twilio-ruby/rest/content_base.rb +43 -0
- data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +798 -444
- data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +445 -227
- data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +467 -252
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +504 -344
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +852 -495
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +817 -495
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +725 -403
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +957 -552
- data/lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb +392 -0
- data/lib/twilio-ruby/rest/conversations/v1/credential.rb +728 -409
- data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +397 -304
- data/lib/twilio-ruby/rest/conversations/v1/role.rb +657 -356
- data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +563 -373
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +540 -312
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +459 -258
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +497 -279
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +504 -363
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +860 -533
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +829 -530
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +737 -438
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +972 -588
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb +399 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +403 -317
- data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +672 -380
- data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +686 -455
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +773 -474
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +724 -447
- data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +683 -435
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +758 -441
- data/lib/twilio-ruby/rest/conversations/v1.rb +135 -136
- data/lib/twilio-ruby/rest/conversations.rb +9 -34
- data/lib/twilio-ruby/rest/conversations_base.rb +38 -0
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +486 -288
- data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +468 -0
- data/lib/twilio-ruby/rest/events/v1/schema.rb +366 -214
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +209 -100
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +222 -103
- data/lib/twilio-ruby/rest/events/v1/sink.rb +711 -408
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +638 -339
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +685 -387
- data/lib/twilio-ruby/rest/events/v1.rb +87 -87
- data/lib/twilio-ruby/rest/events.rb +5 -34
- data/lib/twilio-ruby/rest/events_base.rb +38 -0
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +687 -146
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +621 -330
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +722 -496
- data/lib/twilio-ruby/rest/flex_api/v1/create_flex_instance.rb +382 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +928 -570
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +475 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +321 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +735 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +598 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +710 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +457 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +359 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +251 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +237 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +338 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +370 -227
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +560 -319
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb +547 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +637 -398
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +529 -225
- data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +621 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +700 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +390 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +564 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +599 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +376 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +539 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +400 -0
- data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +327 -0
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +663 -331
- data/lib/twilio-ruby/rest/flex_api/v1.rb +319 -113
- data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +515 -0
- data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +258 -125
- data/lib/twilio-ruby/rest/flex_api/v2.rb +70 -28
- data/lib/twilio-ruby/rest/flex_api.rb +9 -47
- data/lib/twilio-ruby/rest/flex_api_base.rb +43 -0
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +453 -248
- data/lib/twilio-ruby/rest/frontline_api/v1.rb +42 -38
- data/lib/twilio-ruby/rest/frontline_api.rb +2 -34
- data/lib/twilio-ruby/rest/frontline_api_base.rb +38 -0
- data/lib/twilio-ruby/rest/iam/v1/api_key.rb +471 -0
- data/lib/twilio-ruby/rest/iam/v1/get_api_keys.rb +320 -0
- data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +284 -0
- data/lib/twilio-ruby/rest/iam/v1/o_auth_app.rb +646 -0
- data/lib/twilio-ruby/rest/iam/v1/token.rb +301 -0
- data/lib/twilio-ruby/rest/iam/v1.rb +82 -0
- data/lib/twilio-ruby/rest/iam.rb +6 -0
- data/lib/twilio-ruby/rest/iam_base.rb +33 -0
- data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +509 -315
- data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +499 -0
- data/lib/twilio-ruby/rest/insights/v1/call/event.rb +360 -255
- data/lib/twilio-ruby/rest/insights/v1/call/metric.rb +333 -224
- data/lib/twilio-ruby/rest/insights/v1/call.rb +403 -236
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +718 -433
- data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +665 -467
- data/lib/twilio-ruby/rest/insights/v1/conference.rb +683 -502
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +545 -371
- data/lib/twilio-ruby/rest/insights/v1/room.rb +668 -489
- data/lib/twilio-ruby/rest/insights/v1/setting.rb +435 -205
- data/lib/twilio-ruby/rest/insights/v1.rb +84 -83
- data/lib/twilio-ruby/rest/insights.rb +6 -34
- data/lib/twilio-ruby/rest/insights_base.rb +38 -0
- data/lib/twilio-ruby/rest/intelligence/v2/custom_operator.rb +720 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator.rb +525 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +380 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +337 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +523 -0
- data/lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb +525 -0
- data/lib/twilio-ruby/rest/intelligence/v2/service.rb +844 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb +359 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb +359 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +373 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +570 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb +354 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +815 -0
- data/lib/twilio-ruby/rest/intelligence/v2.rb +176 -0
- data/lib/twilio-ruby/rest/intelligence.rb +6 -0
- data/lib/twilio-ruby/rest/intelligence_base.rb +38 -0
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +719 -364
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +613 -359
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +704 -397
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +722 -409
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +822 -488
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +672 -347
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +331 -231
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +750 -418
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +1287 -779
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +57 -53
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +719 -364
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +570 -343
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +613 -359
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +799 -451
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +825 -479
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +746 -411
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +916 -555
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +672 -347
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +561 -351
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +637 -384
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +796 -467
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +1121 -689
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +57 -53
- data/lib/twilio-ruby/rest/ip_messaging.rb +3 -41
- data/lib/twilio-ruby/rest/ip_messaging_base.rb +43 -0
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge/chunk.rb +317 -0
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb +349 -0
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge.rb +856 -0
- data/lib/twilio-ruby/rest/knowledge/v1.rb +49 -0
- data/lib/twilio-ruby/rest/knowledge.rb +6 -0
- data/lib/twilio-ruby/rest/knowledge_base.rb +38 -0
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +399 -237
- data/lib/twilio-ruby/rest/lookups/v1.rb +42 -39
- data/lib/twilio-ruby/rest/lookups/v2/bucket.rb +500 -0
- data/lib/twilio-ruby/rest/lookups/v2/lookup_override.rb +603 -0
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +570 -328
- data/lib/twilio-ruby/rest/lookups/v2/query.rb +351 -0
- data/lib/twilio-ruby/rest/lookups/v2/rate_limit.rb +229 -0
- data/lib/twilio-ruby/rest/lookups/v2.rb +128 -38
- data/lib/twilio-ruby/rest/lookups.rb +2 -41
- data/lib/twilio-ruby/rest/lookups_base.rb +43 -0
- data/lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb +475 -0
- data/lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb +501 -0
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb +555 -0
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +252 -0
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on.rb +735 -0
- data/lib/twilio-ruby/rest/marketplace/v1/module_data.rb +342 -0
- data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +511 -0
- data/lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb +235 -0
- data/lib/twilio-ruby/rest/marketplace/v1.rb +91 -0
- data/lib/twilio-ruby/rest/marketplace.rb +6 -0
- data/lib/twilio-ruby/rest/marketplace_base.rb +38 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +231 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +568 -346
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +758 -443
- data/lib/twilio-ruby/rest/messaging/v1/deactivations.rb +337 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +483 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +469 -259
- data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +379 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_validate_dn.rb +344 -0
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +263 -142
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +380 -0
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +337 -0
- data/lib/twilio-ruby/rest/messaging/v1/request_managed_cert.rb +379 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +580 -335
- data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +594 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb +608 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +587 -341
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +587 -336
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +937 -521
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +222 -115
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +1149 -763
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +1517 -549
- data/lib/twilio-ruby/rest/messaging/v1/usecase.rb +209 -103
- data/lib/twilio-ruby/rest/messaging/v1.rb +217 -124
- data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +1002 -0
- data/lib/twilio-ruby/rest/messaging/v2/domain_certs.rb +386 -0
- data/lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb +237 -0
- data/lib/twilio-ruby/rest/messaging/v2.rb +70 -0
- data/lib/twilio-ruby/rest/messaging.rb +10 -35
- data/lib/twilio-ruby/rest/messaging_base.rb +43 -0
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +572 -395
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +561 -390
- data/lib/twilio-ruby/rest/monitor/v1.rb +57 -53
- data/lib/twilio-ruby/rest/monitor.rb +3 -34
- data/lib/twilio-ruby/rest/monitor_base.rb +38 -0
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +719 -408
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +694 -452
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +466 -362
- data/lib/twilio-ruby/rest/notify/v1/service.rb +971 -622
- data/lib/twilio-ruby/rest/notify/v1.rb +57 -55
- data/lib/twilio-ruby/rest/notify.rb +3 -34
- data/lib/twilio-ruby/rest/notify_base.rb +38 -0
- data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +411 -0
- data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +221 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_all_port_in.rb +367 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +616 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +485 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +405 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +242 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +301 -0
- data/lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb +395 -0
- data/lib/twilio-ruby/rest/numbers/v1/webhook.rb +252 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +161 -0
- data/lib/twilio-ruby/rest/numbers/v2/application.rb +562 -0
- data/lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb +440 -0
- data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +649 -0
- data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +442 -0
- data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +430 -0
- data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +915 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +405 -261
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +524 -298
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb +564 -309
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +294 -179
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +923 -607
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +667 -351
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +458 -266
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb +521 -307
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +695 -371
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +458 -266
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +241 -181
- data/lib/twilio-ruby/rest/numbers/v2.rb +108 -28
- data/lib/twilio-ruby/rest/numbers/v3/hosted_number_order.rb +484 -0
- data/lib/twilio-ruby/rest/numbers/v3.rb +40 -0
- data/lib/twilio-ruby/rest/numbers.rb +2 -34
- data/lib/twilio-ruby/rest/numbers_base.rb +48 -0
- data/lib/twilio-ruby/rest/oauth/v1/authorize.rb +253 -0
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +293 -149
- data/lib/twilio-ruby/rest/oauth/v1.rb +39 -56
- data/lib/twilio-ruby/rest/oauth/v2/authorize.rb +253 -0
- data/lib/twilio-ruby/rest/oauth/v2/token.rb +311 -0
- data/lib/twilio-ruby/rest/oauth/v2.rb +46 -0
- data/lib/twilio-ruby/rest/oauth.rb +3 -65
- data/lib/twilio-ruby/rest/oauth_base.rb +43 -0
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +469 -396
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +724 -446
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +960 -625
- data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +57 -55
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +468 -298
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +491 -309
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +548 -330
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +706 -398
- data/lib/twilio-ruby/rest/preview/marketplace.rb +57 -53
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +616 -364
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +743 -398
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +382 -205
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +833 -523
- data/lib/twilio-ruby/rest/preview/wireless.rb +72 -69
- data/lib/twilio-ruby/rest/preview.rb +10 -87
- data/lib/twilio-ruby/rest/preview_base.rb +48 -0
- data/lib/twilio-ruby/rest/preview_iam/v1/authorize.rb +253 -0
- data/lib/twilio-ruby/rest/preview_iam/v1/token.rb +301 -0
- data/lib/twilio-ruby/rest/preview_iam/v1.rb +46 -0
- data/lib/twilio-ruby/rest/preview_iam/versionless/organization/account.rb +468 -0
- data/lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb +559 -0
- data/lib/twilio-ruby/rest/preview_iam/versionless/organization/user.rb +768 -0
- data/lib/twilio-ruby/rest/preview_iam/versionless/organization.rb +413 -0
- data/lib/twilio-ruby/rest/preview_iam/versionless.rb +49 -0
- data/lib/twilio-ruby/rest/preview_iam.rb +9 -0
- data/lib/twilio-ruby/rest/preview_iam_base.rb +38 -0
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +465 -275
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +172 -120
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +458 -268
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +172 -120
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +465 -275
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +345 -179
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +185 -135
- data/lib/twilio-ruby/rest/pricing/v1.rb +45 -42
- data/lib/twilio-ruby/rest/pricing/v2/country.rb +457 -270
- data/lib/twilio-ruby/rest/pricing/v2/number.rb +379 -215
- data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +465 -275
- data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +367 -200
- data/lib/twilio-ruby/rest/pricing/v2/voice.rb +185 -138
- data/lib/twilio-ruby/rest/pricing/v2.rb +63 -65
- data/lib/twilio-ruby/rest/pricing.rb +6 -41
- data/lib/twilio-ruby/rest/pricing_base.rb +43 -0
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +693 -403
- data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +600 -418
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +640 -447
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +659 -440
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +811 -506
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +839 -596
- data/lib/twilio-ruby/rest/proxy/v1.rb +42 -38
- data/lib/twilio-ruby/rest/proxy.rb +2 -34
- data/lib/twilio-ruby/rest/proxy_base.rb +38 -0
- data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +444 -227
- data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +444 -223
- data/lib/twilio-ruby/rest/routes/v2/trunk.rb +444 -227
- data/lib/twilio-ruby/rest/routes/v2.rb +72 -69
- data/lib/twilio-ruby/rest/routes.rb +4 -34
- data/lib/twilio-ruby/rest/routes_base.rb +38 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +483 -323
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +680 -380
- data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +350 -208
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +645 -384
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +549 -338
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +535 -383
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +680 -396
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +688 -447
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +342 -210
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +510 -353
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +680 -380
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +803 -493
- data/lib/twilio-ruby/rest/serverless/v1.rb +42 -37
- data/lib/twilio-ruby/rest/serverless.rb +2 -34
- data/lib/twilio-ruby/rest/serverless_base.rb +38 -0
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb +350 -199
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb +342 -194
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +545 -355
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +659 -394
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb +350 -200
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb +342 -197
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +545 -361
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +748 -449
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +572 -355
- data/lib/twilio-ruby/rest/studio/v1.rb +42 -37
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +350 -200
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +342 -197
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +545 -361
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +741 -442
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +510 -320
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb +413 -0
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +804 -472
- data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +241 -109
- data/lib/twilio-ruby/rest/studio/v2.rb +48 -44
- data/lib/twilio-ruby/rest/studio.rb +3 -41
- data/lib/twilio-ruby/rest/studio_base.rb +43 -0
- data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +611 -362
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +757 -483
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +624 -406
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +474 -297
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +566 -332
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +624 -351
- data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +339 -237
- data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +311 -204
- data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +275 -174
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +725 -453
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +576 -361
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +410 -344
- data/lib/twilio-ruby/rest/supersim/v1.rb +144 -147
- data/lib/twilio-ruby/rest/supersim.rb +10 -34
- data/lib/twilio-ruby/rest/supersim_base.rb +38 -0
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +616 -371
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +736 -423
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +766 -490
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +616 -370
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +749 -445
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +772 -495
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +616 -368
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +749 -444
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +242 -132
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +692 -400
- data/lib/twilio-ruby/rest/sync/v1/service.rb +878 -567
- data/lib/twilio-ruby/rest/sync/v1.rb +42 -37
- data/lib/twilio-ruby/rest/sync.rb +2 -34
- data/lib/twilio-ruby/rest/sync_base.rb +38 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +682 -395
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +633 -464
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +1079 -749
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +985 -661
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +688 -382
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +258 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +522 -370
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +430 -276
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +410 -254
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +358 -276
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +882 -572
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +1053 -732
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +602 -388
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +394 -239
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +440 -266
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +364 -193
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +418 -234
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +927 -637
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +522 -376
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +395 -241
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +410 -262
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +822 -510
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +514 -356
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +379 -205
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +387 -219
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +1022 -730
- data/lib/twilio-ruby/rest/taskrouter/v1.rb +42 -37
- data/lib/twilio-ruby/rest/taskrouter.rb +2 -34
- data/lib/twilio-ruby/rest/taskrouter_base.rb +38 -0
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +573 -320
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +573 -317
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +734 -419
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +706 -451
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +391 -174
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +939 -630
- data/lib/twilio-ruby/rest/trunking/v1.rb +42 -38
- data/lib/twilio-ruby/rest/trunking.rb +2 -34
- data/lib/twilio-ruby/rest/trunking_base.rb +38 -0
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +440 -0
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +656 -0
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +474 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb +595 -352
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +574 -323
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb +540 -321
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +823 -513
- data/lib/twilio-ruby/rest/trusthub/v1/end_user.rb +659 -346
- data/lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb +450 -261
- data/lib/twilio-ruby/rest/trusthub/v1/policies.rb +443 -252
- data/lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb +673 -359
- data/lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb +450 -261
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb +595 -352
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +574 -323
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb +540 -321
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +823 -513
- data/lib/twilio-ruby/rest/trusthub/v1.rb +168 -139
- data/lib/twilio-ruby/rest/trusthub.rb +8 -34
- data/lib/twilio-ruby/rest/trusthub_base.rb +38 -0
- data/lib/twilio-ruby/rest/verify/v2/form.rb +334 -181
- data/lib/twilio-ruby/rest/verify/v2/safelist.rb +423 -205
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +463 -254
- data/lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb +402 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +275 -172
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +768 -530
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +705 -453
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +386 -271
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +653 -414
- data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +652 -363
- data/lib/twilio-ruby/rest/verify/v2/service/new_challenge.rb +478 -0
- data/lib/twilio-ruby/rest/verify/v2/service/new_factor.rb +387 -0
- data/lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb +357 -0
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +680 -388
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +693 -384
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +655 -366
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +320 -187
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +741 -412
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1360 -780
- data/lib/twilio-ruby/rest/verify/v2/template.rb +310 -203
- data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +556 -387
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +400 -224
- data/lib/twilio-ruby/rest/verify/v2.rb +99 -103
- data/lib/twilio-ruby/rest/verify.rb +7 -34
- data/lib/twilio-ruby/rest/verify_base.rb +38 -0
- data/lib/twilio-ruby/rest/video/v1/composition.rb +738 -507
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +854 -647
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +475 -261
- data/lib/twilio-ruby/rest/video/v1/recording.rb +631 -426
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +475 -261
- data/lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb +403 -0
- data/lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb +501 -0
- data/lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb +316 -0
- data/lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb +508 -0
- data/lib/twilio-ruby/rest/video/v1/room/participant.rb +714 -0
- data/lib/twilio-ruby/rest/video/v1/room/recording_rules.rb +303 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_recording.rb +624 -0
- data/lib/twilio-ruby/rest/video/v1/room/transcriptions.rb +648 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +938 -602
- data/lib/twilio-ruby/rest/video/v1.rb +99 -99
- data/lib/twilio-ruby/rest/video.rb +7 -34
- data/lib/twilio-ruby/rest/video_base.rb +38 -0
- data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +292 -174
- data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +822 -486
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +734 -434
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +658 -352
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +236 -121
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb +282 -181
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +553 -397
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +377 -173
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +187 -122
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +650 -339
- data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +630 -319
- data/lib/twilio-ruby/rest/voice/v1.rb +130 -117
- data/lib/twilio-ruby/rest/voice.rb +7 -34
- data/lib/twilio-ruby/rest/voice_base.rb +38 -0
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +663 -406
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +769 -436
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +387 -284
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +317 -226
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +925 -647
- data/lib/twilio-ruby/rest/wireless/v1/usage_record.rb +319 -219
- data/lib/twilio-ruby/rest/wireless/v1.rb +78 -76
- data/lib/twilio-ruby/rest/wireless.rb +5 -34
- data/lib/twilio-ruby/rest/wireless_base.rb +38 -0
- data/lib/twilio-ruby/rest.rb +1 -0
- data/lib/twilio-ruby/twiml/messaging_response.rb +1 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +481 -26
- data/lib/twilio-ruby/version.rb +1 -1
- data/sonar-project.properties +1 -1
- data/twilio-ruby.gemspec +3 -2
- metadata +238 -105
- data/conf/cacert.pem +0 -3376
- data/lib/twilio-ruby/framework/twilio_response.rb +0 -19
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +0 -500
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +0 -500
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +0 -500
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +0 -500
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +0 -500
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +0 -500
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +0 -500
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +0 -464
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +0 -301
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +0 -314
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +0 -348
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +0 -348
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +0 -163
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +0 -348
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +0 -137
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb +0 -220
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb +0 -214
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +0 -399
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +0 -418
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +0 -392
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +0 -469
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb +0 -218
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +0 -386
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +0 -456
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb +0 -255
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +0 -237
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +0 -507
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +0 -420
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -650
- data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +0 -194
- data/lib/twilio-ruby/rest/autopilot/v1.rb +0 -52
- data/lib/twilio-ruby/rest/autopilot.rb +0 -53
- data/lib/twilio-ruby/rest/events/v1/schema/version.rb +0 -290
- data/lib/twilio-ruby/rest/flex_api/v1/good_data.rb +0 -190
- data/lib/twilio-ruby/rest/flex_api/v1/user_roles.rb +0 -166
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +0 -321
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +0 -397
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +0 -399
- data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +0 -221
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +0 -403
- data/lib/twilio-ruby/rest/media/v1.rb +0 -76
- data/lib/twilio-ruby/rest/media.rb +0 -65
- data/lib/twilio-ruby/rest/messaging/v1/deactivation.rb +0 -164
- data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +0 -257
- data/lib/twilio-ruby/rest/microvisor/v1/app.rb +0 -305
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +0 -339
- data/lib/twilio-ruby/rest/microvisor/v1.rb +0 -60
- data/lib/twilio-ruby/rest/microvisor.rb +0 -54
- data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +0 -153
- data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +0 -162
- data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +0 -242
- data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +0 -193
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +0 -382
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +0 -365
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +0 -425
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +0 -376
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +0 -469
- data/lib/twilio-ruby/rest/preview/deployed_devices.rb +0 -45
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -385
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -406
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -418
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -385
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -405
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -415
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -385
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -405
- data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -462
- data/lib/twilio-ruby/rest/preview/sync.rb +0 -44
- data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb +0 -212
- data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb +0 -212
- data/lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb +0 -206
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +0 -386
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +0 -407
- data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +0 -380
- data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +0 -437
- data/lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb +0 -212
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb +0 -373
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb +0 -428
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb +0 -241
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +0 -225
- data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +0 -495
- data/lib/twilio-ruby/rest/preview/understand/assistant.rb +0 -629
- data/lib/twilio-ruby/rest/preview/understand.rb +0 -45
- data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +0 -377
- data/lib/twilio-ruby/rest/studio/v2/flow/test_user.rb +0 -199
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +0 -413
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb +0 -240
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb +0 -335
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +0 -175
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +0 -340
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +0 -499
- data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +0 -144
|
@@ -1,478 +1,757 @@
|
|
|
1
1
|
##
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
# |
|
|
5
|
-
#
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
6
6
|
#
|
|
7
|
-
#
|
|
7
|
+
# Twilio - Chat
|
|
8
|
+
# This is the public Twilio REST API.
|
|
9
|
+
#
|
|
10
|
+
# NOTE: This class is auto generated by OpenAPI Generator.
|
|
11
|
+
# https://openapi-generator.tech
|
|
12
|
+
# Do not edit the class manually.
|
|
13
|
+
#
|
|
14
|
+
|
|
8
15
|
|
|
9
16
|
module Twilio
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
17
|
+
module REST
|
|
18
|
+
class Chat < ChatBase
|
|
19
|
+
class V2 < Version
|
|
20
|
+
class ServiceContext < InstanceContext
|
|
21
|
+
class ChannelContext < InstanceContext
|
|
22
|
+
|
|
23
|
+
class WebhookList < ListResource
|
|
24
|
+
|
|
25
|
+
##
|
|
26
|
+
# Initialize the WebhookList
|
|
27
|
+
# @param [Version] version Version that contains the resource
|
|
28
|
+
# @return [WebhookList] WebhookList
|
|
29
|
+
def initialize(version, service_sid: nil, channel_sid: nil)
|
|
30
|
+
super(version)
|
|
31
|
+
|
|
32
|
+
# Path Solution
|
|
33
|
+
@solution = { service_sid: service_sid, channel_sid: channel_sid }
|
|
34
|
+
@uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Webhooks"
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
##
|
|
38
|
+
# Create the WebhookInstance
|
|
39
|
+
# @param [Type] type
|
|
40
|
+
# @param [String] configuration_url The URL of the webhook to call using the `configuration.method`.
|
|
41
|
+
# @param [Method] configuration_method
|
|
42
|
+
# @param [Array[String]] configuration_filters The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger).
|
|
43
|
+
# @param [Array[String]] configuration_triggers A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`.
|
|
44
|
+
# @param [String] configuration_flow_sid The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` is `studio`.
|
|
45
|
+
# @param [String] configuration_retry_count The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
|
|
46
|
+
# @return [WebhookInstance] Created WebhookInstance
|
|
47
|
+
def create(
|
|
48
|
+
type: nil,
|
|
49
|
+
configuration_url: :unset,
|
|
50
|
+
configuration_method: :unset,
|
|
51
|
+
configuration_filters: :unset,
|
|
52
|
+
configuration_triggers: :unset,
|
|
53
|
+
configuration_flow_sid: :unset,
|
|
54
|
+
configuration_retry_count: :unset
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
data = Twilio::Values.of({
|
|
58
|
+
'Type' => type,
|
|
59
|
+
'Configuration.Url' => configuration_url,
|
|
60
|
+
'Configuration.Method' => configuration_method,
|
|
61
|
+
'Configuration.Filters' => Twilio.serialize_list(configuration_filters) { |e| e },
|
|
62
|
+
'Configuration.Triggers' => Twilio.serialize_list(configuration_triggers) { |e| e },
|
|
63
|
+
'Configuration.FlowSid' => configuration_flow_sid,
|
|
64
|
+
'Configuration.RetryCount' => configuration_retry_count,
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
payload = @version.create('POST', @uri, data: data, headers: headers)
|
|
74
|
+
WebhookInstance.new(
|
|
75
|
+
@version,
|
|
76
|
+
payload,
|
|
77
|
+
service_sid: @solution[:service_sid],
|
|
78
|
+
channel_sid: @solution[:channel_sid],
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
##
|
|
83
|
+
# Create the WebhookInstanceMetadata
|
|
84
|
+
# @param [Type] type
|
|
85
|
+
# @param [String] configuration_url The URL of the webhook to call using the `configuration.method`.
|
|
86
|
+
# @param [Method] configuration_method
|
|
87
|
+
# @param [Array[String]] configuration_filters The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger).
|
|
88
|
+
# @param [Array[String]] configuration_triggers A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`.
|
|
89
|
+
# @param [String] configuration_flow_sid The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` is `studio`.
|
|
90
|
+
# @param [String] configuration_retry_count The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
|
|
91
|
+
# @return [WebhookInstance] Created WebhookInstance
|
|
92
|
+
def create_with_metadata(
|
|
93
|
+
type: nil,
|
|
94
|
+
configuration_url: :unset,
|
|
95
|
+
configuration_method: :unset,
|
|
96
|
+
configuration_filters: :unset,
|
|
97
|
+
configuration_triggers: :unset,
|
|
98
|
+
configuration_flow_sid: :unset,
|
|
99
|
+
configuration_retry_count: :unset
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
data = Twilio::Values.of({
|
|
103
|
+
'Type' => type,
|
|
104
|
+
'Configuration.Url' => configuration_url,
|
|
105
|
+
'Configuration.Method' => configuration_method,
|
|
106
|
+
'Configuration.Filters' => Twilio.serialize_list(configuration_filters) { |e| e },
|
|
107
|
+
'Configuration.Triggers' => Twilio.serialize_list(configuration_triggers) { |e| e },
|
|
108
|
+
'Configuration.FlowSid' => configuration_flow_sid,
|
|
109
|
+
'Configuration.RetryCount' => configuration_retry_count,
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
response = @version.create_with_metadata('POST', @uri, data: data, headers: headers)
|
|
119
|
+
webhook_instance = WebhookInstance.new(
|
|
120
|
+
@version,
|
|
121
|
+
response.body,
|
|
122
|
+
service_sid: @solution[:service_sid],
|
|
123
|
+
channel_sid: @solution[:channel_sid],
|
|
124
|
+
)
|
|
125
|
+
WebhookInstanceMetadata.new(
|
|
126
|
+
@version,
|
|
127
|
+
webhook_instance,
|
|
128
|
+
response.headers,
|
|
129
|
+
response.status_code
|
|
130
|
+
)
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
##
|
|
135
|
+
# Lists WebhookInstance records from the API as a list.
|
|
136
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
137
|
+
# memory before returning.
|
|
138
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
139
|
+
# guarantees to never return more than limit. Default is no limit
|
|
140
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
|
141
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
|
142
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
143
|
+
# efficient page size, i.e. min(limit, 1000)
|
|
144
|
+
# @return [Array] Array of up to limit results
|
|
145
|
+
def list(limit: nil, page_size: nil)
|
|
146
|
+
self.stream(
|
|
147
|
+
limit: limit,
|
|
148
|
+
page_size: page_size
|
|
149
|
+
).entries
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
##
|
|
153
|
+
# Streams Instance records from the API as an Enumerable.
|
|
154
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
|
155
|
+
# is reached.
|
|
156
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
157
|
+
# guarantees to never return more than limit. Default is no limit
|
|
158
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
|
159
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
|
160
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
161
|
+
# efficient page size, i.e. min(limit, 1000)
|
|
162
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
163
|
+
def stream(limit: nil, page_size: nil)
|
|
164
|
+
limits = @version.read_limits(limit, page_size)
|
|
165
|
+
|
|
166
|
+
page = self.page(
|
|
167
|
+
page_size: limits[:page_size], )
|
|
168
|
+
|
|
169
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
##
|
|
173
|
+
# Lists WebhookPageMetadata records from the API as a list.
|
|
174
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
175
|
+
# guarantees to never return more than limit. Default is no limit
|
|
176
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
|
177
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
|
178
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
179
|
+
# efficient page size, i.e. min(limit, 1000)
|
|
180
|
+
# @return [Array] Array of up to limit results
|
|
181
|
+
def list_with_metadata(limit: nil, page_size: nil)
|
|
182
|
+
limits = @version.read_limits(limit, page_size)
|
|
183
|
+
params = Twilio::Values.of({
|
|
184
|
+
|
|
185
|
+
'PageSize' => limits[:page_size],
|
|
186
|
+
});
|
|
187
|
+
headers = Twilio::Values.of({})
|
|
188
|
+
|
|
189
|
+
response = @version.page('GET', @uri, params: params, headers: headers)
|
|
190
|
+
|
|
191
|
+
WebhookPageMetadata.new(@version, response, @solution, limits[:limit])
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
##
|
|
195
|
+
# When passed a block, yields WebhookInstance records from the API.
|
|
196
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
|
197
|
+
# is reached.
|
|
198
|
+
def each
|
|
199
|
+
limits = @version.read_limits
|
|
200
|
+
|
|
201
|
+
page = self.page(page_size: limits[:page_size], )
|
|
202
|
+
|
|
203
|
+
@version.stream(page,
|
|
204
|
+
limit: limits[:limit],
|
|
205
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
##
|
|
209
|
+
# Retrieve a single page of WebhookInstance records from the API.
|
|
210
|
+
# Request is executed immediately.
|
|
211
|
+
# @param [String] page_token PageToken provided by the API
|
|
212
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
213
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
214
|
+
# @return [Page] Page of WebhookInstance
|
|
215
|
+
def page(page_token: :unset, page_number: :unset,page_size: :unset)
|
|
216
|
+
params = Twilio::Values.of({
|
|
217
|
+
'PageToken' => page_token,
|
|
218
|
+
'Page' => page_number,
|
|
219
|
+
'PageSize' => page_size,
|
|
220
|
+
})
|
|
221
|
+
headers = Twilio::Values.of({})
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
response = @version.page('GET', @uri, params: params, headers: headers)
|
|
226
|
+
|
|
227
|
+
WebhookPage.new(@version, response, @solution)
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
##
|
|
231
|
+
# Retrieve a single page of WebhookInstance records from the API.
|
|
232
|
+
# Request is executed immediately.
|
|
233
|
+
# @param [String] target_url API-generated URL for the requested results page
|
|
234
|
+
# @return [Page] Page of WebhookInstance
|
|
235
|
+
def get_page(target_url)
|
|
236
|
+
response = @version.domain.request(
|
|
237
|
+
'GET',
|
|
238
|
+
target_url
|
|
239
|
+
)
|
|
240
|
+
WebhookPage.new(@version, response, @solution)
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
# Provide a user friendly representation
|
|
246
|
+
def to_s
|
|
247
|
+
'#<Twilio.Chat.V2.WebhookList>'
|
|
248
|
+
end
|
|
249
|
+
end
|
|
166
250
|
|
|
167
|
-
class WebhookPage < Page
|
|
168
|
-
##
|
|
169
|
-
# Initialize the WebhookPage
|
|
170
|
-
# @param [Version] version Version that contains the resource
|
|
171
|
-
# @param [Response] response Response from the API
|
|
172
|
-
# @param [Hash] solution Path solution for the resource
|
|
173
|
-
# @return [WebhookPage] WebhookPage
|
|
174
|
-
def initialize(version, response, solution)
|
|
175
|
-
super(version, response)
|
|
176
|
-
|
|
177
|
-
# Path Solution
|
|
178
|
-
@solution = solution
|
|
179
|
-
end
|
|
180
|
-
|
|
181
|
-
##
|
|
182
|
-
# Build an instance of WebhookInstance
|
|
183
|
-
# @param [Hash] payload Payload response from the API
|
|
184
|
-
# @return [WebhookInstance] WebhookInstance
|
|
185
|
-
def get_instance(payload)
|
|
186
|
-
WebhookInstance.new(
|
|
187
|
-
@version,
|
|
188
|
-
payload,
|
|
189
|
-
service_sid: @solution[:service_sid],
|
|
190
|
-
channel_sid: @solution[:channel_sid],
|
|
191
|
-
)
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
##
|
|
195
|
-
# Provide a user friendly representation
|
|
196
|
-
def to_s
|
|
197
|
-
'<Twilio.Chat.V2.WebhookPage>'
|
|
198
|
-
end
|
|
199
|
-
end
|
|
200
251
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
252
|
+
class WebhookContext < InstanceContext
|
|
253
|
+
##
|
|
254
|
+
# Initialize the WebhookContext
|
|
255
|
+
# @param [Version] version Version that contains the resource
|
|
256
|
+
# @param [String] service_sid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel that has the Webhook resource to update.
|
|
257
|
+
# @param [String] channel_sid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to update belongs to. This value can be the Channel resource's `sid` or `unique_name`.
|
|
258
|
+
# @param [String] sid The SID of the Channel Webhook resource to update.
|
|
259
|
+
# @return [WebhookContext] WebhookContext
|
|
260
|
+
def initialize(version, service_sid, channel_sid, sid)
|
|
261
|
+
super(version)
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
# Path Solution
|
|
265
|
+
@solution = { service_sid: service_sid, channel_sid: channel_sid, sid: sid, }
|
|
266
|
+
@uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Webhooks/#{@solution[:sid]}"
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
end
|
|
270
|
+
##
|
|
271
|
+
# Delete the WebhookInstance
|
|
272
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
|
273
|
+
def delete
|
|
274
|
+
|
|
275
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
@version.delete('DELETE', @uri, headers: headers)
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
##
|
|
284
|
+
# Delete the WebhookInstanceMetadata
|
|
285
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
|
286
|
+
def delete_with_metadata
|
|
287
|
+
|
|
288
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
response = @version.delete_with_metadata('DELETE', @uri, headers: headers)
|
|
293
|
+
webhook_instance = WebhookInstance.new(
|
|
294
|
+
@version,
|
|
295
|
+
response.body,
|
|
296
|
+
account_sid: @solution[:account_sid],
|
|
297
|
+
sid: @solution[:sid],
|
|
298
|
+
)
|
|
299
|
+
WebhookInstanceMetadata.new(@version, webhook_instance, response.headers, response.status_code)
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
##
|
|
303
|
+
# Fetch the WebhookInstance
|
|
304
|
+
# @return [WebhookInstance] Fetched WebhookInstance
|
|
305
|
+
def fetch
|
|
306
|
+
|
|
307
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
|
314
|
+
WebhookInstance.new(
|
|
315
|
+
@version,
|
|
316
|
+
payload,
|
|
317
|
+
service_sid: @solution[:service_sid],
|
|
318
|
+
channel_sid: @solution[:channel_sid],
|
|
319
|
+
sid: @solution[:sid],
|
|
320
|
+
)
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
##
|
|
324
|
+
# Fetch the WebhookInstanceMetadata
|
|
325
|
+
# @return [WebhookInstance] Fetched WebhookInstance
|
|
326
|
+
def fetch_with_metadata
|
|
327
|
+
|
|
328
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
response = @version.fetch_with_metadata('GET', @uri, headers: headers)
|
|
335
|
+
webhook_instance = WebhookInstance.new(
|
|
336
|
+
@version,
|
|
337
|
+
response.body,
|
|
338
|
+
service_sid: @solution[:service_sid],
|
|
339
|
+
channel_sid: @solution[:channel_sid],
|
|
340
|
+
sid: @solution[:sid],
|
|
341
|
+
)
|
|
342
|
+
WebhookInstanceMetadata.new(
|
|
343
|
+
@version,
|
|
344
|
+
webhook_instance,
|
|
345
|
+
response.headers,
|
|
346
|
+
response.status_code
|
|
347
|
+
)
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
##
|
|
351
|
+
# Update the WebhookInstance
|
|
352
|
+
# @param [String] configuration_url The URL of the webhook to call using the `configuration.method`.
|
|
353
|
+
# @param [Method] configuration_method
|
|
354
|
+
# @param [Array[String]] configuration_filters The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger).
|
|
355
|
+
# @param [Array[String]] configuration_triggers A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`.
|
|
356
|
+
# @param [String] configuration_flow_sid The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`.
|
|
357
|
+
# @param [String] configuration_retry_count The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
|
|
358
|
+
# @return [WebhookInstance] Updated WebhookInstance
|
|
359
|
+
def update(
|
|
360
|
+
configuration_url: :unset,
|
|
361
|
+
configuration_method: :unset,
|
|
362
|
+
configuration_filters: :unset,
|
|
363
|
+
configuration_triggers: :unset,
|
|
364
|
+
configuration_flow_sid: :unset,
|
|
365
|
+
configuration_retry_count: :unset
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
data = Twilio::Values.of({
|
|
369
|
+
'Configuration.Url' => configuration_url,
|
|
370
|
+
'Configuration.Method' => configuration_method,
|
|
371
|
+
'Configuration.Filters' => Twilio.serialize_list(configuration_filters) { |e| e },
|
|
372
|
+
'Configuration.Triggers' => Twilio.serialize_list(configuration_triggers) { |e| e },
|
|
373
|
+
'Configuration.FlowSid' => configuration_flow_sid,
|
|
374
|
+
'Configuration.RetryCount' => configuration_retry_count,
|
|
375
|
+
})
|
|
376
|
+
|
|
377
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
payload = @version.update('POST', @uri, data: data, headers: headers)
|
|
384
|
+
WebhookInstance.new(
|
|
385
|
+
@version,
|
|
386
|
+
payload,
|
|
387
|
+
service_sid: @solution[:service_sid],
|
|
388
|
+
channel_sid: @solution[:channel_sid],
|
|
389
|
+
sid: @solution[:sid],
|
|
390
|
+
)
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
##
|
|
394
|
+
# Update the WebhookInstanceMetadata
|
|
395
|
+
# @param [String] configuration_url The URL of the webhook to call using the `configuration.method`.
|
|
396
|
+
# @param [Method] configuration_method
|
|
397
|
+
# @param [Array[String]] configuration_filters The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger).
|
|
398
|
+
# @param [Array[String]] configuration_triggers A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`.
|
|
399
|
+
# @param [String] configuration_flow_sid The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`.
|
|
400
|
+
# @param [String] configuration_retry_count The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
|
|
401
|
+
# @return [WebhookInstance] Updated WebhookInstance
|
|
402
|
+
def update_with_metadata(
|
|
403
|
+
configuration_url: :unset,
|
|
404
|
+
configuration_method: :unset,
|
|
405
|
+
configuration_filters: :unset,
|
|
406
|
+
configuration_triggers: :unset,
|
|
407
|
+
configuration_flow_sid: :unset,
|
|
408
|
+
configuration_retry_count: :unset
|
|
409
|
+
)
|
|
410
|
+
|
|
411
|
+
data = Twilio::Values.of({
|
|
412
|
+
'Configuration.Url' => configuration_url,
|
|
413
|
+
'Configuration.Method' => configuration_method,
|
|
414
|
+
'Configuration.Filters' => Twilio.serialize_list(configuration_filters) { |e| e },
|
|
415
|
+
'Configuration.Triggers' => Twilio.serialize_list(configuration_triggers) { |e| e },
|
|
416
|
+
'Configuration.FlowSid' => configuration_flow_sid,
|
|
417
|
+
'Configuration.RetryCount' => configuration_retry_count,
|
|
418
|
+
})
|
|
419
|
+
|
|
420
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
response = @version.update_with_metadata('POST', @uri, data: data, headers: headers)
|
|
427
|
+
webhook_instance = WebhookInstance.new(
|
|
428
|
+
@version,
|
|
429
|
+
response.body,
|
|
430
|
+
service_sid: @solution[:service_sid],
|
|
431
|
+
channel_sid: @solution[:channel_sid],
|
|
432
|
+
sid: @solution[:sid],
|
|
433
|
+
)
|
|
434
|
+
WebhookInstanceMetadata.new(
|
|
435
|
+
@version,
|
|
436
|
+
webhook_instance,
|
|
437
|
+
response.headers,
|
|
438
|
+
response.status_code
|
|
439
|
+
)
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
##
|
|
444
|
+
# Provide a user friendly representation
|
|
445
|
+
def to_s
|
|
446
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
|
447
|
+
"#<Twilio.Chat.V2.WebhookContext #{context}>"
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
##
|
|
451
|
+
# Provide a detailed, user friendly representation
|
|
452
|
+
def inspect
|
|
453
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
|
454
|
+
"#<Twilio.Chat.V2.WebhookContext #{context}>"
|
|
455
|
+
end
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
class WebhookInstanceMetadata < InstanceResourceMetadata
|
|
459
|
+
##
|
|
460
|
+
# Initializes a new WebhookInstanceMetadata.
|
|
461
|
+
# @param [Version] version Version that contains the resource
|
|
462
|
+
# @param [}WebhookInstance] webhook_instance The instance associated with the metadata.
|
|
463
|
+
# @param [Hash] headers Header object with response headers.
|
|
464
|
+
# @param [Integer] status_code The HTTP status code of the response.
|
|
465
|
+
# @return [WebhookInstanceMetadata] The initialized instance with metadata.
|
|
466
|
+
def initialize(version, webhook_instance, headers, status_code)
|
|
467
|
+
super(version, headers, status_code)
|
|
468
|
+
@webhook_instance = webhook_instance
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
def webhook
|
|
472
|
+
@webhook_instance
|
|
473
|
+
end
|
|
474
|
+
|
|
475
|
+
def headers
|
|
476
|
+
@headers
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
def status_code
|
|
480
|
+
@status_code
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
def to_s
|
|
484
|
+
"<Twilio.Api.V2010.WebhookInstanceMetadata status=#{@status_code}>"
|
|
485
|
+
end
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
class WebhookListResponse < InstanceListResource
|
|
489
|
+
# @param [Array<WebhookInstance>] instance
|
|
490
|
+
# @param [Hash{String => Object}] headers
|
|
491
|
+
# @param [Integer] status_code
|
|
492
|
+
def initialize(version, payload, key)
|
|
493
|
+
@webhook_instance = payload.body[key].map do |data|
|
|
494
|
+
WebhookInstance.new(version, data)
|
|
495
|
+
end
|
|
496
|
+
@headers = payload.headers
|
|
497
|
+
@status_code = payload.status_code
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
def webhook_instance
|
|
501
|
+
@instance
|
|
502
|
+
end
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
class WebhookPage < Page
|
|
506
|
+
##
|
|
507
|
+
# Initialize the WebhookPage
|
|
508
|
+
# @param [Version] version Version that contains the resource
|
|
509
|
+
# @param [Response] response Response from the API
|
|
510
|
+
# @param [Hash] solution Path solution for the resource
|
|
511
|
+
# @return [WebhookPage] WebhookPage
|
|
512
|
+
def initialize(version, response, solution)
|
|
513
|
+
super(version, response)
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
# Path Solution
|
|
517
|
+
@solution = solution
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
##
|
|
521
|
+
# Build an instance of WebhookInstance
|
|
522
|
+
# @param [Hash] payload Payload response from the API
|
|
523
|
+
# @return [WebhookInstance] WebhookInstance
|
|
524
|
+
def get_instance(payload)
|
|
525
|
+
WebhookInstance.new(@version, payload, service_sid: @solution[:service_sid], channel_sid: @solution[:channel_sid])
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
##
|
|
529
|
+
# Provide a user friendly representation
|
|
530
|
+
def to_s
|
|
531
|
+
'<Twilio.Chat.V2.WebhookPage>'
|
|
532
|
+
end
|
|
533
|
+
end
|
|
302
534
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
# Context
|
|
333
|
-
@instance_context = nil
|
|
334
|
-
@params = {
|
|
335
|
-
'service_sid' => service_sid,
|
|
336
|
-
'channel_sid' => channel_sid,
|
|
337
|
-
'sid' => sid || @properties['sid'],
|
|
338
|
-
}
|
|
339
|
-
end
|
|
340
|
-
|
|
341
|
-
##
|
|
342
|
-
# Generate an instance context for the instance, the context is capable of
|
|
343
|
-
# performing various actions. All instance actions are proxied to the context
|
|
344
|
-
# @return [WebhookContext] WebhookContext for this WebhookInstance
|
|
345
|
-
def context
|
|
346
|
-
unless @instance_context
|
|
347
|
-
@instance_context = WebhookContext.new(
|
|
348
|
-
@version,
|
|
349
|
-
@params['service_sid'],
|
|
350
|
-
@params['channel_sid'],
|
|
351
|
-
@params['sid'],
|
|
352
|
-
)
|
|
535
|
+
class WebhookPageMetadata < PageMetadata
|
|
536
|
+
attr_reader :webhook_page
|
|
537
|
+
|
|
538
|
+
def initialize(version, response, solution, limit)
|
|
539
|
+
super(version, response)
|
|
540
|
+
@webhook_page = []
|
|
541
|
+
@limit = limit
|
|
542
|
+
key = get_key(response.body)
|
|
543
|
+
records = 0
|
|
544
|
+
while( limit != :unset && records < limit )
|
|
545
|
+
@webhook_page << WebhookListResponse.new(version, @payload, key, limit - records)
|
|
546
|
+
@payload = self.next_page
|
|
547
|
+
break unless @payload
|
|
548
|
+
records += @payload.body[key].size
|
|
549
|
+
end
|
|
550
|
+
# Path Solution
|
|
551
|
+
@solution = solution
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
def each
|
|
555
|
+
@webhook_page.each do |record|
|
|
556
|
+
yield record
|
|
557
|
+
end
|
|
558
|
+
end
|
|
559
|
+
|
|
560
|
+
def to_s
|
|
561
|
+
'<Twilio::REST::Chat::V2PageMetadata>';
|
|
562
|
+
end
|
|
353
563
|
end
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
564
|
+
class WebhookListResponse < InstanceListResource
|
|
565
|
+
|
|
566
|
+
# @param [Array<WebhookInstance>] instance
|
|
567
|
+
# @param [Hash{String => Object}] headers
|
|
568
|
+
# @param [Integer] status_code
|
|
569
|
+
def initialize(version, payload, key, limit = :unset)
|
|
570
|
+
data_list = payload.body[key]
|
|
571
|
+
if limit != :unset
|
|
572
|
+
data_list = data_list[0, limit]
|
|
573
|
+
end
|
|
574
|
+
@webhook = data_list.map do |data|
|
|
575
|
+
WebhookInstance.new(version, data)
|
|
576
|
+
end
|
|
577
|
+
@headers = payload.headers
|
|
578
|
+
@status_code = payload.status_code
|
|
579
|
+
end
|
|
580
|
+
|
|
581
|
+
def webhook
|
|
582
|
+
@webhook
|
|
583
|
+
end
|
|
584
|
+
|
|
585
|
+
def headers
|
|
586
|
+
@headers
|
|
587
|
+
end
|
|
588
|
+
|
|
589
|
+
def status_code
|
|
590
|
+
@status_code
|
|
591
|
+
end
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
class WebhookInstance < InstanceResource
|
|
595
|
+
##
|
|
596
|
+
# Initialize the WebhookInstance
|
|
597
|
+
# @param [Version] version Version that contains the resource
|
|
598
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
599
|
+
# @param [String] account_sid The SID of the
|
|
600
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Webhook
|
|
601
|
+
# resource.
|
|
602
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
|
603
|
+
# @return [WebhookInstance] WebhookInstance
|
|
604
|
+
def initialize(version, payload , service_sid: nil, channel_sid: nil, sid: nil)
|
|
605
|
+
super(version)
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
# Marshaled Properties
|
|
609
|
+
@properties = {
|
|
610
|
+
'sid' => payload['sid'],
|
|
611
|
+
'account_sid' => payload['account_sid'],
|
|
612
|
+
'service_sid' => payload['service_sid'],
|
|
613
|
+
'channel_sid' => payload['channel_sid'],
|
|
614
|
+
'type' => payload['type'],
|
|
615
|
+
'url' => payload['url'],
|
|
616
|
+
'configuration' => payload['configuration'],
|
|
617
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
618
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
# Context
|
|
622
|
+
@instance_context = nil
|
|
623
|
+
@params = { 'service_sid' => service_sid || @properties['service_sid'] ,'channel_sid' => channel_sid || @properties['channel_sid'] ,'sid' => sid || @properties['sid'] , }
|
|
624
|
+
end
|
|
625
|
+
|
|
626
|
+
##
|
|
627
|
+
# Generate an instance context for the instance, the context is capable of
|
|
628
|
+
# performing various actions. All instance actions are proxied to the context
|
|
629
|
+
# @return [WebhookContext] CallContext for this CallInstance
|
|
630
|
+
def context
|
|
631
|
+
unless @instance_context
|
|
632
|
+
@instance_context = WebhookContext.new(@version , @params['service_sid'], @params['channel_sid'], @params['sid'])
|
|
633
|
+
end
|
|
634
|
+
@instance_context
|
|
635
|
+
end
|
|
636
|
+
|
|
637
|
+
##
|
|
638
|
+
# @return [String] The unique string that we created to identify the Channel Webhook resource.
|
|
639
|
+
def sid
|
|
640
|
+
@properties['sid']
|
|
641
|
+
end
|
|
642
|
+
|
|
643
|
+
##
|
|
644
|
+
# @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Channel Webhook resource.
|
|
645
|
+
def account_sid
|
|
646
|
+
@properties['account_sid']
|
|
647
|
+
end
|
|
648
|
+
|
|
649
|
+
##
|
|
650
|
+
# @return [String] The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) the Channel Webhook resource is associated with.
|
|
651
|
+
def service_sid
|
|
652
|
+
@properties['service_sid']
|
|
653
|
+
end
|
|
654
|
+
|
|
655
|
+
##
|
|
656
|
+
# @return [String] The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource belongs to.
|
|
657
|
+
def channel_sid
|
|
658
|
+
@properties['channel_sid']
|
|
659
|
+
end
|
|
660
|
+
|
|
661
|
+
##
|
|
662
|
+
# @return [String] The type of webhook. Can be: `webhook`, `studio`, or `trigger`.
|
|
663
|
+
def type
|
|
664
|
+
@properties['type']
|
|
665
|
+
end
|
|
666
|
+
|
|
667
|
+
##
|
|
668
|
+
# @return [String] The absolute URL of the Channel Webhook resource.
|
|
669
|
+
def url
|
|
670
|
+
@properties['url']
|
|
671
|
+
end
|
|
672
|
+
|
|
673
|
+
##
|
|
674
|
+
# @return [Hash] The JSON string that describes how the channel webhook is configured. The configuration object contains the `url`, `method`, `filters`, and `retry_count` values that are configured by the create and update actions.
|
|
675
|
+
def configuration
|
|
676
|
+
@properties['configuration']
|
|
677
|
+
end
|
|
678
|
+
|
|
679
|
+
##
|
|
680
|
+
# @return [Time] The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
681
|
+
def date_created
|
|
682
|
+
@properties['date_created']
|
|
683
|
+
end
|
|
684
|
+
|
|
685
|
+
##
|
|
686
|
+
# @return [Time] The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
687
|
+
def date_updated
|
|
688
|
+
@properties['date_updated']
|
|
689
|
+
end
|
|
690
|
+
|
|
691
|
+
##
|
|
692
|
+
# Delete the WebhookInstance
|
|
693
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
|
694
|
+
def delete
|
|
695
|
+
|
|
696
|
+
context.delete
|
|
697
|
+
end
|
|
698
|
+
|
|
699
|
+
##
|
|
700
|
+
# Fetch the WebhookInstance
|
|
701
|
+
# @return [WebhookInstance] Fetched WebhookInstance
|
|
702
|
+
def fetch
|
|
703
|
+
|
|
704
|
+
context.fetch
|
|
705
|
+
end
|
|
706
|
+
|
|
707
|
+
##
|
|
708
|
+
# Update the WebhookInstance
|
|
709
|
+
# @param [String] configuration_url The URL of the webhook to call using the `configuration.method`.
|
|
710
|
+
# @param [Method] configuration_method
|
|
711
|
+
# @param [Array[String]] configuration_filters The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger).
|
|
712
|
+
# @param [Array[String]] configuration_triggers A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`.
|
|
713
|
+
# @param [String] configuration_flow_sid The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`.
|
|
714
|
+
# @param [String] configuration_retry_count The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
|
|
715
|
+
# @return [WebhookInstance] Updated WebhookInstance
|
|
716
|
+
def update(
|
|
717
|
+
configuration_url: :unset,
|
|
718
|
+
configuration_method: :unset,
|
|
719
|
+
configuration_filters: :unset,
|
|
720
|
+
configuration_triggers: :unset,
|
|
721
|
+
configuration_flow_sid: :unset,
|
|
722
|
+
configuration_retry_count: :unset
|
|
723
|
+
)
|
|
724
|
+
|
|
725
|
+
context.update(
|
|
726
|
+
configuration_url: configuration_url,
|
|
727
|
+
configuration_method: configuration_method,
|
|
728
|
+
configuration_filters: configuration_filters,
|
|
729
|
+
configuration_triggers: configuration_triggers,
|
|
730
|
+
configuration_flow_sid: configuration_flow_sid,
|
|
731
|
+
configuration_retry_count: configuration_retry_count,
|
|
732
|
+
)
|
|
733
|
+
end
|
|
734
|
+
|
|
735
|
+
##
|
|
736
|
+
# Provide a user friendly representation
|
|
737
|
+
def to_s
|
|
738
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
739
|
+
"<Twilio.Chat.V2.WebhookInstance #{values}>"
|
|
740
|
+
end
|
|
741
|
+
|
|
742
|
+
##
|
|
743
|
+
# Provide a detailed, user friendly representation
|
|
744
|
+
def inspect
|
|
745
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
746
|
+
"<Twilio.Chat.V2.WebhookInstance #{values}>"
|
|
747
|
+
end
|
|
748
|
+
end
|
|
749
|
+
|
|
750
|
+
end
|
|
751
|
+
end
|
|
472
752
|
end
|
|
473
|
-
end
|
|
474
753
|
end
|
|
475
|
-
end
|
|
476
754
|
end
|
|
477
|
-
|
|
478
|
-
|
|
755
|
+
end
|
|
756
|
+
|
|
757
|
+
|