twilio-ruby 5.40.0 → 5.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +110 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/framework/version.rb +4 -8
- data/lib/twilio-ruby/rest/accounts.rb +12 -0
- data/lib/twilio-ruby/rest/accounts/v1.rb +14 -0
- data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +186 -0
- data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +200 -0
- data/lib/twilio-ruby/rest/api.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +32 -23
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +32 -23
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +32 -23
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +32 -23
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +32 -23
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +32 -23
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +32 -23
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +21 -20
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +20 -14
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +8 -8
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +29 -22
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +10 -10
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +28 -21
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +6 -4
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +19 -18
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +3 -3
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +12 -12
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb +3 -3
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb +3 -3
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +3 -3
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +15 -11
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +3 -3
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +33 -26
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb +3 -3
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +6 -6
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +9 -9
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +31 -24
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb +8 -8
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v1/service.rb +36 -36
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +19 -19
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +28 -28
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +7 -7
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +5 -5
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +8 -8
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service.rb +36 -36
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +18 -18
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +15 -15
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +19 -19
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +54 -54
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +25 -25
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +15 -15
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +5 -5
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +8 -8
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +18 -18
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +20 -20
- data/lib/twilio-ruby/rest/client.rb +1 -1
- data/lib/twilio-ruby/rest/conversations.rb +39 -3
- data/lib/twilio-ruby/rest/conversations/v1.rb +68 -5
- data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +260 -0
- data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +254 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +34 -23
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +15 -20
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +35 -28
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +42 -44
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +14 -19
- data/lib/twilio-ruby/rest/conversations/v1/credential.rb +419 -0
- data/lib/twilio-ruby/rest/conversations/v1/role.rb +366 -0
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +434 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +380 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +263 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +307 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +588 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +541 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +386 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +511 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +449 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +387 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +430 -0
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +409 -0
- data/lib/twilio-ruby/rest/events.rb +20 -2
- data/lib/twilio-ruby/rest/events/v1.rb +34 -2
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +291 -0
- data/lib/twilio-ruby/rest/events/v1/schema.rb +226 -0
- data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +290 -0
- data/lib/twilio-ruby/rest/events/v1/sink.rb +15 -14
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +3 -3
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +5 -4
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +46 -21
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +10 -116
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +28 -27
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +36 -36
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +19 -19
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +28 -28
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +7 -7
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +5 -5
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +8 -8
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +36 -36
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +18 -18
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +15 -15
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +19 -19
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +54 -54
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +25 -25
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +15 -15
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +5 -5
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +8 -8
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +18 -18
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +20 -20
- data/lib/twilio-ruby/rest/lookups.rb +1 -1
- data/lib/twilio-ruby/rest/lookups/v1.rb +1 -1
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +10 -10
- data/lib/twilio-ruby/rest/messaging.rb +6 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v1/deactivation.rb +164 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +39 -36
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +3 -3
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +3 -3
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +3 -3
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +15 -15
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +12 -6
- data/lib/twilio-ruby/rest/notify/v1/service.rb +24 -24
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +10 -10
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +23 -15
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +16 -2
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +18 -4
- data/lib/twilio-ruby/rest/preview.rb +8 -0
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +15 -10
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +9 -6
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +1 -1
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +15 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +4 -4
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +225 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +165 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +0 -26
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +1 -4
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +4 -4
- data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +52 -52
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +4 -4
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +4 -4
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +4 -4
- data/lib/twilio-ruby/rest/pricing/v2/voice.rb +3 -3
- data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +4 -4
- data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +4 -4
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +15 -15
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +13 -11
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +33 -30
- data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +6 -6
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +18 -17
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +9 -9
- data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +8 -8
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +13 -13
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +6 -6
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +5 -5
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +33 -8
- data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +219 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +6 -8
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +8 -8
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +14 -14
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +7 -7
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +6 -6
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +6 -6
- data/lib/twilio-ruby/rest/supersim/v1/command.rb +7 -7
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +6 -6
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +22 -12
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +6 -6
- data/lib/twilio-ruby/rest/sync/v1/service.rb +3 -3
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +6 -6
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +6 -6
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +6 -6
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +6 -6
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +6 -6
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +6 -6
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +12 -12
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +6 -6
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +6 -6
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +4 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +4 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +2 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +16 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +8 -8
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +9 -9
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +4 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +16 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +4 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +4 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +12 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +4 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +4 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +62 -47
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +2 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +3 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +3 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +201 -0
- data/lib/twilio-ruby/rest/verify/v2/service.rb +51 -30
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +13 -16
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +39 -23
- data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +12 -12
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +14 -12
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +5 -5
- data/lib/twilio-ruby/rest/video/v1/composition.rb +13 -9
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +33 -24
- data/lib/twilio-ruby/rest/video/v1/recording.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/room.rb +7 -9
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +2 -2
- data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +9 -9
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +3 -6
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +22 -22
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb +4 -4
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +2 -2
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +7 -7
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +8 -7
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +22 -22
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +4 -4
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +10 -10
- data/lib/twilio-ruby/rest/wireless/v1/usage_record.rb +6 -6
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/framework/version_spec.rb +53 -0
- data/spec/holodeck/holodeck.rb +3 -3
- data/spec/integration/accounts/v1/auth_token_promotion_spec.rb +44 -0
- data/spec/integration/accounts/v1/secondary_auth_token_spec.rb +69 -0
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +30 -0
- data/spec/integration/bulkexports/v1/export/day_spec.rb +5 -5
- data/spec/integration/bulkexports/v1/export_configuration_spec.rb +4 -4
- data/spec/integration/bulkexports/v1/export_spec.rb +3 -3
- data/spec/integration/conversations/v1/{webhook_spec.rb → configuration/webhook_spec.rb} +12 -8
- data/spec/integration/conversations/v1/configuration_spec.rb +87 -0
- data/spec/integration/conversations/v1/conversation/message/delivery_receipt_spec.rb +4 -0
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +6 -6
- data/spec/integration/conversations/v1/conversation_spec.rb +5 -0
- data/spec/integration/conversations/v1/credential_spec.rb +219 -0
- data/spec/integration/conversations/v1/role_spec.rb +249 -0
- data/spec/integration/conversations/v1/service/binding_spec.rb +166 -0
- data/spec/integration/conversations/v1/service/configuration/notification_spec.rb +115 -0
- data/spec/integration/conversations/v1/service/configuration_spec.rb +87 -0
- data/spec/integration/conversations/v1/service/conversation/message/delivery_receipt_spec.rb +144 -0
- data/spec/integration/conversations/v1/service/conversation/message_spec.rb +429 -0
- data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +407 -0
- data/spec/integration/conversations/v1/service/conversation/webhook_spec.rb +299 -0
- data/spec/integration/conversations/v1/service/conversation_spec.rb +289 -0
- data/spec/integration/conversations/v1/service/role_spec.rb +260 -0
- data/spec/integration/conversations/v1/service/user_spec.rb +236 -0
- data/spec/integration/conversations/v1/service_spec.rb +174 -0
- data/spec/integration/conversations/v1/user_spec.rb +226 -0
- data/spec/integration/events/v1/event_type_spec.rb +133 -0
- data/spec/integration/events/v1/schema/schema_version_spec.rb +126 -0
- data/spec/integration/events/v1/schema_spec.rb +46 -0
- data/spec/integration/events/v1/sink_spec.rb +3 -3
- data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +0 -121
- data/spec/integration/events/v1/subscription_spec.rb +41 -3
- data/spec/integration/insights/v1/call/summary_spec.rb +1 -0
- data/spec/integration/messaging/v1/deactivation_spec.rb +40 -0
- data/spec/integration/numbers/v2/regulatory_compliance/end_user_spec.rb +27 -0
- data/spec/integration/numbers/v2/regulatory_compliance/supporting_document_spec.rb +27 -0
- data/spec/integration/preview/trusted_comms/{business/brand/branded_channel → branded_channel}/channel_spec.rb +4 -8
- data/spec/integration/preview/trusted_comms/{business/brand/branded_channel_spec.rb → branded_channel_spec.rb} +5 -9
- data/spec/integration/preview/trusted_comms/business_spec.rb +0 -1
- data/spec/integration/serverless/v1/service/build/build_status_spec.rb +48 -0
- data/spec/integration/serverless/v1/service/build_spec.rb +8 -2
- data/spec/integration/studio/v1/flow/execution/execution_step_spec.rb +1 -0
- data/spec/integration/studio/v2/flow/execution/execution_step_spec.rb +1 -0
- data/spec/integration/supersim/v1/sim_spec.rb +23 -0
- data/spec/integration/trunking/v1/trunk/recording_spec.rb +79 -0
- data/spec/integration/trunking/v1/trunk_spec.rb +4 -0
- data/spec/integration/verify/v2/service/entity/challenge_spec.rb +52 -8
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +8 -13
- data/spec/integration/verify/v2/service_spec.rb +8 -4
- data/spec/integration/video/v1/room_spec.rb +37 -0
- data/spec/spec_helper.rb +1 -1
- metadata +80 -14
- data/lib/twilio-ruby/rest/conversations/v1/webhook.rb +0 -262
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb +0 -233
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +0 -260
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +0 -189
- data/spec/integration/preview/trusted_comms/business/brand_spec.rb +0 -48
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# \ / _ _ _| _ _
|
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
# / /
|
|
6
|
+
#
|
|
7
|
+
# frozen_string_literal: true
|
|
8
|
+
|
|
9
|
+
module Twilio
|
|
10
|
+
module REST
|
|
11
|
+
class Events < Domain
|
|
12
|
+
class V1 < Version
|
|
13
|
+
class SchemaContext < InstanceContext
|
|
14
|
+
##
|
|
15
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
|
16
|
+
class VersionList < ListResource
|
|
17
|
+
##
|
|
18
|
+
# Initialize the VersionList
|
|
19
|
+
# @param [Version] version Version that contains the resource
|
|
20
|
+
# @param [String] id The unique identifier of the schema. Each schema can have
|
|
21
|
+
# multiple versions, that share the same id.
|
|
22
|
+
# @return [VersionList] VersionList
|
|
23
|
+
def initialize(version, id: nil)
|
|
24
|
+
super(version)
|
|
25
|
+
|
|
26
|
+
# Path Solution
|
|
27
|
+
@solution = {id: id}
|
|
28
|
+
@uri = "/Schemas/#{@solution[:id]}/Versions"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
##
|
|
32
|
+
# Lists VersionInstance records from the API as a list.
|
|
33
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
34
|
+
# memory before returning.
|
|
35
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
36
|
+
# guarantees to never return more than limit. Default is no limit
|
|
37
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
|
38
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
|
39
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
40
|
+
# efficient page size, i.e. min(limit, 1000)
|
|
41
|
+
# @return [Array] Array of up to limit results
|
|
42
|
+
def list(limit: nil, page_size: nil)
|
|
43
|
+
self.stream(limit: limit, page_size: page_size).entries
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
##
|
|
47
|
+
# Streams VersionInstance records from the API as an Enumerable.
|
|
48
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
|
49
|
+
# is reached.
|
|
50
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
51
|
+
# guarantees to never return more than limit. Default is no limit.
|
|
52
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
|
53
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
|
54
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
55
|
+
# efficient page size, i.e. min(limit, 1000)
|
|
56
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
57
|
+
def stream(limit: nil, page_size: nil)
|
|
58
|
+
limits = @version.read_limits(limit, page_size)
|
|
59
|
+
|
|
60
|
+
page = self.page(page_size: limits[:page_size], )
|
|
61
|
+
|
|
62
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
##
|
|
66
|
+
# When passed a block, yields VersionInstance records from the API.
|
|
67
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
|
68
|
+
# is reached.
|
|
69
|
+
def each
|
|
70
|
+
limits = @version.read_limits
|
|
71
|
+
|
|
72
|
+
page = self.page(page_size: limits[:page_size], )
|
|
73
|
+
|
|
74
|
+
@version.stream(page,
|
|
75
|
+
limit: limits[:limit],
|
|
76
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
##
|
|
80
|
+
# Retrieve a single page of VersionInstance records from the API.
|
|
81
|
+
# Request is executed immediately.
|
|
82
|
+
# @param [String] page_token PageToken provided by the API
|
|
83
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
84
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
85
|
+
# @return [Page] Page of VersionInstance
|
|
86
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
|
87
|
+
params = Twilio::Values.of({
|
|
88
|
+
'PageToken' => page_token,
|
|
89
|
+
'Page' => page_number,
|
|
90
|
+
'PageSize' => page_size,
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
response = @version.page('GET', @uri, params: params)
|
|
94
|
+
|
|
95
|
+
VersionPage.new(@version, response, @solution)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
##
|
|
99
|
+
# Retrieve a single page of VersionInstance records from the API.
|
|
100
|
+
# Request is executed immediately.
|
|
101
|
+
# @param [String] target_url API-generated URL for the requested results page
|
|
102
|
+
# @return [Page] Page of VersionInstance
|
|
103
|
+
def get_page(target_url)
|
|
104
|
+
response = @version.domain.request(
|
|
105
|
+
'GET',
|
|
106
|
+
target_url
|
|
107
|
+
)
|
|
108
|
+
VersionPage.new(@version, response, @solution)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
##
|
|
112
|
+
# Provide a user friendly representation
|
|
113
|
+
def to_s
|
|
114
|
+
'#<Twilio.Events.V1.VersionList>'
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
##
|
|
119
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
|
120
|
+
class VersionPage < Page
|
|
121
|
+
##
|
|
122
|
+
# Initialize the VersionPage
|
|
123
|
+
# @param [Version] version Version that contains the resource
|
|
124
|
+
# @param [Response] response Response from the API
|
|
125
|
+
# @param [Hash] solution Path solution for the resource
|
|
126
|
+
# @return [VersionPage] VersionPage
|
|
127
|
+
def initialize(version, response, solution)
|
|
128
|
+
super(version, response)
|
|
129
|
+
|
|
130
|
+
# Path Solution
|
|
131
|
+
@solution = solution
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
##
|
|
135
|
+
# Build an instance of VersionInstance
|
|
136
|
+
# @param [Hash] payload Payload response from the API
|
|
137
|
+
# @return [VersionInstance] VersionInstance
|
|
138
|
+
def get_instance(payload)
|
|
139
|
+
VersionInstance.new(@version, payload, id: @solution[:id], )
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
##
|
|
143
|
+
# Provide a user friendly representation
|
|
144
|
+
def to_s
|
|
145
|
+
'<Twilio.Events.V1.VersionPage>'
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
##
|
|
150
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
|
151
|
+
class VersionContext < InstanceContext
|
|
152
|
+
##
|
|
153
|
+
# Initialize the VersionContext
|
|
154
|
+
# @param [Version] version Version that contains the resource
|
|
155
|
+
# @param [String] id The unique identifier of the schema. Each schema can have
|
|
156
|
+
# multiple versions, that share the same id.
|
|
157
|
+
# @param [String] schema_version The version of the schema
|
|
158
|
+
# @return [VersionContext] VersionContext
|
|
159
|
+
def initialize(version, id, schema_version)
|
|
160
|
+
super(version)
|
|
161
|
+
|
|
162
|
+
# Path Solution
|
|
163
|
+
@solution = {id: id, schema_version: schema_version, }
|
|
164
|
+
@uri = "/Schemas/#{@solution[:id]}/Versions/#{@solution[:schema_version]}"
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
##
|
|
168
|
+
# Fetch the VersionInstance
|
|
169
|
+
# @return [VersionInstance] Fetched VersionInstance
|
|
170
|
+
def fetch
|
|
171
|
+
payload = @version.fetch('GET', @uri)
|
|
172
|
+
|
|
173
|
+
VersionInstance.new(
|
|
174
|
+
@version,
|
|
175
|
+
payload,
|
|
176
|
+
id: @solution[:id],
|
|
177
|
+
schema_version: @solution[:schema_version],
|
|
178
|
+
)
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
##
|
|
182
|
+
# Provide a user friendly representation
|
|
183
|
+
def to_s
|
|
184
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
185
|
+
"#<Twilio.Events.V1.VersionContext #{context}>"
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
##
|
|
189
|
+
# Provide a detailed, user friendly representation
|
|
190
|
+
def inspect
|
|
191
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
192
|
+
"#<Twilio.Events.V1.VersionContext #{context}>"
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
##
|
|
197
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
|
198
|
+
class VersionInstance < InstanceResource
|
|
199
|
+
##
|
|
200
|
+
# Initialize the VersionInstance
|
|
201
|
+
# @param [Version] version Version that contains the resource
|
|
202
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
203
|
+
# @param [String] id The unique identifier of the schema. Each schema can have
|
|
204
|
+
# multiple versions, that share the same id.
|
|
205
|
+
# @param [String] schema_version The version of the schema
|
|
206
|
+
# @return [VersionInstance] VersionInstance
|
|
207
|
+
def initialize(version, payload, id: nil, schema_version: nil)
|
|
208
|
+
super(version)
|
|
209
|
+
|
|
210
|
+
# Marshaled Properties
|
|
211
|
+
@properties = {
|
|
212
|
+
'id' => payload['id'],
|
|
213
|
+
'schema_version' => payload['schema_version'].to_i,
|
|
214
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
215
|
+
'url' => payload['url'],
|
|
216
|
+
'raw' => payload['raw'],
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
# Context
|
|
220
|
+
@instance_context = nil
|
|
221
|
+
@params = {'id' => id, 'schema_version' => schema_version || @properties['schema_version'], }
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
##
|
|
225
|
+
# Generate an instance context for the instance, the context is capable of
|
|
226
|
+
# performing various actions. All instance actions are proxied to the context
|
|
227
|
+
# @return [VersionContext] VersionContext for this VersionInstance
|
|
228
|
+
def context
|
|
229
|
+
unless @instance_context
|
|
230
|
+
@instance_context = VersionContext.new(@version, @params['id'], @params['schema_version'], )
|
|
231
|
+
end
|
|
232
|
+
@instance_context
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
##
|
|
236
|
+
# @return [String] The unique identifier of the schema.
|
|
237
|
+
def id
|
|
238
|
+
@properties['id']
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
##
|
|
242
|
+
# @return [String] The version of this schema.
|
|
243
|
+
def schema_version
|
|
244
|
+
@properties['schema_version']
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
##
|
|
248
|
+
# @return [Time] The date the schema version was created.
|
|
249
|
+
def date_created
|
|
250
|
+
@properties['date_created']
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
##
|
|
254
|
+
# @return [String] The URL of this resource.
|
|
255
|
+
def url
|
|
256
|
+
@properties['url']
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
##
|
|
260
|
+
# @return [String] The raw
|
|
261
|
+
def raw
|
|
262
|
+
@properties['raw']
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
##
|
|
266
|
+
# Fetch the VersionInstance
|
|
267
|
+
# @return [VersionInstance] Fetched VersionInstance
|
|
268
|
+
def fetch
|
|
269
|
+
context.fetch
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
##
|
|
273
|
+
# Provide a user friendly representation
|
|
274
|
+
def to_s
|
|
275
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
276
|
+
"<Twilio.Events.V1.VersionInstance #{values}>"
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
##
|
|
280
|
+
# Provide a detailed, user friendly representation
|
|
281
|
+
def inspect
|
|
282
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
283
|
+
"<Twilio.Events.V1.VersionInstance #{values}>"
|
|
284
|
+
end
|
|
285
|
+
end
|
|
286
|
+
end
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
end
|
|
290
|
+
end
|
|
@@ -27,9 +27,10 @@ module Twilio
|
|
|
27
27
|
|
|
28
28
|
##
|
|
29
29
|
# Create the SinkInstance
|
|
30
|
-
# @param [String] description
|
|
31
|
-
# @param [Hash] sink_configuration The
|
|
32
|
-
#
|
|
30
|
+
# @param [String] description A human readable description for the Sink
|
|
31
|
+
# @param [Hash] sink_configuration The information required for Twilio to connect
|
|
32
|
+
# to the provided Sink encoded as JSON.
|
|
33
|
+
# @param [sink.SinkType] sink_type The Sink type. Can only be "kinesis" currently.
|
|
33
34
|
# @return [SinkInstance] Created SinkInstance
|
|
34
35
|
def create(description: nil, sink_configuration: nil, sink_type: nil)
|
|
35
36
|
data = Twilio::Values.of({
|
|
@@ -167,7 +168,7 @@ module Twilio
|
|
|
167
168
|
##
|
|
168
169
|
# Initialize the SinkContext
|
|
169
170
|
# @param [Version] version Version that contains the resource
|
|
170
|
-
# @param [String] sid
|
|
171
|
+
# @param [String] sid A 34 character string that uniquely identifies this Sink.
|
|
171
172
|
# @return [SinkContext] SinkContext
|
|
172
173
|
def initialize(version, sid)
|
|
173
174
|
super(version)
|
|
@@ -243,7 +244,7 @@ module Twilio
|
|
|
243
244
|
# Initialize the SinkInstance
|
|
244
245
|
# @param [Version] version Version that contains the resource
|
|
245
246
|
# @param [Hash] payload payload that contains response from Twilio
|
|
246
|
-
# @param [String] sid
|
|
247
|
+
# @param [String] sid A 34 character string that uniquely identifies this Sink.
|
|
247
248
|
# @return [SinkInstance] SinkInstance
|
|
248
249
|
def initialize(version, payload, sid: nil)
|
|
249
250
|
super(version)
|
|
@@ -278,55 +279,55 @@ module Twilio
|
|
|
278
279
|
end
|
|
279
280
|
|
|
280
281
|
##
|
|
281
|
-
# @return [Time] The
|
|
282
|
+
# @return [Time] The date this Sink was created
|
|
282
283
|
def date_created
|
|
283
284
|
@properties['date_created']
|
|
284
285
|
end
|
|
285
286
|
|
|
286
287
|
##
|
|
287
|
-
# @return [Time] The
|
|
288
|
+
# @return [Time] The date this Sink was updated
|
|
288
289
|
def date_updated
|
|
289
290
|
@properties['date_updated']
|
|
290
291
|
end
|
|
291
292
|
|
|
292
293
|
##
|
|
293
|
-
# @return [String]
|
|
294
|
+
# @return [String] Sink Description
|
|
294
295
|
def description
|
|
295
296
|
@properties['description']
|
|
296
297
|
end
|
|
297
298
|
|
|
298
299
|
##
|
|
299
|
-
# @return [String]
|
|
300
|
+
# @return [String] A string that uniquely identifies this Sink.
|
|
300
301
|
def sid
|
|
301
302
|
@properties['sid']
|
|
302
303
|
end
|
|
303
304
|
|
|
304
305
|
##
|
|
305
|
-
# @return [Hash]
|
|
306
|
+
# @return [Hash] JSON Sink configuration.
|
|
306
307
|
def sink_configuration
|
|
307
308
|
@properties['sink_configuration']
|
|
308
309
|
end
|
|
309
310
|
|
|
310
311
|
##
|
|
311
|
-
# @return [sink.SinkType]
|
|
312
|
+
# @return [sink.SinkType] Sink type.
|
|
312
313
|
def sink_type
|
|
313
314
|
@properties['sink_type']
|
|
314
315
|
end
|
|
315
316
|
|
|
316
317
|
##
|
|
317
|
-
# @return [sink.Status] The
|
|
318
|
+
# @return [sink.Status] The Status of this Sink
|
|
318
319
|
def status
|
|
319
320
|
@properties['status']
|
|
320
321
|
end
|
|
321
322
|
|
|
322
323
|
##
|
|
323
|
-
# @return [String] The
|
|
324
|
+
# @return [String] The URL of this resource.
|
|
324
325
|
def url
|
|
325
326
|
@properties['url']
|
|
326
327
|
end
|
|
327
328
|
|
|
328
329
|
##
|
|
329
|
-
# @return [String]
|
|
330
|
+
# @return [String] Nested resource URLs.
|
|
330
331
|
def links
|
|
331
332
|
@properties['links']
|
|
332
333
|
end
|
|
@@ -17,7 +17,7 @@ module Twilio
|
|
|
17
17
|
##
|
|
18
18
|
# Initialize the SinkTestList
|
|
19
19
|
# @param [Version] version Version that contains the resource
|
|
20
|
-
# @param [String] sid
|
|
20
|
+
# @param [String] sid A 34 character string that uniquely identifies this Sink.
|
|
21
21
|
# @return [SinkTestList] SinkTestList
|
|
22
22
|
def initialize(version, sid: nil)
|
|
23
23
|
super(version)
|
|
@@ -81,7 +81,7 @@ module Twilio
|
|
|
81
81
|
# Initialize the SinkTestInstance
|
|
82
82
|
# @param [Version] version Version that contains the resource
|
|
83
83
|
# @param [Hash] payload payload that contains response from Twilio
|
|
84
|
-
# @param [String] sid
|
|
84
|
+
# @param [String] sid A 34 character string that uniquely identifies this Sink.
|
|
85
85
|
# @return [SinkTestInstance] SinkTestInstance
|
|
86
86
|
def initialize(version, payload, sid: nil)
|
|
87
87
|
super(version)
|
|
@@ -91,7 +91,7 @@ module Twilio
|
|
|
91
91
|
end
|
|
92
92
|
|
|
93
93
|
##
|
|
94
|
-
# @return [String]
|
|
94
|
+
# @return [String] Feedback indicating whether the test event was generated.
|
|
95
95
|
def result
|
|
96
96
|
@properties['result']
|
|
97
97
|
end
|
|
@@ -17,7 +17,7 @@ module Twilio
|
|
|
17
17
|
##
|
|
18
18
|
# Initialize the SinkValidateList
|
|
19
19
|
# @param [Version] version Version that contains the resource
|
|
20
|
-
# @param [String] sid
|
|
20
|
+
# @param [String] sid A 34 character string that uniquely identifies this Sink.
|
|
21
21
|
# @return [SinkValidateList] SinkValidateList
|
|
22
22
|
def initialize(version, sid: nil)
|
|
23
23
|
super(version)
|
|
@@ -29,7 +29,8 @@ module Twilio
|
|
|
29
29
|
|
|
30
30
|
##
|
|
31
31
|
# Create the SinkValidateInstance
|
|
32
|
-
# @param [String] test_id
|
|
32
|
+
# @param [String] test_id A 34 character string that uniquely identifies the test
|
|
33
|
+
# event for a Sink being validated.
|
|
33
34
|
# @return [SinkValidateInstance] Created SinkValidateInstance
|
|
34
35
|
def create(test_id: nil)
|
|
35
36
|
data = Twilio::Values.of({'TestId' => test_id, })
|
|
@@ -84,7 +85,7 @@ module Twilio
|
|
|
84
85
|
# Initialize the SinkValidateInstance
|
|
85
86
|
# @param [Version] version Version that contains the resource
|
|
86
87
|
# @param [Hash] payload payload that contains response from Twilio
|
|
87
|
-
# @param [String] sid
|
|
88
|
+
# @param [String] sid A 34 character string that uniquely identifies this Sink.
|
|
88
89
|
# @return [SinkValidateInstance] SinkValidateInstance
|
|
89
90
|
def initialize(version, payload, sid: nil)
|
|
90
91
|
super(version)
|
|
@@ -94,7 +95,7 @@ module Twilio
|
|
|
94
95
|
end
|
|
95
96
|
|
|
96
97
|
##
|
|
97
|
-
# @return [String]
|
|
98
|
+
# @return [String] Feedback indicating whether the given Sink was validated.
|
|
98
99
|
def result
|
|
99
100
|
@properties['result']
|
|
100
101
|
end
|
|
@@ -107,9 +107,12 @@ module Twilio
|
|
|
107
107
|
|
|
108
108
|
##
|
|
109
109
|
# Create the SubscriptionInstance
|
|
110
|
-
# @param [String] description
|
|
111
|
-
# @param [String] sink_sid The
|
|
112
|
-
#
|
|
110
|
+
# @param [String] description A human readable description for the Subscription
|
|
111
|
+
# @param [String] sink_sid The SID of the sink that events selected by this
|
|
112
|
+
# subscription should be sent to. Sink must be active for the subscription to be
|
|
113
|
+
# created.
|
|
114
|
+
# @param [Hash] types Contains a dictionary of URL links to nested resources of
|
|
115
|
+
# this Subscription.
|
|
113
116
|
# @return [SubscriptionInstance] Created SubscriptionInstance
|
|
114
117
|
def create(description: nil, sink_sid: nil, types: nil)
|
|
115
118
|
data = Twilio::Values.of({
|
|
@@ -167,7 +170,8 @@ module Twilio
|
|
|
167
170
|
##
|
|
168
171
|
# Initialize the SubscriptionContext
|
|
169
172
|
# @param [Version] version Version that contains the resource
|
|
170
|
-
# @param [String] sid
|
|
173
|
+
# @param [String] sid A 34 character string that uniquely identifies this
|
|
174
|
+
# Subscription.
|
|
171
175
|
# @return [SubscriptionContext] SubscriptionContext
|
|
172
176
|
def initialize(version, sid)
|
|
173
177
|
super(version)
|
|
@@ -189,6 +193,21 @@ module Twilio
|
|
|
189
193
|
SubscriptionInstance.new(@version, payload, sid: @solution[:sid], )
|
|
190
194
|
end
|
|
191
195
|
|
|
196
|
+
##
|
|
197
|
+
# Update the SubscriptionInstance
|
|
198
|
+
# @param [String] description A human readable description for the Subscription.
|
|
199
|
+
# @param [String] sink_sid The SID of the sink that events selected by this
|
|
200
|
+
# subscription should be sent to. Sink must be active for the subscription to be
|
|
201
|
+
# created.
|
|
202
|
+
# @return [SubscriptionInstance] Updated SubscriptionInstance
|
|
203
|
+
def update(description: :unset, sink_sid: :unset)
|
|
204
|
+
data = Twilio::Values.of({'Description' => description, 'SinkSid' => sink_sid, })
|
|
205
|
+
|
|
206
|
+
payload = @version.update('POST', @uri, data: data)
|
|
207
|
+
|
|
208
|
+
SubscriptionInstance.new(@version, payload, sid: @solution[:sid], )
|
|
209
|
+
end
|
|
210
|
+
|
|
192
211
|
##
|
|
193
212
|
# Delete the SubscriptionInstance
|
|
194
213
|
# @return [Boolean] true if delete succeeds, false otherwise
|
|
@@ -199,14 +218,8 @@ module Twilio
|
|
|
199
218
|
##
|
|
200
219
|
# Access the subscribed_events
|
|
201
220
|
# @return [SubscribedEventList]
|
|
202
|
-
# @return [SubscribedEventContext]
|
|
203
|
-
def subscribed_events
|
|
204
|
-
raise ArgumentError, 'type cannot be nil' if type.nil?
|
|
205
|
-
|
|
206
|
-
if type != :unset
|
|
207
|
-
return SubscribedEventContext.new(@version, @solution[:sid], type, )
|
|
208
|
-
end
|
|
209
|
-
|
|
221
|
+
# @return [SubscribedEventContext]
|
|
222
|
+
def subscribed_events
|
|
210
223
|
unless @subscribed_events
|
|
211
224
|
@subscribed_events = SubscribedEventList.new(@version, subscription_sid: @solution[:sid], )
|
|
212
225
|
end
|
|
@@ -236,7 +249,8 @@ module Twilio
|
|
|
236
249
|
# Initialize the SubscriptionInstance
|
|
237
250
|
# @param [Version] version Version that contains the resource
|
|
238
251
|
# @param [Hash] payload payload that contains response from Twilio
|
|
239
|
-
# @param [String] sid
|
|
252
|
+
# @param [String] sid A 34 character string that uniquely identifies this
|
|
253
|
+
# Subscription.
|
|
240
254
|
# @return [SubscriptionInstance] SubscriptionInstance
|
|
241
255
|
def initialize(version, payload, sid: nil)
|
|
242
256
|
super(version)
|
|
@@ -270,49 +284,49 @@ module Twilio
|
|
|
270
284
|
end
|
|
271
285
|
|
|
272
286
|
##
|
|
273
|
-
# @return [String]
|
|
287
|
+
# @return [String] Account SID.
|
|
274
288
|
def account_sid
|
|
275
289
|
@properties['account_sid']
|
|
276
290
|
end
|
|
277
291
|
|
|
278
292
|
##
|
|
279
|
-
# @return [String]
|
|
293
|
+
# @return [String] A string that uniquely identifies this Subscription.
|
|
280
294
|
def sid
|
|
281
295
|
@properties['sid']
|
|
282
296
|
end
|
|
283
297
|
|
|
284
298
|
##
|
|
285
|
-
# @return [Time] The
|
|
299
|
+
# @return [Time] The date this Subscription was created
|
|
286
300
|
def date_created
|
|
287
301
|
@properties['date_created']
|
|
288
302
|
end
|
|
289
303
|
|
|
290
304
|
##
|
|
291
|
-
# @return [Time] The
|
|
305
|
+
# @return [Time] The date this Subscription was updated
|
|
292
306
|
def date_updated
|
|
293
307
|
@properties['date_updated']
|
|
294
308
|
end
|
|
295
309
|
|
|
296
310
|
##
|
|
297
|
-
# @return [String]
|
|
311
|
+
# @return [String] Subscription description
|
|
298
312
|
def description
|
|
299
313
|
@properties['description']
|
|
300
314
|
end
|
|
301
315
|
|
|
302
316
|
##
|
|
303
|
-
# @return [String]
|
|
317
|
+
# @return [String] Sink SID.
|
|
304
318
|
def sink_sid
|
|
305
319
|
@properties['sink_sid']
|
|
306
320
|
end
|
|
307
321
|
|
|
308
322
|
##
|
|
309
|
-
# @return [String] The
|
|
323
|
+
# @return [String] The URL of this resource.
|
|
310
324
|
def url
|
|
311
325
|
@properties['url']
|
|
312
326
|
end
|
|
313
327
|
|
|
314
328
|
##
|
|
315
|
-
# @return [String]
|
|
329
|
+
# @return [String] Nested resource URLs.
|
|
316
330
|
def links
|
|
317
331
|
@properties['links']
|
|
318
332
|
end
|
|
@@ -324,6 +338,17 @@ module Twilio
|
|
|
324
338
|
context.fetch
|
|
325
339
|
end
|
|
326
340
|
|
|
341
|
+
##
|
|
342
|
+
# Update the SubscriptionInstance
|
|
343
|
+
# @param [String] description A human readable description for the Subscription.
|
|
344
|
+
# @param [String] sink_sid The SID of the sink that events selected by this
|
|
345
|
+
# subscription should be sent to. Sink must be active for the subscription to be
|
|
346
|
+
# created.
|
|
347
|
+
# @return [SubscriptionInstance] Updated SubscriptionInstance
|
|
348
|
+
def update(description: :unset, sink_sid: :unset)
|
|
349
|
+
context.update(description: description, sink_sid: sink_sid, )
|
|
350
|
+
end
|
|
351
|
+
|
|
327
352
|
##
|
|
328
353
|
# Delete the SubscriptionInstance
|
|
329
354
|
# @return [Boolean] true if delete succeeds, false otherwise
|