twilio-ruby 5.61.2 → 6.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/pr-lint.yml +21 -0
- data/.github/workflows/test-and-deploy.yml +139 -0
- data/.gitignore +3 -0
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +84 -21
- data/CHANGES.md +893 -1
- data/CONTRIBUTING.md +11 -9
- data/LICENSE +1 -1
- data/Makefile +13 -8
- data/PULL_REQUEST_TEMPLATE.md +1 -1
- data/README.md +136 -44
- data/UPGRADE.md +10 -0
- data/advanced-examples/custom-http-client.md +170 -0
- data/cluster_spec.rb +77 -0
- data/lib/rack/twilio_webhook_authentication.rb +25 -1
- data/lib/twilio-ruby/base/client_base.rb +121 -0
- data/lib/twilio-ruby/framework/rest/error.rb +0 -12
- data/lib/twilio-ruby/http/http_client.rb +11 -6
- data/lib/twilio-ruby/jwt/access_token.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +198 -178
- data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +371 -332
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +371 -332
- data/lib/twilio-ruby/rest/accounts/v1/credential.rb +121 -114
- data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +169 -0
- data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +214 -192
- data/lib/twilio-ruby/rest/accounts/v1.rb +51 -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 +370 -365
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +551 -514
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +615 -586
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +313 -320
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/local.rb +394 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/machine_to_machine.rb +394 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb +394 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/national.rb +394 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/shared_cost.rb +394 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb +394 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/voip.rb +394 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +432 -0
- data/lib/twilio-ruby/rest/api/v2010/account/balance.rb +136 -118
- data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +202 -194
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +252 -289
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +317 -303
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +400 -417
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +291 -342
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +494 -511
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +839 -634
- data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +872 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +163 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +239 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +952 -972
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +652 -717
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +451 -458
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +489 -493
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +426 -407
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +321 -351
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +398 -418
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +536 -554
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +536 -553
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +536 -553
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +841 -903
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +335 -302
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +167 -166
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +340 -350
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +615 -612
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +157 -138
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +157 -138
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +400 -399
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +368 -358
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +340 -338
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +426 -390
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +358 -380
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +368 -385
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +364 -372
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +507 -486
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +417 -408
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +335 -306
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +375 -368
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +399 -373
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_credential_list_mapping.rb +346 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/{auth_calls_mapping → auth_type_calls}/auth_calls_ip_access_control_list_mapping.rb +193 -195
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls.rb +140 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/{auth_registrations_mapping → auth_type_registrations}/auth_registrations_credential_list_mapping.rb +193 -195
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations.rb +126 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +94 -103
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +339 -339
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +339 -338
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +649 -645
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +412 -421
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +399 -374
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +141 -150
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +171 -154
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +364 -350
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +314 -339
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +314 -339
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +314 -339
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +314 -339
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +314 -339
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +314 -339
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +314 -339
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +314 -339
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +381 -416
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +485 -484
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +112 -104
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +172 -161
- data/lib/twilio-ruby/rest/api/v2010/account.rb +979 -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/bulkexports/v1/export/day.rb +299 -279
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +298 -279
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +271 -248
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +246 -235
- data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +245 -218
- 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 +419 -403
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +374 -391
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +422 -440
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +438 -437
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +534 -515
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +396 -367
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +244 -239
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +465 -440
- data/lib/twilio-ruby/rest/chat/v1/service.rb +861 -894
- data/lib/twilio-ruby/rest/chat/v1.rb +57 -55
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +419 -401
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +371 -370
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +374 -386
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +486 -527
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +513 -533
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +440 -467
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +606 -605
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +396 -369
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +364 -381
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +406 -413
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +509 -491
- data/lib/twilio-ruby/rest/chat/v2/service.rb +764 -778
- data/lib/twilio-ruby/rest/chat/v2.rb +57 -53
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +297 -0
- data/lib/twilio-ruby/rest/chat/v3.rb +71 -0
- data/lib/twilio-ruby/rest/chat.rb +10 -38
- data/lib/twilio-ruby/rest/chat_base.rb +48 -0
- data/lib/twilio-ruby/rest/client.rb +318 -561
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +208 -0
- data/lib/twilio-ruby/rest/content/v1/content.rb +363 -0
- data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +251 -0
- data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +265 -0
- data/lib/twilio-ruby/rest/content/v1.rb +61 -0
- data/lib/twilio-ruby/rest/content.rb +15 -0
- data/lib/twilio-ruby/rest/content_base.rb +38 -0
- data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +482 -0
- data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +254 -227
- data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +279 -252
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +334 -344
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +537 -495
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +498 -495
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +425 -403
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +620 -552
- data/lib/twilio-ruby/rest/conversations/v1/credential.rb +425 -409
- data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +304 -304
- data/lib/twilio-ruby/rest/conversations/v1/role.rb +384 -356
- data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +364 -373
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +300 -289
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +246 -235
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +307 -279
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +341 -371
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +544 -535
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +507 -530
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +434 -438
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +632 -588
- data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +310 -317
- data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +396 -380
- data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +446 -455
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +484 -474
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +476 -447
- data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +445 -435
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +472 -441
- data/lib/twilio-ruby/rest/conversations/v1.rb +129 -119
- data/lib/twilio-ruby/rest/conversations.rb +18 -34
- data/lib/twilio-ruby/rest/conversations_base.rb +38 -0
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +302 -288
- data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +299 -0
- data/lib/twilio-ruby/rest/events/v1/schema.rb +227 -218
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +114 -100
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +120 -103
- data/lib/twilio-ruby/rest/events/v1/sink.rb +434 -408
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +365 -339
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +416 -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 +448 -0
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +365 -330
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +510 -475
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +563 -555
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +327 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +228 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +442 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +358 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +443 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +361 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +217 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +155 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +141 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +196 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +251 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +339 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +406 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +267 -0
- data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +187 -0
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +378 -331
- data/lib/twilio-ruby/rest/flex_api/v1.rb +201 -76
- data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +146 -0
- data/lib/twilio-ruby/rest/flex_api/v2.rb +40 -0
- data/lib/twilio-ruby/rest/flex_api.rb +33 -31
- data/lib/twilio-ruby/rest/flex_api_base.rb +43 -0
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +244 -227
- 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/insights/v1/call/annotation.rb +319 -0
- data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +350 -0
- data/lib/twilio-ruby/rest/insights/v1/call/event.rb +269 -255
- data/lib/twilio-ruby/rest/insights/v1/call/metric.rb +241 -225
- data/lib/twilio-ruby/rest/insights/v1/call.rb +260 -228
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +485 -426
- data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +488 -0
- data/lib/twilio-ruby/rest/insights/v1/conference.rb +505 -0
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +378 -371
- data/lib/twilio-ruby/rest/insights/v1/room.rb +490 -489
- data/lib/twilio-ruby/rest/insights/v1/setting.rb +254 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +84 -60
- data/lib/twilio-ruby/rest/insights.rb +17 -31
- data/lib/twilio-ruby/rest/insights_base.rb +38 -0
- data/lib/twilio-ruby/rest/intelligence/v2/service.rb +510 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +226 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +388 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb +248 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +520 -0
- data/lib/twilio-ruby/rest/intelligence/v2.rb +64 -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 +419 -364
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +374 -359
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +422 -397
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +438 -409
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +534 -488
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +396 -347
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +244 -233
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +465 -418
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +861 -779
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +57 -53
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +419 -364
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +371 -343
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +374 -359
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +486 -451
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +513 -479
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +440 -411
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +606 -555
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +396 -347
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +364 -351
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +397 -384
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +509 -467
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +764 -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/lookups/v1/phone_number.rb +243 -239
- data/lib/twilio-ruby/rest/lookups/v1.rb +42 -39
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +370 -0
- data/lib/twilio-ruby/rest/lookups/v2.rb +49 -0
- data/lib/twilio-ruby/rest/lookups.rb +2 -34
- data/lib/twilio-ruby/rest/lookups_base.rb +43 -0
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +410 -374
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +404 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +245 -214
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +422 -380
- data/lib/twilio-ruby/rest/media/v1.rb +72 -53
- data/lib/twilio-ruby/rest/media.rb +13 -34
- data/lib/twilio-ruby/rest/media_base.rb +38 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +136 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +358 -346
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +487 -420
- data/lib/twilio-ruby/rest/messaging/v1/deactivations.rb +189 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +280 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +289 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +238 -0
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +155 -144
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +214 -0
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +196 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +351 -335
- data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +329 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +358 -341
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +358 -336
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +506 -426
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +121 -115
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +767 -763
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +777 -0
- data/lib/twilio-ruby/rest/messaging/v1/usecase.rb +106 -94
- data/lib/twilio-ruby/rest/messaging/v1.rb +187 -74
- data/lib/twilio-ruby/rest/messaging.rb +36 -35
- data/lib/twilio-ruby/rest/messaging_base.rb +38 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +358 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +351 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +208 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app.rb +349 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +374 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +367 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +427 -0
- data/lib/twilio-ruby/rest/microvisor/v1.rb +94 -0
- data/lib/twilio-ruby/rest/microvisor.rb +24 -0
- data/lib/twilio-ruby/rest/microvisor_base.rb +38 -0
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +398 -395
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +381 -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 +421 -408
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +437 -452
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +313 -362
- data/lib/twilio-ruby/rest/notify/v1/service.rb +626 -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 +224 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb +229 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +245 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +263 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +94 -0
- data/lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb +343 -0
- data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +403 -0
- data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +249 -0
- data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +502 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +276 -179
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +324 -298
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb +333 -309
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +194 -181
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +601 -550
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +391 -351
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +290 -266
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb +322 -307
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +412 -364
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +290 -266
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +177 -181
- data/lib/twilio-ruby/rest/numbers/v2.rb +78 -28
- data/lib/twilio-ruby/rest/numbers.rb +2 -34
- data/lib/twilio-ruby/rest/numbers_base.rb +43 -0
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +410 -375
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +394 -358
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +449 -418
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +407 -369
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +494 -459
- data/lib/twilio-ruby/rest/preview/deployed_devices.rb +42 -38
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +370 -396
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +446 -446
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +610 -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 +301 -298
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +325 -309
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +342 -330
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +429 -398
- data/lib/twilio-ruby/rest/preview/marketplace.rb +57 -53
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +378 -374
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +442 -399
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +434 -407
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +378 -374
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +419 -398
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +437 -404
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +378 -374
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +419 -398
- data/lib/twilio-ruby/rest/preview/sync/service.rb +495 -452
- data/lib/twilio-ruby/rest/preview/sync.rb +42 -37
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +387 -364
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +448 -398
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +232 -205
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +574 -523
- data/lib/twilio-ruby/rest/preview/wireless.rb +72 -69
- data/lib/twilio-ruby/rest/preview.rb +11 -137
- data/lib/twilio-ruby/rest/preview_base.rb +58 -0
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +297 -275
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +107 -119
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +290 -268
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +107 -119
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +297 -275
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +220 -197
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +121 -135
- data/lib/twilio-ruby/rest/pricing/v1.rb +45 -42
- data/lib/twilio-ruby/rest/pricing/v2/country.rb +289 -270
- data/lib/twilio-ruby/rest/pricing/v2/number.rb +232 -217
- data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +297 -275
- data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +238 -220
- data/lib/twilio-ruby/rest/pricing/v2/voice.rb +121 -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 +419 -403
- data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +408 -418
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +430 -449
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +421 -455
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +522 -547
- data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +399 -370
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +559 -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 +268 -0
- data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +268 -0
- data/lib/twilio-ruby/rest/routes/v2/trunk.rb +268 -0
- data/lib/twilio-ruby/rest/routes/v2.rb +79 -0
- data/lib/twilio-ruby/rest/routes.rb +32 -0
- data/lib/twilio-ruby/rest/routes_base.rb +38 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +315 -323
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +412 -380
- data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +208 -208
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +407 -384
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +336 -338
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +361 -383
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +403 -396
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +456 -447
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +223 -234
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +342 -353
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +412 -380
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +523 -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 +206 -199
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb +221 -218
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +361 -355
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +422 -394
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb +206 -200
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb +221 -221
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +361 -361
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +468 -449
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +380 -355
- data/lib/twilio-ruby/rest/studio/v1.rb +42 -37
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +206 -200
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +221 -221
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +361 -361
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +461 -442
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +341 -320
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb +232 -0
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +519 -472
- data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +121 -99
- 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 +403 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +472 -484
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +398 -406
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +302 -297
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +337 -332
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +380 -351
- data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +256 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +242 -224
- data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +207 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +460 -433
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +358 -361
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +286 -311
- data/lib/twilio-ruby/rest/supersim/v1.rb +144 -140
- data/lib/twilio-ruby/rest/supersim.rb +22 -40
- data/lib/twilio-ruby/rest/supersim_base.rb +38 -0
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +376 -371
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +456 -423
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +466 -490
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +376 -370
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +470 -445
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +469 -495
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +376 -368
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +470 -444
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +139 -132
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +419 -400
- data/lib/twilio-ruby/rest/sync/v1/service.rb +575 -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 +405 -395
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +442 -464
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +705 -736
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +623 -661
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +409 -382
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +359 -365
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +279 -275
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +230 -236
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +239 -258
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +574 -566
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +687 -732
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +389 -388
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +235 -239
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +281 -265
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +215 -193
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +251 -234
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +623 -631
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +359 -373
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +245 -241
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +230 -244
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +523 -510
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +353 -354
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +231 -206
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +241 -234
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +720 -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 +342 -320
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +342 -317
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +440 -419
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +475 -451
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +224 -191
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +623 -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 +232 -0
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +211 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb +357 -352
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +335 -323
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb +333 -321
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +525 -513
- data/lib/twilio-ruby/rest/trusthub/v1/end_user.rb +383 -346
- data/lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb +282 -261
- data/lib/twilio-ruby/rest/trusthub/v1/policies.rb +275 -252
- data/lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb +397 -359
- data/lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb +282 -261
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb +357 -352
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +335 -323
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb +333 -321
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +525 -513
- data/lib/twilio-ruby/rest/trusthub/v1.rb +153 -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 +195 -183
- data/lib/twilio-ruby/rest/verify/v2/safelist.rb +231 -0
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +265 -116
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +191 -198
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +496 -521
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +447 -454
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +249 -279
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +422 -422
- data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +379 -363
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +401 -388
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +420 -384
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +380 -359
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +218 -198
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +447 -420
- data/lib/twilio-ruby/rest/verify/v2/service.rb +782 -770
- data/lib/twilio-ruby/rest/verify/v2/template.rb +221 -198
- data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +372 -319
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +247 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +99 -78
- data/lib/twilio-ruby/rest/verify.rb +23 -36
- data/lib/twilio-ruby/rest/verify_base.rb +38 -0
- data/lib/twilio-ruby/rest/video/v1/composition.rb +477 -486
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +525 -647
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +281 -261
- data/lib/twilio-ruby/rest/video/v1/recording.rb +426 -405
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +281 -261
- data/lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb +259 -0
- data/lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb +331 -0
- data/lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb +181 -0
- data/lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb +338 -0
- data/lib/twilio-ruby/rest/video/v1/room/participant.rb +498 -0
- data/lib/twilio-ruby/rest/video/v1/room/recording_rules.rb +170 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_recording.rb +423 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +606 -567
- 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 +168 -0
- data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +501 -486
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +440 -434
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +391 -352
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +135 -121
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb +195 -183
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +375 -397
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +217 -190
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +122 -121
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +377 -339
- data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +360 -319
- data/lib/twilio-ruby/rest/voice/v1.rb +130 -96
- data/lib/twilio-ruby/rest/voice.rb +12 -31
- data/lib/twilio-ruby/rest/voice_base.rb +38 -0
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +408 -406
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +463 -436
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +298 -284
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +239 -243
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +634 -647
- data/lib/twilio-ruby/rest/wireless/v1/usage_record.rb +226 -221
- 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/security/request_validator.rb +1 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +209 -42
- data/lib/twilio-ruby/version.rb +1 -1
- data/lib/twilio-ruby.rb +1 -1
- data/sonar-project.properties +2 -2
- data/twilio-ruby.gemspec +2 -3
- metadata +155 -98
- data/.github/workflows/deploy.yml +0 -65
- data/.github/workflows/test.yml +0 -52
- 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/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.rb +0 -163
- 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/fax/v1/fax/fax_media.rb +0 -314
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -536
- data/lib/twilio-ruby/rest/fax/v1.rb +0 -45
- data/lib/twilio-ruby/rest/fax.rb +0 -47
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +0 -307
- data/lib/twilio-ruby/rest/messaging/v1/deactivation.rb +0 -164
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +0 -294
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +0 -275
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +0 -249
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -251
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -234
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -62
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
- data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +0 -195
- data/lib/twilio-ruby/rest/preview/trusted_comms/cps.rb +0 -186
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
- 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/studio/v2/flow/test_user.rb +0 -199
- data/lib/twilio-ruby/rest/supersim/v1/command.rb +0 -368
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +0 -406
- 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 -483
- data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +0 -144
@@ -1,979 +1,959 @@
|
|
1
1
|
##
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# |
|
5
|
-
#
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Api
|
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.
|
6
13
|
#
|
7
|
-
# frozen_string_literal: true
|
8
|
-
|
9
|
-
module Twilio
|
10
|
-
module REST
|
11
|
-
class Api < Domain
|
12
|
-
class V2010 < Version
|
13
|
-
class AccountContext < InstanceContext
|
14
|
-
class CallList < ListResource
|
15
|
-
##
|
16
|
-
# Initialize the CallList
|
17
|
-
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] account_sid The SID of the
|
19
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Call
|
20
|
-
# resource.
|
21
|
-
# @return [CallList] CallList
|
22
|
-
def initialize(version, account_sid: nil)
|
23
|
-
super(version)
|
24
|
-
|
25
|
-
# Path Solution
|
26
|
-
@solution = {account_sid: account_sid}
|
27
|
-
@uri = "/Accounts/#{@solution[:account_sid]}/Calls.json"
|
28
|
-
|
29
|
-
# Components
|
30
|
-
@feedback_summaries = nil
|
31
|
-
end
|
32
|
-
|
33
|
-
##
|
34
|
-
# Create the CallInstance
|
35
|
-
# @param [String] to The phone number, SIP address, or client identifier to call.
|
36
|
-
# @param [String] from The phone number or client identifier to use as the caller
|
37
|
-
# id. If using a phone number, it must be a Twilio number or a Verified {outgoing
|
38
|
-
# caller id}[https://www.twilio.com/docs/voice/api/outgoing-caller-ids] for your
|
39
|
-
# account. If the `to` parameter is a phone number, `From` must also be a phone
|
40
|
-
# number.
|
41
|
-
# @param [String] method The HTTP method we should use when calling the `url`
|
42
|
-
# parameter's value. Can be: `GET` or `POST` and the default is `POST`. If an
|
43
|
-
# `application_sid` parameter is present, this parameter is ignored.
|
44
|
-
# @param [String] fallback_url The URL that we call using the `fallback_method` if
|
45
|
-
# an error occurs when requesting or executing the TwiML at `url`. If an
|
46
|
-
# `application_sid` parameter is present, this parameter is ignored.
|
47
|
-
# @param [String] fallback_method The HTTP method that we should use to request
|
48
|
-
# the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an
|
49
|
-
# `application_sid` parameter is present, this parameter is ignored.
|
50
|
-
# @param [String] status_callback The URL we should call using the
|
51
|
-
# `status_callback_method` to send status information to your application. If no
|
52
|
-
# `status_callback_event` is specified, we will send the `completed` status. If an
|
53
|
-
# `application_sid` parameter is present, this parameter is ignored. URLs must
|
54
|
-
# contain a valid hostname (underscores are not permitted).
|
55
|
-
# @param [Array[String]] status_callback_event The call progress events that we
|
56
|
-
# will send to the `status_callback` URL. Can be: `initiated`, `ringing`,
|
57
|
-
# `answered`, and `completed`. If no event is specified, we send the `completed`
|
58
|
-
# status. If you want to receive multiple events, specify each one in a separate
|
59
|
-
# `status_callback_event` parameter. See the code sample for {monitoring call
|
60
|
-
# progress}[https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json].
|
61
|
-
# If an `application_sid` is present, this parameter is ignored.
|
62
|
-
# @param [String] status_callback_method The HTTP method we should use when
|
63
|
-
# calling the `status_callback` URL. Can be: `GET` or `POST` and the default is
|
64
|
-
# `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
65
|
-
# @param [String] send_digits A string of keys to dial after connecting to the
|
66
|
-
# number, maximum of 32 digits. Valid digits in the string include: any digit
|
67
|
-
# (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example,
|
68
|
-
# if you connected to a company phone number and wanted to pause for one second,
|
69
|
-
# and then dial extension 1234 followed by the pound key, the value of this
|
70
|
-
# parameter would be `ww1234#`. Remember to URL-encode this string, since the
|
71
|
-
# '`#`' character has special meaning in a URL. If both `SendDigits` and
|
72
|
-
# `MachineDetection` parameters are provided, then `MachineDetection` will be
|
73
|
-
# ignored.
|
74
|
-
# @param [String] timeout The integer number of seconds that we should allow the
|
75
|
-
# phone to ring before assuming there is no answer. The default is `60` seconds
|
76
|
-
# and the maximum is `600` seconds. For some call flows, we will add a 5-second
|
77
|
-
# buffer to the timeout value you provide. For this reason, a timeout value of 10
|
78
|
-
# seconds could result in an actual timeout closer to 15 seconds. You can set this
|
79
|
-
# to a short time, such as `15` seconds, to hang up before reaching an answering
|
80
|
-
# machine or voicemail.
|
81
|
-
# @param [Boolean] record Whether to record the call. Can be `true` to record the
|
82
|
-
# phone call, or `false` to not. The default is `false`. The `recording_url` is
|
83
|
-
# sent to the `status_callback` URL.
|
84
|
-
# @param [String] recording_channels The number of channels in the final
|
85
|
-
# recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both
|
86
|
-
# legs of the call in a single channel of the recording file. `dual` records each
|
87
|
-
# leg to a separate channel of the recording file. The first channel of a
|
88
|
-
# dual-channel recording contains the parent call and the second channel contains
|
89
|
-
# the child call.
|
90
|
-
# @param [String] recording_status_callback The URL that we call when the
|
91
|
-
# recording is available to be accessed.
|
92
|
-
# @param [String] recording_status_callback_method The HTTP method we should use
|
93
|
-
# when calling the `recording_status_callback` URL. Can be: `GET` or `POST` and
|
94
|
-
# the default is `POST`.
|
95
|
-
# @param [String] sip_auth_username The username used to authenticate the caller
|
96
|
-
# making a SIP call.
|
97
|
-
# @param [String] sip_auth_password The password required to authenticate the user
|
98
|
-
# account specified in `sip_auth_username`.
|
99
|
-
# @param [String] machine_detection Whether to detect if a human, answering
|
100
|
-
# machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`.
|
101
|
-
# Use `Enable` if you would like us to return `AnsweredBy` as soon as the called
|
102
|
-
# party is identified. Use `DetectMessageEnd`, if you would like to leave a
|
103
|
-
# message on an answering machine. If `send_digits` is provided, this parameter is
|
104
|
-
# ignored. For more information, see {Answering Machine
|
105
|
-
# Detection}[https://www.twilio.com/docs/voice/answering-machine-detection].
|
106
|
-
# @param [String] machine_detection_timeout The number of seconds that we should
|
107
|
-
# attempt to detect an answering machine before timing out and sending a voice
|
108
|
-
# request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds.
|
109
|
-
# @param [Array[String]] recording_status_callback_event The recording status
|
110
|
-
# events that will trigger calls to the URL specified in
|
111
|
-
# `recording_status_callback`. Can be: `in-progress`, `completed` and `absent`.
|
112
|
-
# Defaults to `completed`. Separate multiple values with a space.
|
113
|
-
# @param [String] trim Whether to trim any leading and trailing silence from the
|
114
|
-
# recording. Can be: `trim-silence` or `do-not-trim` and the default is
|
115
|
-
# `trim-silence`.
|
116
|
-
# @param [String] caller_id The phone number, SIP address, or Client identifier
|
117
|
-
# that made this call. Phone numbers are in {E.164
|
118
|
-
# format}[https://wwnw.twilio.com/docs/glossary/what-e164] (e.g., +16175551212).
|
119
|
-
# SIP addresses are formatted as `name@company.com`.
|
120
|
-
# @param [String] machine_detection_speech_threshold The number of milliseconds
|
121
|
-
# that is used as the measuring stick for the length of the speech activity, where
|
122
|
-
# durations lower than this value will be interpreted as a human and longer than
|
123
|
-
# this value as a machine. Possible Values: 1000-6000. Default: 2400.
|
124
|
-
# @param [String] machine_detection_speech_end_threshold The number of
|
125
|
-
# milliseconds of silence after speech activity at which point the speech activity
|
126
|
-
# is considered complete. Possible Values: 500-5000. Default: 1200.
|
127
|
-
# @param [String] machine_detection_silence_timeout The number of milliseconds of
|
128
|
-
# initial silence after which an `unknown` AnsweredBy result will be returned.
|
129
|
-
# Possible Values: 2000-10000. Default: 5000.
|
130
|
-
# @param [String] async_amd Select whether to perform answering machine detection
|
131
|
-
# in the background. Default, blocks the execution of the call until Answering
|
132
|
-
# Machine Detection is completed. Can be: `true` or `false`.
|
133
|
-
# @param [String] async_amd_status_callback The URL that we should call using the
|
134
|
-
# `async_amd_status_callback_method` to notify customer application whether the
|
135
|
-
# call was answered by human, machine or fax.
|
136
|
-
# @param [String] async_amd_status_callback_method The HTTP method we should use
|
137
|
-
# when calling the `async_amd_status_callback` URL. Can be: `GET` or `POST` and
|
138
|
-
# the default is `POST`.
|
139
|
-
# @param [String] byoc The SID of a BYOC (Bring Your Own Carrier) trunk to route
|
140
|
-
# this call with. Note that `byoc` is only meaningful when `to` is a phone number;
|
141
|
-
# it will otherwise be ignored. (Beta)
|
142
|
-
# @param [String] call_reason The Reason for the outgoing call. Use it to specify
|
143
|
-
# the purpose of the call that is presented on the called party's phone. (Branded
|
144
|
-
# Calls Beta)
|
145
|
-
# @param [String] call_token A token string needed to invoke a forwarded call. A
|
146
|
-
# call_token is generated when an incoming call is received on a Twilio number.
|
147
|
-
# Pass an incoming call's call_token value to a forwarded call via the call_token
|
148
|
-
# parameter when creating a new call. A forwarded call should bear the same
|
149
|
-
# CallerID of the original incoming call.
|
150
|
-
# @param [String] recording_track The audio track to record for the call. Can be:
|
151
|
-
# `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the
|
152
|
-
# audio that is received by Twilio. `outbound` records the audio that is generated
|
153
|
-
# from Twilio. `both` records the audio that is received and generated by Twilio.
|
154
|
-
# @param [String] time_limit The maximum duration of the call in seconds.
|
155
|
-
# Constraints depend on account and configuration.
|
156
|
-
# @param [String] url The absolute URL that returns the TwiML instructions for the
|
157
|
-
# call. We will call this URL using the `method` when the call connects. For more
|
158
|
-
# information, see the {Url
|
159
|
-
# Parameter}[https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter]
|
160
|
-
# section in {Making Calls}[https://www.twilio.com/docs/voice/make-calls].
|
161
|
-
# @param [String] twiml TwiML instructions for the call Twilio will use without
|
162
|
-
# fetching Twiml from url parameter. If both `twiml` and `url` are provided then
|
163
|
-
# `twiml` parameter will be ignored. Max 4000 characters.
|
164
|
-
# @param [String] application_sid The SID of the Application resource that will
|
165
|
-
# handle the call, if the call will be handled by an application.
|
166
|
-
# @return [CallInstance] Created CallInstance
|
167
|
-
def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, call_token: :unset, recording_track: :unset, time_limit: :unset, url: :unset, twiml: :unset, application_sid: :unset)
|
168
|
-
data = Twilio::Values.of({
|
169
|
-
'To' => to,
|
170
|
-
'From' => from,
|
171
|
-
'Url' => url,
|
172
|
-
'Twiml' => twiml,
|
173
|
-
'ApplicationSid' => application_sid,
|
174
|
-
'Method' => method,
|
175
|
-
'FallbackUrl' => fallback_url,
|
176
|
-
'FallbackMethod' => fallback_method,
|
177
|
-
'StatusCallback' => status_callback,
|
178
|
-
'StatusCallbackEvent' => Twilio.serialize_list(status_callback_event) { |e| e },
|
179
|
-
'StatusCallbackMethod' => status_callback_method,
|
180
|
-
'SendDigits' => send_digits,
|
181
|
-
'Timeout' => timeout,
|
182
|
-
'Record' => record,
|
183
|
-
'RecordingChannels' => recording_channels,
|
184
|
-
'RecordingStatusCallback' => recording_status_callback,
|
185
|
-
'RecordingStatusCallbackMethod' => recording_status_callback_method,
|
186
|
-
'SipAuthUsername' => sip_auth_username,
|
187
|
-
'SipAuthPassword' => sip_auth_password,
|
188
|
-
'MachineDetection' => machine_detection,
|
189
|
-
'MachineDetectionTimeout' => machine_detection_timeout,
|
190
|
-
'RecordingStatusCallbackEvent' => Twilio.serialize_list(recording_status_callback_event) { |e| e },
|
191
|
-
'Trim' => trim,
|
192
|
-
'CallerId' => caller_id,
|
193
|
-
'MachineDetectionSpeechThreshold' => machine_detection_speech_threshold,
|
194
|
-
'MachineDetectionSpeechEndThreshold' => machine_detection_speech_end_threshold,
|
195
|
-
'MachineDetectionSilenceTimeout' => machine_detection_silence_timeout,
|
196
|
-
'AsyncAmd' => async_amd,
|
197
|
-
'AsyncAmdStatusCallback' => async_amd_status_callback,
|
198
|
-
'AsyncAmdStatusCallbackMethod' => async_amd_status_callback_method,
|
199
|
-
'Byoc' => byoc,
|
200
|
-
'CallReason' => call_reason,
|
201
|
-
'CallToken' => call_token,
|
202
|
-
'RecordingTrack' => recording_track,
|
203
|
-
'TimeLimit' => time_limit,
|
204
|
-
})
|
205
|
-
|
206
|
-
payload = @version.create('POST', @uri, data: data)
|
207
|
-
|
208
|
-
CallInstance.new(@version, payload, account_sid: @solution[:account_sid], )
|
209
|
-
end
|
210
|
-
|
211
|
-
##
|
212
|
-
# Lists CallInstance records from the API as a list.
|
213
|
-
# Unlike stream(), this operation is eager and will load `limit` records into
|
214
|
-
# memory before returning.
|
215
|
-
# @param [String] to Only show calls made to this phone number, SIP address,
|
216
|
-
# Client identifier or SIM SID.
|
217
|
-
# @param [String] from Only include calls from this phone number, SIP address,
|
218
|
-
# Client identifier or SIM SID.
|
219
|
-
# @param [String] parent_call_sid Only include calls spawned by calls with this
|
220
|
-
# SID.
|
221
|
-
# @param [call.Status] status The status of the calls to include. Can be:
|
222
|
-
# `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`,
|
223
|
-
# or `no-answer`.
|
224
|
-
# @param [Time] start_time_before Only include calls that started on this date
|
225
|
-
# @param [Time] start_time Only include calls that started on this date
|
226
|
-
# @param [Time] start_time_after Only include calls that started on this date
|
227
|
-
# @param [Time] end_time_before Only include calls that ended on this date
|
228
|
-
# @param [Time] end_time Only include calls that ended on this date
|
229
|
-
# @param [Time] end_time_after Only include calls that ended on this date
|
230
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
231
|
-
# guarantees to never return more than limit. Default is no limit
|
232
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
233
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
234
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
235
|
-
# efficient page size, i.e. min(limit, 1000)
|
236
|
-
# @return [Array] Array of up to limit results
|
237
|
-
def list(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time_before: :unset, start_time: :unset, start_time_after: :unset, end_time_before: :unset, end_time: :unset, end_time_after: :unset, limit: nil, page_size: nil)
|
238
|
-
self.stream(
|
239
|
-
to: to,
|
240
|
-
from: from,
|
241
|
-
parent_call_sid: parent_call_sid,
|
242
|
-
status: status,
|
243
|
-
start_time_before: start_time_before,
|
244
|
-
start_time: start_time,
|
245
|
-
start_time_after: start_time_after,
|
246
|
-
end_time_before: end_time_before,
|
247
|
-
end_time: end_time,
|
248
|
-
end_time_after: end_time_after,
|
249
|
-
limit: limit,
|
250
|
-
page_size: page_size
|
251
|
-
).entries
|
252
|
-
end
|
253
|
-
|
254
|
-
##
|
255
|
-
# Streams CallInstance records from the API as an Enumerable.
|
256
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
257
|
-
# is reached.
|
258
|
-
# @param [String] to Only show calls made to this phone number, SIP address,
|
259
|
-
# Client identifier or SIM SID.
|
260
|
-
# @param [String] from Only include calls from this phone number, SIP address,
|
261
|
-
# Client identifier or SIM SID.
|
262
|
-
# @param [String] parent_call_sid Only include calls spawned by calls with this
|
263
|
-
# SID.
|
264
|
-
# @param [call.Status] status The status of the calls to include. Can be:
|
265
|
-
# `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`,
|
266
|
-
# or `no-answer`.
|
267
|
-
# @param [Time] start_time_before Only include calls that started on this date
|
268
|
-
# @param [Time] start_time Only include calls that started on this date
|
269
|
-
# @param [Time] start_time_after Only include calls that started on this date
|
270
|
-
# @param [Time] end_time_before Only include calls that ended on this date
|
271
|
-
# @param [Time] end_time Only include calls that ended on this date
|
272
|
-
# @param [Time] end_time_after Only include calls that ended on this date
|
273
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
274
|
-
# guarantees to never return more than limit. Default is no limit.
|
275
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
276
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
277
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
278
|
-
# efficient page size, i.e. min(limit, 1000)
|
279
|
-
# @return [Enumerable] Enumerable that will yield up to limit results
|
280
|
-
def stream(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time_before: :unset, start_time: :unset, start_time_after: :unset, end_time_before: :unset, end_time: :unset, end_time_after: :unset, limit: nil, page_size: nil)
|
281
|
-
limits = @version.read_limits(limit, page_size)
|
282
|
-
|
283
|
-
page = self.page(
|
284
|
-
to: to,
|
285
|
-
from: from,
|
286
|
-
parent_call_sid: parent_call_sid,
|
287
|
-
status: status,
|
288
|
-
start_time_before: start_time_before,
|
289
|
-
start_time: start_time,
|
290
|
-
start_time_after: start_time_after,
|
291
|
-
end_time_before: end_time_before,
|
292
|
-
end_time: end_time,
|
293
|
-
end_time_after: end_time_after,
|
294
|
-
page_size: limits[:page_size],
|
295
|
-
)
|
296
|
-
|
297
|
-
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
298
|
-
end
|
299
|
-
|
300
|
-
##
|
301
|
-
# When passed a block, yields CallInstance records from the API.
|
302
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
303
|
-
# is reached.
|
304
|
-
def each
|
305
|
-
limits = @version.read_limits
|
306
|
-
|
307
|
-
page = self.page(page_size: limits[:page_size], )
|
308
|
-
|
309
|
-
@version.stream(page,
|
310
|
-
limit: limits[:limit],
|
311
|
-
page_limit: limits[:page_limit]).each {|x| yield x}
|
312
|
-
end
|
313
|
-
|
314
|
-
##
|
315
|
-
# Retrieve a single page of CallInstance records from the API.
|
316
|
-
# Request is executed immediately.
|
317
|
-
# @param [String] to Only show calls made to this phone number, SIP address,
|
318
|
-
# Client identifier or SIM SID.
|
319
|
-
# @param [String] from Only include calls from this phone number, SIP address,
|
320
|
-
# Client identifier or SIM SID.
|
321
|
-
# @param [String] parent_call_sid Only include calls spawned by calls with this
|
322
|
-
# SID.
|
323
|
-
# @param [call.Status] status The status of the calls to include. Can be:
|
324
|
-
# `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`,
|
325
|
-
# or `no-answer`.
|
326
|
-
# @param [Time] start_time_before Only include calls that started on this date
|
327
|
-
# @param [Time] start_time Only include calls that started on this date
|
328
|
-
# @param [Time] start_time_after Only include calls that started on this date
|
329
|
-
# @param [Time] end_time_before Only include calls that ended on this date
|
330
|
-
# @param [Time] end_time Only include calls that ended on this date
|
331
|
-
# @param [Time] end_time_after Only include calls that ended on this date
|
332
|
-
# @param [String] page_token PageToken provided by the API
|
333
|
-
# @param [Integer] page_number Page Number, this value is simply for client state
|
334
|
-
# @param [Integer] page_size Number of records to return, defaults to 50
|
335
|
-
# @return [Page] Page of CallInstance
|
336
|
-
def page(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time_before: :unset, start_time: :unset, start_time_after: :unset, end_time_before: :unset, end_time: :unset, end_time_after: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
337
|
-
params = Twilio::Values.of({
|
338
|
-
'To' => to,
|
339
|
-
'From' => from,
|
340
|
-
'ParentCallSid' => parent_call_sid,
|
341
|
-
'Status' => status,
|
342
|
-
'StartTime<' => Twilio.serialize_iso8601_datetime(start_time_before),
|
343
|
-
'StartTime' => Twilio.serialize_iso8601_datetime(start_time),
|
344
|
-
'StartTime>' => Twilio.serialize_iso8601_datetime(start_time_after),
|
345
|
-
'EndTime<' => Twilio.serialize_iso8601_datetime(end_time_before),
|
346
|
-
'EndTime' => Twilio.serialize_iso8601_datetime(end_time),
|
347
|
-
'EndTime>' => Twilio.serialize_iso8601_datetime(end_time_after),
|
348
|
-
'PageToken' => page_token,
|
349
|
-
'Page' => page_number,
|
350
|
-
'PageSize' => page_size,
|
351
|
-
})
|
352
|
-
|
353
|
-
response = @version.page('GET', @uri, params: params)
|
354
|
-
|
355
|
-
CallPage.new(@version, response, @solution)
|
356
|
-
end
|
357
|
-
|
358
|
-
##
|
359
|
-
# Retrieve a single page of CallInstance records from the API.
|
360
|
-
# Request is executed immediately.
|
361
|
-
# @param [String] target_url API-generated URL for the requested results page
|
362
|
-
# @return [Page] Page of CallInstance
|
363
|
-
def get_page(target_url)
|
364
|
-
response = @version.domain.request(
|
365
|
-
'GET',
|
366
|
-
target_url
|
367
|
-
)
|
368
|
-
CallPage.new(@version, response, @solution)
|
369
|
-
end
|
370
|
-
|
371
|
-
##
|
372
|
-
# Access the feedback_summaries
|
373
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
374
|
-
# resource.
|
375
|
-
# @return [FeedbackSummaryList]
|
376
|
-
# @return [FeedbackSummaryContext] if sid was passed.
|
377
|
-
def feedback_summaries(sid=:unset)
|
378
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
379
|
-
|
380
|
-
if sid != :unset
|
381
|
-
return FeedbackSummaryContext.new(@version, @solution[:account_sid], sid, )
|
382
|
-
end
|
383
|
-
|
384
|
-
@feedback_summaries ||= FeedbackSummaryList.new(@version, account_sid: @solution[:account_sid], )
|
385
|
-
end
|
386
|
-
|
387
|
-
##
|
388
|
-
# Provide a user friendly representation
|
389
|
-
def to_s
|
390
|
-
'#<Twilio.Api.V2010.CallList>'
|
391
|
-
end
|
392
|
-
end
|
393
|
-
|
394
|
-
class CallPage < Page
|
395
|
-
##
|
396
|
-
# Initialize the CallPage
|
397
|
-
# @param [Version] version Version that contains the resource
|
398
|
-
# @param [Response] response Response from the API
|
399
|
-
# @param [Hash] solution Path solution for the resource
|
400
|
-
# @return [CallPage] CallPage
|
401
|
-
def initialize(version, response, solution)
|
402
|
-
super(version, response)
|
403
|
-
|
404
|
-
# Path Solution
|
405
|
-
@solution = solution
|
406
|
-
end
|
407
|
-
|
408
|
-
##
|
409
|
-
# Build an instance of CallInstance
|
410
|
-
# @param [Hash] payload Payload response from the API
|
411
|
-
# @return [CallInstance] CallInstance
|
412
|
-
def get_instance(payload)
|
413
|
-
CallInstance.new(@version, payload, account_sid: @solution[:account_sid], )
|
414
|
-
end
|
415
|
-
|
416
|
-
##
|
417
|
-
# Provide a user friendly representation
|
418
|
-
def to_s
|
419
|
-
'<Twilio.Api.V2010.CallPage>'
|
420
|
-
end
|
421
|
-
end
|
422
|
-
|
423
|
-
class CallContext < InstanceContext
|
424
|
-
##
|
425
|
-
# Initialize the CallContext
|
426
|
-
# @param [Version] version Version that contains the resource
|
427
|
-
# @param [String] account_sid The SID of the
|
428
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created the Call
|
429
|
-
# resource(s) to fetch.
|
430
|
-
# @param [String] sid The SID of the Call resource to fetch.
|
431
|
-
# @return [CallContext] CallContext
|
432
|
-
def initialize(version, account_sid, sid)
|
433
|
-
super(version)
|
434
|
-
|
435
|
-
# Path Solution
|
436
|
-
@solution = {account_sid: account_sid, sid: sid, }
|
437
|
-
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:sid]}.json"
|
438
|
-
|
439
|
-
# Dependents
|
440
|
-
@recordings = nil
|
441
|
-
@notifications = nil
|
442
|
-
@feedback = nil
|
443
|
-
@events = nil
|
444
|
-
@payments = nil
|
445
|
-
@siprec = nil
|
446
|
-
end
|
447
|
-
|
448
|
-
##
|
449
|
-
# Delete the CallInstance
|
450
|
-
# @return [Boolean] true if delete succeeds, false otherwise
|
451
|
-
def delete
|
452
|
-
@version.delete('DELETE', @uri)
|
453
|
-
end
|
454
|
-
|
455
|
-
##
|
456
|
-
# Fetch the CallInstance
|
457
|
-
# @return [CallInstance] Fetched CallInstance
|
458
|
-
def fetch
|
459
|
-
payload = @version.fetch('GET', @uri)
|
460
|
-
|
461
|
-
CallInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid], )
|
462
|
-
end
|
463
|
-
|
464
|
-
##
|
465
|
-
# Update the CallInstance
|
466
|
-
# @param [String] url The absolute URL that returns the TwiML instructions for the
|
467
|
-
# call. We will call this URL using the `method` when the call connects. For more
|
468
|
-
# information, see the {Url
|
469
|
-
# Parameter}[https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter]
|
470
|
-
# section in {Making Calls}[https://www.twilio.com/docs/voice/make-calls].
|
471
|
-
# @param [String] method The HTTP method we should use when calling the `url`. Can
|
472
|
-
# be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter
|
473
|
-
# is present, this parameter is ignored.
|
474
|
-
# @param [call.UpdateStatus] status The new status of the resource. Can be:
|
475
|
-
# `canceled` or `completed`. Specifying `canceled` will attempt to hang up calls
|
476
|
-
# that are queued or ringing; however, it will not affect calls already in
|
477
|
-
# progress. Specifying `completed` will attempt to hang up a call even if it's
|
478
|
-
# already in progress.
|
479
|
-
# @param [String] fallback_url The URL that we call using the `fallback_method` if
|
480
|
-
# an error occurs when requesting or executing the TwiML at `url`. If an
|
481
|
-
# `application_sid` parameter is present, this parameter is ignored.
|
482
|
-
# @param [String] fallback_method The HTTP method that we should use to request
|
483
|
-
# the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an
|
484
|
-
# `application_sid` parameter is present, this parameter is ignored.
|
485
|
-
# @param [String] status_callback The URL we should call using the
|
486
|
-
# `status_callback_method` to send status information to your application. If no
|
487
|
-
# `status_callback_event` is specified, we will send the `completed` status. If an
|
488
|
-
# `application_sid` parameter is present, this parameter is ignored. URLs must
|
489
|
-
# contain a valid hostname (underscores are not permitted).
|
490
|
-
# @param [String] status_callback_method The HTTP method we should use when
|
491
|
-
# requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is
|
492
|
-
# `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
493
|
-
# @param [String] twiml TwiML instructions for the call Twilio will use without
|
494
|
-
# fetching Twiml from url. Twiml and url parameters are mutually exclusive
|
495
|
-
# @param [String] time_limit The maximum duration of the call in seconds.
|
496
|
-
# Constraints depend on account and configuration.
|
497
|
-
# @return [CallInstance] Updated CallInstance
|
498
|
-
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset, time_limit: :unset)
|
499
|
-
data = Twilio::Values.of({
|
500
|
-
'Url' => url,
|
501
|
-
'Method' => method,
|
502
|
-
'Status' => status,
|
503
|
-
'FallbackUrl' => fallback_url,
|
504
|
-
'FallbackMethod' => fallback_method,
|
505
|
-
'StatusCallback' => status_callback,
|
506
|
-
'StatusCallbackMethod' => status_callback_method,
|
507
|
-
'Twiml' => twiml,
|
508
|
-
'TimeLimit' => time_limit,
|
509
|
-
})
|
510
|
-
|
511
|
-
payload = @version.update('POST', @uri, data: data)
|
512
|
-
|
513
|
-
CallInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid], )
|
514
|
-
end
|
515
|
-
|
516
|
-
##
|
517
|
-
# Access the recordings
|
518
|
-
# @return [RecordingList]
|
519
|
-
# @return [RecordingContext] if sid was passed.
|
520
|
-
def recordings(sid=:unset)
|
521
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
522
|
-
|
523
|
-
if sid != :unset
|
524
|
-
return RecordingContext.new(@version, @solution[:account_sid], @solution[:sid], sid, )
|
525
|
-
end
|
526
|
-
|
527
|
-
unless @recordings
|
528
|
-
@recordings = RecordingList.new(
|
529
|
-
@version,
|
530
|
-
account_sid: @solution[:account_sid],
|
531
|
-
call_sid: @solution[:sid],
|
532
|
-
)
|
533
|
-
end
|
534
|
-
|
535
|
-
@recordings
|
536
|
-
end
|
537
|
-
|
538
|
-
##
|
539
|
-
# Access the notifications
|
540
|
-
# @return [NotificationList]
|
541
|
-
# @return [NotificationContext] if sid was passed.
|
542
|
-
def notifications(sid=:unset)
|
543
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
544
|
-
|
545
|
-
if sid != :unset
|
546
|
-
return NotificationContext.new(@version, @solution[:account_sid], @solution[:sid], sid, )
|
547
|
-
end
|
548
|
-
|
549
|
-
unless @notifications
|
550
|
-
@notifications = NotificationList.new(
|
551
|
-
@version,
|
552
|
-
account_sid: @solution[:account_sid],
|
553
|
-
call_sid: @solution[:sid],
|
554
|
-
)
|
555
|
-
end
|
556
|
-
|
557
|
-
@notifications
|
558
|
-
end
|
559
|
-
|
560
|
-
##
|
561
|
-
# Access the feedback
|
562
|
-
# @return [FeedbackList]
|
563
|
-
# @return [FeedbackContext]
|
564
|
-
def feedback
|
565
|
-
FeedbackContext.new(@version, @solution[:account_sid], @solution[:sid], )
|
566
|
-
end
|
567
|
-
|
568
|
-
##
|
569
|
-
# Access the events
|
570
|
-
# @return [EventList]
|
571
|
-
# @return [EventContext]
|
572
|
-
def events
|
573
|
-
unless @events
|
574
|
-
@events = EventList.new(@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
575
|
-
end
|
576
|
-
|
577
|
-
@events
|
578
|
-
end
|
579
|
-
|
580
|
-
##
|
581
|
-
# Access the payments
|
582
|
-
# @return [PaymentList]
|
583
|
-
# @return [PaymentContext] if sid was passed.
|
584
|
-
def payments(sid=:unset)
|
585
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
586
|
-
|
587
|
-
if sid != :unset
|
588
|
-
return PaymentContext.new(@version, @solution[:account_sid], @solution[:sid], sid, )
|
589
|
-
end
|
590
|
-
|
591
|
-
unless @payments
|
592
|
-
@payments = PaymentList.new(
|
593
|
-
@version,
|
594
|
-
account_sid: @solution[:account_sid],
|
595
|
-
call_sid: @solution[:sid],
|
596
|
-
)
|
597
|
-
end
|
598
|
-
|
599
|
-
@payments
|
600
|
-
end
|
601
|
-
|
602
|
-
##
|
603
|
-
# Access the siprec
|
604
|
-
# @return [SiprecList]
|
605
|
-
# @return [SiprecContext] if sid was passed.
|
606
|
-
def siprec(sid=:unset)
|
607
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
608
|
-
|
609
|
-
if sid != :unset
|
610
|
-
return SiprecContext.new(@version, @solution[:account_sid], @solution[:sid], sid, )
|
611
|
-
end
|
612
|
-
|
613
|
-
unless @siprec
|
614
|
-
@siprec = SiprecList.new(@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
615
|
-
end
|
616
|
-
|
617
|
-
@siprec
|
618
|
-
end
|
619
|
-
|
620
|
-
##
|
621
|
-
# Provide a user friendly representation
|
622
|
-
def to_s
|
623
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
624
|
-
"#<Twilio.Api.V2010.CallContext #{context}>"
|
625
|
-
end
|
626
|
-
|
627
|
-
##
|
628
|
-
# Provide a detailed, user friendly representation
|
629
|
-
def inspect
|
630
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
631
|
-
"#<Twilio.Api.V2010.CallContext #{context}>"
|
632
|
-
end
|
633
|
-
end
|
634
|
-
|
635
|
-
class CallInstance < InstanceResource
|
636
|
-
##
|
637
|
-
# Initialize the CallInstance
|
638
|
-
# @param [Version] version Version that contains the resource
|
639
|
-
# @param [Hash] payload payload that contains response from Twilio
|
640
|
-
# @param [String] account_sid The SID of the
|
641
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Call
|
642
|
-
# resource.
|
643
|
-
# @param [String] sid The SID of the Call resource to fetch.
|
644
|
-
# @return [CallInstance] CallInstance
|
645
|
-
def initialize(version, payload, account_sid: nil, sid: nil)
|
646
|
-
super(version)
|
647
|
-
|
648
|
-
# Marshaled Properties
|
649
|
-
@properties = {
|
650
|
-
'sid' => payload['sid'],
|
651
|
-
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
652
|
-
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
653
|
-
'parent_call_sid' => payload['parent_call_sid'],
|
654
|
-
'account_sid' => payload['account_sid'],
|
655
|
-
'to' => payload['to'],
|
656
|
-
'to_formatted' => payload['to_formatted'],
|
657
|
-
'from' => payload['from'],
|
658
|
-
'from_formatted' => payload['from_formatted'],
|
659
|
-
'phone_number_sid' => payload['phone_number_sid'],
|
660
|
-
'status' => payload['status'],
|
661
|
-
'start_time' => Twilio.deserialize_rfc2822(payload['start_time']),
|
662
|
-
'end_time' => Twilio.deserialize_rfc2822(payload['end_time']),
|
663
|
-
'duration' => payload['duration'],
|
664
|
-
'price' => payload['price'],
|
665
|
-
'price_unit' => payload['price_unit'],
|
666
|
-
'direction' => payload['direction'],
|
667
|
-
'answered_by' => payload['answered_by'],
|
668
|
-
'annotation' => payload['annotation'],
|
669
|
-
'api_version' => payload['api_version'],
|
670
|
-
'forwarded_from' => payload['forwarded_from'],
|
671
|
-
'group_sid' => payload['group_sid'],
|
672
|
-
'caller_name' => payload['caller_name'],
|
673
|
-
'queue_time' => payload['queue_time'],
|
674
|
-
'trunk_sid' => payload['trunk_sid'],
|
675
|
-
'uri' => payload['uri'],
|
676
|
-
'subresource_uris' => payload['subresource_uris'],
|
677
|
-
}
|
678
|
-
|
679
|
-
# Context
|
680
|
-
@instance_context = nil
|
681
|
-
@params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'], }
|
682
|
-
end
|
683
|
-
|
684
|
-
##
|
685
|
-
# Generate an instance context for the instance, the context is capable of
|
686
|
-
# performing various actions. All instance actions are proxied to the context
|
687
|
-
# @return [CallContext] CallContext for this CallInstance
|
688
|
-
def context
|
689
|
-
unless @instance_context
|
690
|
-
@instance_context = CallContext.new(@version, @params['account_sid'], @params['sid'], )
|
691
|
-
end
|
692
|
-
@instance_context
|
693
|
-
end
|
694
|
-
|
695
|
-
##
|
696
|
-
# @return [String] The unique string that identifies this resource
|
697
|
-
def sid
|
698
|
-
@properties['sid']
|
699
|
-
end
|
700
|
-
|
701
|
-
##
|
702
|
-
# @return [Time] The RFC 2822 date and time in GMT that this resource was created
|
703
|
-
def date_created
|
704
|
-
@properties['date_created']
|
705
|
-
end
|
706
|
-
|
707
|
-
##
|
708
|
-
# @return [Time] The RFC 2822 date and time in GMT that this resource was last updated
|
709
|
-
def date_updated
|
710
|
-
@properties['date_updated']
|
711
|
-
end
|
712
|
-
|
713
|
-
##
|
714
|
-
# @return [String] The SID that identifies the call that created this leg.
|
715
|
-
def parent_call_sid
|
716
|
-
@properties['parent_call_sid']
|
717
|
-
end
|
718
|
-
|
719
|
-
##
|
720
|
-
# @return [String] The SID of the Account that created this resource
|
721
|
-
def account_sid
|
722
|
-
@properties['account_sid']
|
723
|
-
end
|
724
|
-
|
725
|
-
##
|
726
|
-
# @return [String] The phone number, SIP address or Client identifier that received this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`.
|
727
|
-
def to
|
728
|
-
@properties['to']
|
729
|
-
end
|
730
|
-
|
731
|
-
##
|
732
|
-
# @return [String] The phone number, SIP address or Client identifier that received this call. Formatted for display.
|
733
|
-
def to_formatted
|
734
|
-
@properties['to_formatted']
|
735
|
-
end
|
736
|
-
|
737
|
-
##
|
738
|
-
# @return [String] The phone number, SIP address or Client identifier that made this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`.
|
739
|
-
def from
|
740
|
-
@properties['from']
|
741
|
-
end
|
742
|
-
|
743
|
-
##
|
744
|
-
# @return [String] The calling phone number, SIP address, or Client identifier formatted for display.
|
745
|
-
def from_formatted
|
746
|
-
@properties['from_formatted']
|
747
|
-
end
|
748
|
-
|
749
|
-
##
|
750
|
-
# @return [String] If the call was inbound, this is the SID of the IncomingPhoneNumber resource that received the call. If the call was outbound, it is the SID of the OutgoingCallerId resource from which the call was placed.
|
751
|
-
def phone_number_sid
|
752
|
-
@properties['phone_number_sid']
|
753
|
-
end
|
754
|
-
|
755
|
-
##
|
756
|
-
# @return [call.Status] The status of this call.
|
757
|
-
def status
|
758
|
-
@properties['status']
|
759
|
-
end
|
760
|
-
|
761
|
-
##
|
762
|
-
# @return [Time] The start time of the call. Null if the call has not yet been dialed.
|
763
|
-
def start_time
|
764
|
-
@properties['start_time']
|
765
|
-
end
|
766
|
-
|
767
|
-
##
|
768
|
-
# @return [Time] The end time of the call. Null if the call did not complete successfully.
|
769
|
-
def end_time
|
770
|
-
@properties['end_time']
|
771
|
-
end
|
772
|
-
|
773
|
-
##
|
774
|
-
# @return [String] The length of the call in seconds.
|
775
|
-
def duration
|
776
|
-
@properties['duration']
|
777
|
-
end
|
778
|
-
|
779
|
-
##
|
780
|
-
# @return [String] The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available.
|
781
|
-
def price
|
782
|
-
@properties['price']
|
783
|
-
end
|
784
|
-
|
785
|
-
##
|
786
|
-
# @return [String] The currency in which `Price` is measured.
|
787
|
-
def price_unit
|
788
|
-
@properties['price_unit']
|
789
|
-
end
|
790
|
-
|
791
|
-
##
|
792
|
-
# @return [String] A string describing the direction of the call. `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `Dial` verb.
|
793
|
-
def direction
|
794
|
-
@properties['direction']
|
795
|
-
end
|
796
|
-
|
797
|
-
##
|
798
|
-
# @return [String] Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise.
|
799
|
-
def answered_by
|
800
|
-
@properties['answered_by']
|
801
|
-
end
|
802
|
-
|
803
|
-
##
|
804
|
-
# @return [String] The annotation provided for the call
|
805
|
-
def annotation
|
806
|
-
@properties['annotation']
|
807
|
-
end
|
808
|
-
|
809
|
-
##
|
810
|
-
# @return [String] The API Version used to create the call
|
811
|
-
def api_version
|
812
|
-
@properties['api_version']
|
813
|
-
end
|
814
|
-
|
815
|
-
##
|
816
|
-
# @return [String] The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty.
|
817
|
-
def forwarded_from
|
818
|
-
@properties['forwarded_from']
|
819
|
-
end
|
820
|
-
|
821
|
-
##
|
822
|
-
# @return [String] The Group SID associated with this call. If no Group is associated with the call, the field is empty.
|
823
|
-
def group_sid
|
824
|
-
@properties['group_sid']
|
825
|
-
end
|
826
|
-
|
827
|
-
##
|
828
|
-
# @return [String] The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty.
|
829
|
-
def caller_name
|
830
|
-
@properties['caller_name']
|
831
|
-
end
|
832
|
-
|
833
|
-
##
|
834
|
-
# @return [String] The wait time in milliseconds before the call is placed.
|
835
|
-
def queue_time
|
836
|
-
@properties['queue_time']
|
837
|
-
end
|
838
|
-
|
839
|
-
##
|
840
|
-
# @return [String] The (optional) unique identifier of the trunk resource that was used for this call.
|
841
|
-
def trunk_sid
|
842
|
-
@properties['trunk_sid']
|
843
|
-
end
|
844
|
-
|
845
|
-
##
|
846
|
-
# @return [String] The URI of this resource, relative to `https://api.twilio.com`
|
847
|
-
def uri
|
848
|
-
@properties['uri']
|
849
|
-
end
|
850
|
-
|
851
|
-
##
|
852
|
-
# @return [String] A list of related subresources identified by their relative URIs
|
853
|
-
def subresource_uris
|
854
|
-
@properties['subresource_uris']
|
855
|
-
end
|
856
|
-
|
857
|
-
##
|
858
|
-
# Delete the CallInstance
|
859
|
-
# @return [Boolean] true if delete succeeds, false otherwise
|
860
|
-
def delete
|
861
|
-
context.delete
|
862
|
-
end
|
863
|
-
|
864
|
-
##
|
865
|
-
# Fetch the CallInstance
|
866
|
-
# @return [CallInstance] Fetched CallInstance
|
867
|
-
def fetch
|
868
|
-
context.fetch
|
869
|
-
end
|
870
|
-
|
871
|
-
##
|
872
|
-
# Update the CallInstance
|
873
|
-
# @param [String] url The absolute URL that returns the TwiML instructions for the
|
874
|
-
# call. We will call this URL using the `method` when the call connects. For more
|
875
|
-
# information, see the {Url
|
876
|
-
# Parameter}[https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter]
|
877
|
-
# section in {Making Calls}[https://www.twilio.com/docs/voice/make-calls].
|
878
|
-
# @param [String] method The HTTP method we should use when calling the `url`. Can
|
879
|
-
# be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter
|
880
|
-
# is present, this parameter is ignored.
|
881
|
-
# @param [call.UpdateStatus] status The new status of the resource. Can be:
|
882
|
-
# `canceled` or `completed`. Specifying `canceled` will attempt to hang up calls
|
883
|
-
# that are queued or ringing; however, it will not affect calls already in
|
884
|
-
# progress. Specifying `completed` will attempt to hang up a call even if it's
|
885
|
-
# already in progress.
|
886
|
-
# @param [String] fallback_url The URL that we call using the `fallback_method` if
|
887
|
-
# an error occurs when requesting or executing the TwiML at `url`. If an
|
888
|
-
# `application_sid` parameter is present, this parameter is ignored.
|
889
|
-
# @param [String] fallback_method The HTTP method that we should use to request
|
890
|
-
# the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an
|
891
|
-
# `application_sid` parameter is present, this parameter is ignored.
|
892
|
-
# @param [String] status_callback The URL we should call using the
|
893
|
-
# `status_callback_method` to send status information to your application. If no
|
894
|
-
# `status_callback_event` is specified, we will send the `completed` status. If an
|
895
|
-
# `application_sid` parameter is present, this parameter is ignored. URLs must
|
896
|
-
# contain a valid hostname (underscores are not permitted).
|
897
|
-
# @param [String] status_callback_method The HTTP method we should use when
|
898
|
-
# requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is
|
899
|
-
# `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
900
|
-
# @param [String] twiml TwiML instructions for the call Twilio will use without
|
901
|
-
# fetching Twiml from url. Twiml and url parameters are mutually exclusive
|
902
|
-
# @param [String] time_limit The maximum duration of the call in seconds.
|
903
|
-
# Constraints depend on account and configuration.
|
904
|
-
# @return [CallInstance] Updated CallInstance
|
905
|
-
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset, time_limit: :unset)
|
906
|
-
context.update(
|
907
|
-
url: url,
|
908
|
-
method: method,
|
909
|
-
status: status,
|
910
|
-
fallback_url: fallback_url,
|
911
|
-
fallback_method: fallback_method,
|
912
|
-
status_callback: status_callback,
|
913
|
-
status_callback_method: status_callback_method,
|
914
|
-
twiml: twiml,
|
915
|
-
time_limit: time_limit,
|
916
|
-
)
|
917
|
-
end
|
918
|
-
|
919
|
-
##
|
920
|
-
# Access the recordings
|
921
|
-
# @return [recordings] recordings
|
922
|
-
def recordings
|
923
|
-
context.recordings
|
924
|
-
end
|
925
|
-
|
926
|
-
##
|
927
|
-
# Access the notifications
|
928
|
-
# @return [notifications] notifications
|
929
|
-
def notifications
|
930
|
-
context.notifications
|
931
|
-
end
|
932
|
-
|
933
|
-
##
|
934
|
-
# Access the feedback
|
935
|
-
# @return [feedback] feedback
|
936
|
-
def feedback
|
937
|
-
context.feedback
|
938
|
-
end
|
939
|
-
|
940
|
-
##
|
941
|
-
# Access the events
|
942
|
-
# @return [events] events
|
943
|
-
def events
|
944
|
-
context.events
|
945
|
-
end
|
946
|
-
|
947
|
-
##
|
948
|
-
# Access the payments
|
949
|
-
# @return [payments] payments
|
950
|
-
def payments
|
951
|
-
context.payments
|
952
|
-
end
|
953
|
-
|
954
|
-
##
|
955
|
-
# Access the siprec
|
956
|
-
# @return [siprec] siprec
|
957
|
-
def siprec
|
958
|
-
context.siprec
|
959
|
-
end
|
960
14
|
|
961
|
-
##
|
962
|
-
# Provide a user friendly representation
|
963
|
-
def to_s
|
964
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
965
|
-
"<Twilio.Api.V2010.CallInstance #{values}>"
|
966
|
-
end
|
967
15
|
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
16
|
+
module Twilio
|
17
|
+
module REST
|
18
|
+
class Api < ApiBase
|
19
|
+
class V2010 < Version
|
20
|
+
class AccountContext < InstanceContext
|
21
|
+
|
22
|
+
class CallList < ListResource
|
23
|
+
##
|
24
|
+
# Initialize the CallList
|
25
|
+
# @param [Version] version Version that contains the resource
|
26
|
+
# @return [CallList] CallList
|
27
|
+
def initialize(version, account_sid: nil)
|
28
|
+
super(version)
|
29
|
+
# Path Solution
|
30
|
+
@solution = { account_sid: account_sid }
|
31
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/Calls.json"
|
32
|
+
# Components
|
33
|
+
@feedback_summaries = nil
|
34
|
+
end
|
35
|
+
##
|
36
|
+
# Create the CallInstance
|
37
|
+
# @param [String] to The phone number, SIP address, or client identifier to call.
|
38
|
+
# @param [String] from The phone number or client identifier to use as the caller id. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `From` must also be a phone number.
|
39
|
+
# @param [String] method The HTTP method we should use when calling the `url` parameter's value. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
40
|
+
# @param [String] fallback_url The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored.
|
41
|
+
# @param [String] fallback_method The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
42
|
+
# @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted).
|
43
|
+
# @param [Array[String]] status_callback_event The call progress events that we will send to the `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, and `completed`. If no event is specified, we send the `completed` status. If you want to receive multiple events, specify each one in a separate `status_callback_event` parameter. See the code sample for [monitoring call progress](https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json). If an `application_sid` is present, this parameter is ignored.
|
44
|
+
# @param [String] status_callback_method The HTTP method we should use when calling the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
45
|
+
# @param [String] send_digits A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example, if you connected to a company phone number and wanted to pause for one second, and then dial extension 1234 followed by the pound key, the value of this parameter would be `ww1234#`. Remember to URL-encode this string, since the '`#`' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored.
|
46
|
+
# @param [String] timeout The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail.
|
47
|
+
# @param [Boolean] record Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`. The `recording_url` is sent to the `status_callback` URL.
|
48
|
+
# @param [String] recording_channels The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call.
|
49
|
+
# @param [String] recording_status_callback The URL that we call when the recording is available to be accessed.
|
50
|
+
# @param [String] recording_status_callback_method The HTTP method we should use when calling the `recording_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
|
51
|
+
# @param [String] sip_auth_username The username used to authenticate the caller making a SIP call.
|
52
|
+
# @param [String] sip_auth_password The password required to authenticate the user account specified in `sip_auth_username`.
|
53
|
+
# @param [String] machine_detection Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. If `send_digits` is provided, this parameter is ignored. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection).
|
54
|
+
# @param [String] machine_detection_timeout The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds.
|
55
|
+
# @param [Array[String]] recording_status_callback_event The recording status events that will trigger calls to the URL specified in `recording_status_callback`. Can be: `in-progress`, `completed` and `absent`. Defaults to `completed`. Separate multiple values with a space.
|
56
|
+
# @param [String] trim Whether to trim any leading and trailing silence from the recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
|
57
|
+
# @param [String] caller_id The phone number, SIP address, or Client identifier that made this call. Phone numbers are in [E.164 format](https://wwnw.twilio.com/docs/glossary/what-e164) (e.g., +16175551212). SIP addresses are formatted as `name@company.com`.
|
58
|
+
# @param [String] machine_detection_speech_threshold The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400.
|
59
|
+
# @param [String] machine_detection_speech_end_threshold The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200.
|
60
|
+
# @param [String] machine_detection_silence_timeout The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000.
|
61
|
+
# @param [String] async_amd Select whether to perform answering machine detection in the background. Default, blocks the execution of the call until Answering Machine Detection is completed. Can be: `true` or `false`.
|
62
|
+
# @param [String] async_amd_status_callback The URL that we should call using the `async_amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax.
|
63
|
+
# @param [String] async_amd_status_callback_method The HTTP method we should use when calling the `async_amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
|
64
|
+
# @param [String] byoc The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta)
|
65
|
+
# @param [String] call_reason The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta)
|
66
|
+
# @param [String] call_token A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call.
|
67
|
+
# @param [String] recording_track The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio.
|
68
|
+
# @param [String] time_limit The maximum duration of the call in seconds. Constraints depend on account and configuration.
|
69
|
+
# @param [String] url The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls).
|
70
|
+
# @param [String] twiml TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored. Max 4000 characters.
|
71
|
+
# @param [String] application_sid The SID of the Application resource that will handle the call, if the call will be handled by an application.
|
72
|
+
# @return [CallInstance] Created CallInstance
|
73
|
+
def create(
|
74
|
+
to: nil,
|
75
|
+
from: nil,
|
76
|
+
method: :unset,
|
77
|
+
fallback_url: :unset,
|
78
|
+
fallback_method: :unset,
|
79
|
+
status_callback: :unset,
|
80
|
+
status_callback_event: :unset,
|
81
|
+
status_callback_method: :unset,
|
82
|
+
send_digits: :unset,
|
83
|
+
timeout: :unset,
|
84
|
+
record: :unset,
|
85
|
+
recording_channels: :unset,
|
86
|
+
recording_status_callback: :unset,
|
87
|
+
recording_status_callback_method: :unset,
|
88
|
+
sip_auth_username: :unset,
|
89
|
+
sip_auth_password: :unset,
|
90
|
+
machine_detection: :unset,
|
91
|
+
machine_detection_timeout: :unset,
|
92
|
+
recording_status_callback_event: :unset,
|
93
|
+
trim: :unset,
|
94
|
+
caller_id: :unset,
|
95
|
+
machine_detection_speech_threshold: :unset,
|
96
|
+
machine_detection_speech_end_threshold: :unset,
|
97
|
+
machine_detection_silence_timeout: :unset,
|
98
|
+
async_amd: :unset,
|
99
|
+
async_amd_status_callback: :unset,
|
100
|
+
async_amd_status_callback_method: :unset,
|
101
|
+
byoc: :unset,
|
102
|
+
call_reason: :unset,
|
103
|
+
call_token: :unset,
|
104
|
+
recording_track: :unset,
|
105
|
+
time_limit: :unset,
|
106
|
+
url: :unset,
|
107
|
+
twiml: :unset,
|
108
|
+
application_sid: :unset
|
109
|
+
)
|
110
|
+
|
111
|
+
data = Twilio::Values.of({
|
112
|
+
'To' => to,
|
113
|
+
'From' => from,
|
114
|
+
'Method' => method,
|
115
|
+
'FallbackUrl' => fallback_url,
|
116
|
+
'FallbackMethod' => fallback_method,
|
117
|
+
'StatusCallback' => status_callback,
|
118
|
+
'StatusCallbackEvent' => Twilio.serialize_list(status_callback_event) { |e| e },
|
119
|
+
'StatusCallbackMethod' => status_callback_method,
|
120
|
+
'SendDigits' => send_digits,
|
121
|
+
'Timeout' => timeout,
|
122
|
+
'Record' => record,
|
123
|
+
'RecordingChannels' => recording_channels,
|
124
|
+
'RecordingStatusCallback' => recording_status_callback,
|
125
|
+
'RecordingStatusCallbackMethod' => recording_status_callback_method,
|
126
|
+
'SipAuthUsername' => sip_auth_username,
|
127
|
+
'SipAuthPassword' => sip_auth_password,
|
128
|
+
'MachineDetection' => machine_detection,
|
129
|
+
'MachineDetectionTimeout' => machine_detection_timeout,
|
130
|
+
'RecordingStatusCallbackEvent' => Twilio.serialize_list(recording_status_callback_event) { |e| e },
|
131
|
+
'Trim' => trim,
|
132
|
+
'CallerId' => caller_id,
|
133
|
+
'MachineDetectionSpeechThreshold' => machine_detection_speech_threshold,
|
134
|
+
'MachineDetectionSpeechEndThreshold' => machine_detection_speech_end_threshold,
|
135
|
+
'MachineDetectionSilenceTimeout' => machine_detection_silence_timeout,
|
136
|
+
'AsyncAmd' => async_amd,
|
137
|
+
'AsyncAmdStatusCallback' => async_amd_status_callback,
|
138
|
+
'AsyncAmdStatusCallbackMethod' => async_amd_status_callback_method,
|
139
|
+
'Byoc' => byoc,
|
140
|
+
'CallReason' => call_reason,
|
141
|
+
'CallToken' => call_token,
|
142
|
+
'RecordingTrack' => recording_track,
|
143
|
+
'TimeLimit' => time_limit,
|
144
|
+
'Url' => url,
|
145
|
+
'Twiml' => twiml,
|
146
|
+
'ApplicationSid' => application_sid,
|
147
|
+
})
|
148
|
+
|
149
|
+
payload = @version.create('POST', @uri, data: data)
|
150
|
+
CallInstance.new(
|
151
|
+
@version,
|
152
|
+
payload,
|
153
|
+
account_sid: @solution[:account_sid],
|
154
|
+
)
|
155
|
+
end
|
156
|
+
|
157
|
+
|
158
|
+
##
|
159
|
+
# Lists CallInstance records from the API as a list.
|
160
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
161
|
+
# memory before returning.
|
162
|
+
# @param [String] to Only show calls made to this phone number, SIP address, Client identifier or SIM SID.
|
163
|
+
# @param [String] from Only include calls from this phone number, SIP address, Client identifier or SIM SID.
|
164
|
+
# @param [String] parent_call_sid Only include calls spawned by calls with this SID.
|
165
|
+
# @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
|
166
|
+
# @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
|
167
|
+
# @param [Time] start_time_before Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
|
168
|
+
# @param [Time] start_time_after Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
|
169
|
+
# @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
|
170
|
+
# @param [Time] end_time_before Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
|
171
|
+
# @param [Time] end_time_after Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
|
172
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
173
|
+
# guarantees to never return more than limit. Default is no limit
|
174
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
175
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
176
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
177
|
+
# efficient page size, i.e. min(limit, 1000)
|
178
|
+
# @return [Array] Array of up to limit results
|
179
|
+
def list(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, start_time_before: :unset, start_time_after: :unset, end_time: :unset, end_time_before: :unset, end_time_after: :unset, limit: nil, page_size: nil)
|
180
|
+
self.stream(
|
181
|
+
to: to,
|
182
|
+
from: from,
|
183
|
+
parent_call_sid: parent_call_sid,
|
184
|
+
status: status,
|
185
|
+
start_time: start_time,
|
186
|
+
start_time_before: start_time_before,
|
187
|
+
start_time_after: start_time_after,
|
188
|
+
end_time: end_time,
|
189
|
+
end_time_before: end_time_before,
|
190
|
+
end_time_after: end_time_after,
|
191
|
+
limit: limit,
|
192
|
+
page_size: page_size
|
193
|
+
).entries
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# Streams Instance records from the API as an Enumerable.
|
198
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
199
|
+
# is reached.
|
200
|
+
# @param [String] to Only show calls made to this phone number, SIP address, Client identifier or SIM SID.
|
201
|
+
# @param [String] from Only include calls from this phone number, SIP address, Client identifier or SIM SID.
|
202
|
+
# @param [String] parent_call_sid Only include calls spawned by calls with this SID.
|
203
|
+
# @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
|
204
|
+
# @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
|
205
|
+
# @param [Time] start_time_before Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
|
206
|
+
# @param [Time] start_time_after Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
|
207
|
+
# @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
|
208
|
+
# @param [Time] end_time_before Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
|
209
|
+
# @param [Time] end_time_after Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
|
210
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
211
|
+
# guarantees to never return more than limit. Default is no limit
|
212
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
213
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
214
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
215
|
+
# efficient page size, i.e. min(limit, 1000)
|
216
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
217
|
+
def stream(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, start_time_before: :unset, start_time_after: :unset, end_time: :unset, end_time_before: :unset, end_time_after: :unset, limit: nil, page_size: nil)
|
218
|
+
limits = @version.read_limits(limit, page_size)
|
219
|
+
|
220
|
+
page = self.page(
|
221
|
+
to: to,
|
222
|
+
from: from,
|
223
|
+
parent_call_sid: parent_call_sid,
|
224
|
+
status: status,
|
225
|
+
start_time: start_time,
|
226
|
+
start_time_before: start_time_before,
|
227
|
+
start_time_after: start_time_after,
|
228
|
+
end_time: end_time,
|
229
|
+
end_time_before: end_time_before,
|
230
|
+
end_time_after: end_time_after,
|
231
|
+
page_size: limits[:page_size], )
|
232
|
+
|
233
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
234
|
+
end
|
235
|
+
|
236
|
+
##
|
237
|
+
# When passed a block, yields CallInstance records from the API.
|
238
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
239
|
+
# is reached.
|
240
|
+
def each
|
241
|
+
limits = @version.read_limits
|
242
|
+
|
243
|
+
page = self.page(page_size: limits[:page_size], )
|
244
|
+
|
245
|
+
@version.stream(page,
|
246
|
+
limit: limits[:limit],
|
247
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
248
|
+
end
|
249
|
+
|
250
|
+
##
|
251
|
+
# Retrieve a single page of CallInstance records from the API.
|
252
|
+
# Request is executed immediately.
|
253
|
+
# @param [String] to Only show calls made to this phone number, SIP address, Client identifier or SIM SID.
|
254
|
+
# @param [String] from Only include calls from this phone number, SIP address, Client identifier or SIM SID.
|
255
|
+
# @param [String] parent_call_sid Only include calls spawned by calls with this SID.
|
256
|
+
# @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
|
257
|
+
# @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
|
258
|
+
# @param [Time] start_time_before Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
|
259
|
+
# @param [Time] start_time_after Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
|
260
|
+
# @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
|
261
|
+
# @param [Time] end_time_before Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
|
262
|
+
# @param [Time] end_time_after Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
|
263
|
+
# @param [String] page_token PageToken provided by the API
|
264
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
265
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
266
|
+
# @return [Page] Page of CallInstance
|
267
|
+
def page(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, start_time_before: :unset, start_time_after: :unset, end_time: :unset, end_time_before: :unset, end_time_after: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
268
|
+
params = Twilio::Values.of({
|
269
|
+
'To' => to,
|
270
|
+
'From' => from,
|
271
|
+
'ParentCallSid' => parent_call_sid,
|
272
|
+
'Status' => status,
|
273
|
+
'StartTime' => Twilio.serialize_iso8601_datetime(start_time),
|
274
|
+
'StartTime<' => Twilio.serialize_iso8601_datetime(start_time_before),
|
275
|
+
'StartTime>' => Twilio.serialize_iso8601_datetime(start_time_after),
|
276
|
+
'EndTime' => Twilio.serialize_iso8601_datetime(end_time),
|
277
|
+
'EndTime<' => Twilio.serialize_iso8601_datetime(end_time_before),
|
278
|
+
'EndTime>' => Twilio.serialize_iso8601_datetime(end_time_after),
|
279
|
+
'PageToken' => page_token,
|
280
|
+
'Page' => page_number,
|
281
|
+
'PageSize' => page_size,
|
282
|
+
})
|
283
|
+
|
284
|
+
response = @version.page('GET', @uri, params: params)
|
285
|
+
|
286
|
+
CallPage.new(@version, response, @solution)
|
287
|
+
end
|
288
|
+
|
289
|
+
##
|
290
|
+
# Retrieve a single page of CallInstance records from the API.
|
291
|
+
# Request is executed immediately.
|
292
|
+
# @param [String] target_url API-generated URL for the requested results page
|
293
|
+
# @return [Page] Page of CallInstance
|
294
|
+
def get_page(target_url)
|
295
|
+
response = @version.domain.request(
|
296
|
+
'GET',
|
297
|
+
target_url
|
298
|
+
)
|
299
|
+
CallPage.new(@version, response, @solution)
|
300
|
+
end
|
301
|
+
|
302
|
+
|
303
|
+
##
|
304
|
+
# Access the feedback_summaries
|
305
|
+
# @return [FeedbackSummaryList]
|
306
|
+
# @return [FeedbackSummaryContext] if sid was passed.
|
307
|
+
def feedback_summaries(sid=:unset)
|
308
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
309
|
+
|
310
|
+
if sid != :unset
|
311
|
+
return FeedbackSummaryContext.new(@version, @solution[:account_sid],sid )
|
312
|
+
end
|
313
|
+
|
314
|
+
@feedback_summaries ||= FeedbackSummaryList.new(@version, account_sid: @solution[:account_sid] )
|
315
|
+
end
|
316
|
+
|
317
|
+
# Provide a user friendly representation
|
318
|
+
def to_s
|
319
|
+
'#<Twilio.Api.V2010.CallList>'
|
320
|
+
end
|
321
|
+
end
|
322
|
+
|
323
|
+
|
324
|
+
class CallContext < InstanceContext
|
325
|
+
##
|
326
|
+
# Initialize the CallContext
|
327
|
+
# @param [Version] version Version that contains the resource
|
328
|
+
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to update.
|
329
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the Call resource to update
|
330
|
+
# @return [CallContext] CallContext
|
331
|
+
def initialize(version, account_sid, sid)
|
332
|
+
super(version)
|
333
|
+
|
334
|
+
# Path Solution
|
335
|
+
@solution = { account_sid: account_sid, sid: sid, }
|
336
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:sid]}.json"
|
337
|
+
|
338
|
+
# Dependents
|
339
|
+
@events = nil
|
340
|
+
@user_defined_messages = nil
|
341
|
+
@siprec = nil
|
342
|
+
@user_defined_message_subscriptions = nil
|
343
|
+
@payments = nil
|
344
|
+
@recordings = nil
|
345
|
+
@notifications = nil
|
346
|
+
@feedback = nil
|
347
|
+
@streams = nil
|
348
|
+
end
|
349
|
+
##
|
350
|
+
# Delete the CallInstance
|
351
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
352
|
+
def delete
|
353
|
+
|
354
|
+
@version.delete('DELETE', @uri)
|
355
|
+
end
|
356
|
+
|
357
|
+
##
|
358
|
+
# Fetch the CallInstance
|
359
|
+
# @return [CallInstance] Fetched CallInstance
|
360
|
+
def fetch
|
361
|
+
|
362
|
+
payload = @version.fetch('GET', @uri)
|
363
|
+
CallInstance.new(
|
364
|
+
@version,
|
365
|
+
payload,
|
366
|
+
account_sid: @solution[:account_sid],
|
367
|
+
sid: @solution[:sid],
|
368
|
+
)
|
369
|
+
end
|
370
|
+
|
371
|
+
##
|
372
|
+
# Update the CallInstance
|
373
|
+
# @param [String] url The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls).
|
374
|
+
# @param [String] method The HTTP method we should use when calling the `url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
375
|
+
# @param [UpdateStatus] status
|
376
|
+
# @param [String] fallback_url The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored.
|
377
|
+
# @param [String] fallback_method The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
378
|
+
# @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted).
|
379
|
+
# @param [String] status_callback_method The HTTP method we should use when requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
380
|
+
# @param [String] twiml TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive
|
381
|
+
# @param [String] time_limit The maximum duration of the call in seconds. Constraints depend on account and configuration.
|
382
|
+
# @return [CallInstance] Updated CallInstance
|
383
|
+
def update(
|
384
|
+
url: :unset,
|
385
|
+
method: :unset,
|
386
|
+
status: :unset,
|
387
|
+
fallback_url: :unset,
|
388
|
+
fallback_method: :unset,
|
389
|
+
status_callback: :unset,
|
390
|
+
status_callback_method: :unset,
|
391
|
+
twiml: :unset,
|
392
|
+
time_limit: :unset
|
393
|
+
)
|
394
|
+
|
395
|
+
data = Twilio::Values.of({
|
396
|
+
'Url' => url,
|
397
|
+
'Method' => method,
|
398
|
+
'Status' => status,
|
399
|
+
'FallbackUrl' => fallback_url,
|
400
|
+
'FallbackMethod' => fallback_method,
|
401
|
+
'StatusCallback' => status_callback,
|
402
|
+
'StatusCallbackMethod' => status_callback_method,
|
403
|
+
'Twiml' => twiml,
|
404
|
+
'TimeLimit' => time_limit,
|
405
|
+
})
|
406
|
+
|
407
|
+
payload = @version.update('POST', @uri, data: data)
|
408
|
+
CallInstance.new(
|
409
|
+
@version,
|
410
|
+
payload,
|
411
|
+
account_sid: @solution[:account_sid],
|
412
|
+
sid: @solution[:sid],
|
413
|
+
)
|
414
|
+
end
|
415
|
+
|
416
|
+
##
|
417
|
+
# Access the events
|
418
|
+
# @return [EventList]
|
419
|
+
# @return [EventContext]
|
420
|
+
def events
|
421
|
+
unless @events
|
422
|
+
@events = EventList.new(
|
423
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
424
|
+
end
|
425
|
+
@events
|
426
|
+
end
|
427
|
+
##
|
428
|
+
# Access the user_defined_messages
|
429
|
+
# @return [UserDefinedMessageList]
|
430
|
+
# @return [UserDefinedMessageContext]
|
431
|
+
def user_defined_messages
|
432
|
+
unless @user_defined_messages
|
433
|
+
@user_defined_messages = UserDefinedMessageList.new(
|
434
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
435
|
+
end
|
436
|
+
@user_defined_messages
|
437
|
+
end
|
438
|
+
##
|
439
|
+
# Access the siprec
|
440
|
+
# @return [SiprecList]
|
441
|
+
# @return [SiprecContext] if sid was passed.
|
442
|
+
def siprec(sid=:unset)
|
443
|
+
|
444
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
445
|
+
|
446
|
+
if sid != :unset
|
447
|
+
return SiprecContext.new(@version, @solution[:account_sid], @solution[:sid],sid )
|
448
|
+
end
|
449
|
+
|
450
|
+
unless @siprec
|
451
|
+
@siprec = SiprecList.new(
|
452
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
453
|
+
end
|
454
|
+
|
455
|
+
@siprec
|
456
|
+
end
|
457
|
+
##
|
458
|
+
# Access the user_defined_message_subscriptions
|
459
|
+
# @return [UserDefinedMessageSubscriptionList]
|
460
|
+
# @return [UserDefinedMessageSubscriptionContext] if sid was passed.
|
461
|
+
def user_defined_message_subscriptions(sid=:unset)
|
462
|
+
|
463
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
464
|
+
|
465
|
+
if sid != :unset
|
466
|
+
return UserDefinedMessageSubscriptionContext.new(@version, @solution[:account_sid], @solution[:sid],sid )
|
467
|
+
end
|
468
|
+
|
469
|
+
unless @user_defined_message_subscriptions
|
470
|
+
@user_defined_message_subscriptions = UserDefinedMessageSubscriptionList.new(
|
471
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
472
|
+
end
|
473
|
+
|
474
|
+
@user_defined_message_subscriptions
|
475
|
+
end
|
476
|
+
##
|
477
|
+
# Access the payments
|
478
|
+
# @return [PaymentList]
|
479
|
+
# @return [PaymentContext] if sid was passed.
|
480
|
+
def payments(sid=:unset)
|
481
|
+
|
482
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
483
|
+
|
484
|
+
if sid != :unset
|
485
|
+
return PaymentContext.new(@version, @solution[:account_sid], @solution[:sid],sid )
|
486
|
+
end
|
487
|
+
|
488
|
+
unless @payments
|
489
|
+
@payments = PaymentList.new(
|
490
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
491
|
+
end
|
492
|
+
|
493
|
+
@payments
|
494
|
+
end
|
495
|
+
##
|
496
|
+
# Access the recordings
|
497
|
+
# @return [RecordingList]
|
498
|
+
# @return [RecordingContext] if sid was passed.
|
499
|
+
def recordings(sid=:unset)
|
500
|
+
|
501
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
502
|
+
|
503
|
+
if sid != :unset
|
504
|
+
return RecordingContext.new(@version, @solution[:account_sid], @solution[:sid],sid )
|
505
|
+
end
|
506
|
+
|
507
|
+
unless @recordings
|
508
|
+
@recordings = RecordingList.new(
|
509
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
510
|
+
end
|
511
|
+
|
512
|
+
@recordings
|
513
|
+
end
|
514
|
+
##
|
515
|
+
# Access the notifications
|
516
|
+
# @return [NotificationList]
|
517
|
+
# @return [NotificationContext] if sid was passed.
|
518
|
+
def notifications(sid=:unset)
|
519
|
+
|
520
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
521
|
+
|
522
|
+
if sid != :unset
|
523
|
+
return NotificationContext.new(@version, @solution[:account_sid], @solution[:sid],sid )
|
524
|
+
end
|
525
|
+
|
526
|
+
unless @notifications
|
527
|
+
@notifications = NotificationList.new(
|
528
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
529
|
+
end
|
530
|
+
|
531
|
+
@notifications
|
532
|
+
end
|
533
|
+
##
|
534
|
+
# Access the feedback
|
535
|
+
# @return [FeedbackList]
|
536
|
+
# @return [FeedbackContext]
|
537
|
+
def feedback
|
538
|
+
FeedbackContext.new(
|
539
|
+
@version,
|
540
|
+
@solution[:account_sid],
|
541
|
+
@solution[:sid]
|
542
|
+
)
|
543
|
+
end
|
544
|
+
##
|
545
|
+
# Access the streams
|
546
|
+
# @return [StreamList]
|
547
|
+
# @return [StreamContext] if sid was passed.
|
548
|
+
def streams(sid=:unset)
|
549
|
+
|
550
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
551
|
+
|
552
|
+
if sid != :unset
|
553
|
+
return StreamContext.new(@version, @solution[:account_sid], @solution[:sid],sid )
|
554
|
+
end
|
555
|
+
|
556
|
+
unless @streams
|
557
|
+
@streams = StreamList.new(
|
558
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
559
|
+
end
|
560
|
+
|
561
|
+
@streams
|
562
|
+
end
|
563
|
+
|
564
|
+
##
|
565
|
+
# Provide a user friendly representation
|
566
|
+
def to_s
|
567
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
568
|
+
"#<Twilio.Api.V2010.CallContext #{context}>"
|
569
|
+
end
|
570
|
+
|
571
|
+
##
|
572
|
+
# Provide a detailed, user friendly representation
|
573
|
+
def inspect
|
574
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
575
|
+
"#<Twilio.Api.V2010.CallContext #{context}>"
|
576
|
+
end
|
577
|
+
end
|
578
|
+
|
579
|
+
class CallPage < Page
|
580
|
+
##
|
581
|
+
# Initialize the CallPage
|
582
|
+
# @param [Version] version Version that contains the resource
|
583
|
+
# @param [Response] response Response from the API
|
584
|
+
# @param [Hash] solution Path solution for the resource
|
585
|
+
# @return [CallPage] CallPage
|
586
|
+
def initialize(version, response, solution)
|
587
|
+
super(version, response)
|
588
|
+
|
589
|
+
# Path Solution
|
590
|
+
@solution = solution
|
591
|
+
end
|
592
|
+
|
593
|
+
##
|
594
|
+
# Build an instance of CallInstance
|
595
|
+
# @param [Hash] payload Payload response from the API
|
596
|
+
# @return [CallInstance] CallInstance
|
597
|
+
def get_instance(payload)
|
598
|
+
CallInstance.new(@version, payload, account_sid: @solution[:account_sid])
|
599
|
+
end
|
600
|
+
|
601
|
+
##
|
602
|
+
# Provide a user friendly representation
|
603
|
+
def to_s
|
604
|
+
'<Twilio.Api.V2010.CallPage>'
|
605
|
+
end
|
606
|
+
end
|
607
|
+
class CallInstance < InstanceResource
|
608
|
+
##
|
609
|
+
# Initialize the CallInstance
|
610
|
+
# @param [Version] version Version that contains the resource
|
611
|
+
# @param [Hash] payload payload that contains response from Twilio
|
612
|
+
# @param [String] account_sid The SID of the
|
613
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Call
|
614
|
+
# resource.
|
615
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
616
|
+
# @return [CallInstance] CallInstance
|
617
|
+
def initialize(version, payload , account_sid: nil, sid: nil)
|
618
|
+
super(version)
|
619
|
+
|
620
|
+
# Marshaled Properties
|
621
|
+
@properties = {
|
622
|
+
'sid' => payload['sid'],
|
623
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
624
|
+
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
625
|
+
'parent_call_sid' => payload['parent_call_sid'],
|
626
|
+
'account_sid' => payload['account_sid'],
|
627
|
+
'to' => payload['to'],
|
628
|
+
'to_formatted' => payload['to_formatted'],
|
629
|
+
'from' => payload['from'],
|
630
|
+
'from_formatted' => payload['from_formatted'],
|
631
|
+
'phone_number_sid' => payload['phone_number_sid'],
|
632
|
+
'status' => payload['status'],
|
633
|
+
'start_time' => Twilio.deserialize_rfc2822(payload['start_time']),
|
634
|
+
'end_time' => Twilio.deserialize_rfc2822(payload['end_time']),
|
635
|
+
'duration' => payload['duration'],
|
636
|
+
'price' => payload['price'],
|
637
|
+
'price_unit' => payload['price_unit'],
|
638
|
+
'direction' => payload['direction'],
|
639
|
+
'answered_by' => payload['answered_by'],
|
640
|
+
'api_version' => payload['api_version'],
|
641
|
+
'forwarded_from' => payload['forwarded_from'],
|
642
|
+
'group_sid' => payload['group_sid'],
|
643
|
+
'caller_name' => payload['caller_name'],
|
644
|
+
'queue_time' => payload['queue_time'],
|
645
|
+
'trunk_sid' => payload['trunk_sid'],
|
646
|
+
'uri' => payload['uri'],
|
647
|
+
'subresource_uris' => payload['subresource_uris'],
|
648
|
+
}
|
649
|
+
|
650
|
+
# Context
|
651
|
+
@instance_context = nil
|
652
|
+
@params = { 'account_sid' => account_sid ,'sid' => sid || @properties['sid'] , }
|
653
|
+
end
|
654
|
+
|
655
|
+
##
|
656
|
+
# Generate an instance context for the instance, the context is capable of
|
657
|
+
# performing various actions. All instance actions are proxied to the context
|
658
|
+
# @return [CallContext] CallContext for this CallInstance
|
659
|
+
def context
|
660
|
+
unless @instance_context
|
661
|
+
@instance_context = CallContext.new(@version , @params['account_sid'], @params['sid'])
|
662
|
+
end
|
663
|
+
@instance_context
|
664
|
+
end
|
665
|
+
|
666
|
+
##
|
667
|
+
# @return [String] The unique string that we created to identify this Call resource.
|
668
|
+
def sid
|
669
|
+
@properties['sid']
|
670
|
+
end
|
671
|
+
|
672
|
+
##
|
673
|
+
# @return [Time] The date and time in GMT that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
674
|
+
def date_created
|
675
|
+
@properties['date_created']
|
676
|
+
end
|
677
|
+
|
678
|
+
##
|
679
|
+
# @return [Time] The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
680
|
+
def date_updated
|
681
|
+
@properties['date_updated']
|
682
|
+
end
|
683
|
+
|
684
|
+
##
|
685
|
+
# @return [String] The SID that identifies the call that created this leg.
|
686
|
+
def parent_call_sid
|
687
|
+
@properties['parent_call_sid']
|
688
|
+
end
|
689
|
+
|
690
|
+
##
|
691
|
+
# @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Call resource.
|
692
|
+
def account_sid
|
693
|
+
@properties['account_sid']
|
694
|
+
end
|
695
|
+
|
696
|
+
##
|
697
|
+
# @return [String] The phone number, SIP address, Client identifier or SIM SID that received this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`. SIM SIDs are formatted as `sim:sid`.
|
698
|
+
def to
|
699
|
+
@properties['to']
|
700
|
+
end
|
701
|
+
|
702
|
+
##
|
703
|
+
# @return [String] The phone number, SIP address or Client identifier that received this call. Formatted for display. Non-North American phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +442071838750).
|
704
|
+
def to_formatted
|
705
|
+
@properties['to_formatted']
|
706
|
+
end
|
707
|
+
|
708
|
+
##
|
709
|
+
# @return [String] The phone number, SIP address, Client identifier or SIM SID that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`. SIM SIDs are formatted as `sim:sid`.
|
710
|
+
def from
|
711
|
+
@properties['from']
|
712
|
+
end
|
713
|
+
|
714
|
+
##
|
715
|
+
# @return [String] The calling phone number, SIP address, or Client identifier formatted for display. Non-North American phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +442071838750).
|
716
|
+
def from_formatted
|
717
|
+
@properties['from_formatted']
|
718
|
+
end
|
719
|
+
|
720
|
+
##
|
721
|
+
# @return [String] If the call was inbound, this is the SID of the IncomingPhoneNumber resource that received the call. If the call was outbound, it is the SID of the OutgoingCallerId resource from which the call was placed.
|
722
|
+
def phone_number_sid
|
723
|
+
@properties['phone_number_sid']
|
724
|
+
end
|
725
|
+
|
726
|
+
##
|
727
|
+
# @return [Status]
|
728
|
+
def status
|
729
|
+
@properties['status']
|
730
|
+
end
|
731
|
+
|
732
|
+
##
|
733
|
+
# @return [Time] The start time of the call, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call has not yet been dialed.
|
734
|
+
def start_time
|
735
|
+
@properties['start_time']
|
736
|
+
end
|
737
|
+
|
738
|
+
##
|
739
|
+
# @return [Time] The time the call ended, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call did not complete successfully.
|
740
|
+
def end_time
|
741
|
+
@properties['end_time']
|
742
|
+
end
|
743
|
+
|
744
|
+
##
|
745
|
+
# @return [String] The length of the call in seconds. This value is empty for busy, failed, unanswered, or ongoing calls.
|
746
|
+
def duration
|
747
|
+
@properties['duration']
|
748
|
+
end
|
749
|
+
|
750
|
+
##
|
751
|
+
# @return [String] The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available.
|
752
|
+
def price
|
753
|
+
@properties['price']
|
754
|
+
end
|
755
|
+
|
756
|
+
##
|
757
|
+
# @return [String] The currency in which `Price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g., `USD`, `EUR`, `JPY`). Always capitalized for calls.
|
758
|
+
def price_unit
|
759
|
+
@properties['price_unit']
|
760
|
+
end
|
761
|
+
|
762
|
+
##
|
763
|
+
# @return [String] A string describing the direction of the call. Can be: `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `<Dial>` verb. Using [Elastic SIP Trunking](https://www.twilio.com/docs/sip-trunking), the values can be [`trunking-terminating`](https://www.twilio.com/docs/sip-trunking#termination) for outgoing calls from your communications infrastructure to the PSTN or [`trunking-originating`](https://www.twilio.com/docs/sip-trunking#origination) for incoming calls to your communications infrastructure from the PSTN.
|
764
|
+
def direction
|
765
|
+
@properties['direction']
|
766
|
+
end
|
767
|
+
|
768
|
+
##
|
769
|
+
# @return [String] Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise.
|
770
|
+
def answered_by
|
771
|
+
@properties['answered_by']
|
772
|
+
end
|
773
|
+
|
774
|
+
##
|
775
|
+
# @return [String] The API version used to create the call.
|
776
|
+
def api_version
|
777
|
+
@properties['api_version']
|
778
|
+
end
|
779
|
+
|
780
|
+
##
|
781
|
+
# @return [String] The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty.
|
782
|
+
def forwarded_from
|
783
|
+
@properties['forwarded_from']
|
784
|
+
end
|
785
|
+
|
786
|
+
##
|
787
|
+
# @return [String] The Group SID associated with this call. If no Group is associated with the call, the field is empty.
|
788
|
+
def group_sid
|
789
|
+
@properties['group_sid']
|
790
|
+
end
|
791
|
+
|
792
|
+
##
|
793
|
+
# @return [String] The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty.
|
794
|
+
def caller_name
|
795
|
+
@properties['caller_name']
|
796
|
+
end
|
797
|
+
|
798
|
+
##
|
799
|
+
# @return [String] The wait time in milliseconds before the call is placed.
|
800
|
+
def queue_time
|
801
|
+
@properties['queue_time']
|
802
|
+
end
|
803
|
+
|
804
|
+
##
|
805
|
+
# @return [String] The unique identifier of the trunk resource that was used for this call. The field is empty if the call was not made using a SIP trunk or if the call is not terminated.
|
806
|
+
def trunk_sid
|
807
|
+
@properties['trunk_sid']
|
808
|
+
end
|
809
|
+
|
810
|
+
##
|
811
|
+
# @return [String] The URI of this resource, relative to `https://api.twilio.com`.
|
812
|
+
def uri
|
813
|
+
@properties['uri']
|
814
|
+
end
|
815
|
+
|
816
|
+
##
|
817
|
+
# @return [Hash] A list of subresources available to this call, identified by their URIs relative to `https://api.twilio.com`.
|
818
|
+
def subresource_uris
|
819
|
+
@properties['subresource_uris']
|
820
|
+
end
|
821
|
+
|
822
|
+
##
|
823
|
+
# Delete the CallInstance
|
824
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
825
|
+
def delete
|
826
|
+
|
827
|
+
context.delete
|
828
|
+
end
|
829
|
+
|
830
|
+
##
|
831
|
+
# Fetch the CallInstance
|
832
|
+
# @return [CallInstance] Fetched CallInstance
|
833
|
+
def fetch
|
834
|
+
|
835
|
+
context.fetch
|
836
|
+
end
|
837
|
+
|
838
|
+
##
|
839
|
+
# Update the CallInstance
|
840
|
+
# @param [String] url The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls).
|
841
|
+
# @param [String] method The HTTP method we should use when calling the `url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
842
|
+
# @param [UpdateStatus] status
|
843
|
+
# @param [String] fallback_url The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored.
|
844
|
+
# @param [String] fallback_method The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
845
|
+
# @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted).
|
846
|
+
# @param [String] status_callback_method The HTTP method we should use when requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
847
|
+
# @param [String] twiml TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive
|
848
|
+
# @param [String] time_limit The maximum duration of the call in seconds. Constraints depend on account and configuration.
|
849
|
+
# @return [CallInstance] Updated CallInstance
|
850
|
+
def update(
|
851
|
+
url: :unset,
|
852
|
+
method: :unset,
|
853
|
+
status: :unset,
|
854
|
+
fallback_url: :unset,
|
855
|
+
fallback_method: :unset,
|
856
|
+
status_callback: :unset,
|
857
|
+
status_callback_method: :unset,
|
858
|
+
twiml: :unset,
|
859
|
+
time_limit: :unset
|
860
|
+
)
|
861
|
+
|
862
|
+
context.update(
|
863
|
+
url: url,
|
864
|
+
method: method,
|
865
|
+
status: status,
|
866
|
+
fallback_url: fallback_url,
|
867
|
+
fallback_method: fallback_method,
|
868
|
+
status_callback: status_callback,
|
869
|
+
status_callback_method: status_callback_method,
|
870
|
+
twiml: twiml,
|
871
|
+
time_limit: time_limit,
|
872
|
+
)
|
873
|
+
end
|
874
|
+
|
875
|
+
##
|
876
|
+
# Access the events
|
877
|
+
# @return [events] events
|
878
|
+
def events
|
879
|
+
context.events
|
880
|
+
end
|
881
|
+
|
882
|
+
##
|
883
|
+
# Access the user_defined_messages
|
884
|
+
# @return [user_defined_messages] user_defined_messages
|
885
|
+
def user_defined_messages
|
886
|
+
context.user_defined_messages
|
887
|
+
end
|
888
|
+
|
889
|
+
##
|
890
|
+
# Access the siprec
|
891
|
+
# @return [siprec] siprec
|
892
|
+
def siprec
|
893
|
+
context.siprec
|
894
|
+
end
|
895
|
+
|
896
|
+
##
|
897
|
+
# Access the user_defined_message_subscriptions
|
898
|
+
# @return [user_defined_message_subscriptions] user_defined_message_subscriptions
|
899
|
+
def user_defined_message_subscriptions
|
900
|
+
context.user_defined_message_subscriptions
|
901
|
+
end
|
902
|
+
|
903
|
+
##
|
904
|
+
# Access the payments
|
905
|
+
# @return [payments] payments
|
906
|
+
def payments
|
907
|
+
context.payments
|
908
|
+
end
|
909
|
+
|
910
|
+
##
|
911
|
+
# Access the recordings
|
912
|
+
# @return [recordings] recordings
|
913
|
+
def recordings
|
914
|
+
context.recordings
|
915
|
+
end
|
916
|
+
|
917
|
+
##
|
918
|
+
# Access the notifications
|
919
|
+
# @return [notifications] notifications
|
920
|
+
def notifications
|
921
|
+
context.notifications
|
922
|
+
end
|
923
|
+
|
924
|
+
##
|
925
|
+
# Access the feedback
|
926
|
+
# @return [feedback] feedback
|
927
|
+
def feedback
|
928
|
+
context.feedback
|
929
|
+
end
|
930
|
+
|
931
|
+
##
|
932
|
+
# Access the streams
|
933
|
+
# @return [streams] streams
|
934
|
+
def streams
|
935
|
+
context.streams
|
936
|
+
end
|
937
|
+
|
938
|
+
##
|
939
|
+
# Provide a user friendly representation
|
940
|
+
def to_s
|
941
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
942
|
+
"<Twilio.Api.V2010.CallInstance #{values}>"
|
943
|
+
end
|
944
|
+
|
945
|
+
##
|
946
|
+
# Provide a detailed, user friendly representation
|
947
|
+
def inspect
|
948
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
949
|
+
"<Twilio.Api.V2010.CallInstance #{values}>"
|
950
|
+
end
|
951
|
+
end
|
952
|
+
|
953
|
+
end
|
973
954
|
end
|
974
|
-
end
|
975
955
|
end
|
976
|
-
end
|
977
956
|
end
|
978
|
-
|
979
|
-
|
957
|
+
end
|
958
|
+
|
959
|
+
|