twilio-ruby 5.39.0 → 5.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGES.md +80 -1
- data/CONTRIBUTING.md +2 -2
- data/ISSUE_TEMPLATE.md +5 -1
- data/Makefile +1 -1
- data/PULL_REQUEST_TEMPLATE.md +1 -1
- data/README.md +4 -3
- data/lib/twilio-ruby/framework/version.rb +1 -1
- data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +1 -1
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +7 -5
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +79 -60
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +15 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +15 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +15 -1
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +1 -1
- 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/auth_calls_mapping/auth_calls_credential_list_mapping.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +1 -1
- 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/domain/ip_access_control_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/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +1 -1
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +1 -1
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +13 -3
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +1 -1
- data/lib/twilio-ruby/rest/events.rb +55 -0
- data/lib/twilio-ruby/rest/events/v1.rb +59 -0
- data/lib/twilio-ruby/rest/events/v1/sink.rb +380 -0
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +115 -0
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +119 -0
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +363 -0
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +322 -0
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +1 -1
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/call/event.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/call/metric.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +1 -1
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +1 -1
- 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 +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +1 -1
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +1 -1
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +1 -1
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +1 -1
- data/lib/twilio-ruby/rest/notify/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +17 -3
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +1 -1
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +1 -1
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +1 -1
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +1 -1
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +1 -1
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +1 -1
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +1 -1
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +1 -1
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +1 -1
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +1 -1
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +1 -1
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +1 -1
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +1 -1
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +1 -1
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +1 -1
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb +1 -1
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +1 -1
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +1 -1
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +43 -5
- data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +14 -2
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/command.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +13 -12
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +25 -5
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +76 -10
- data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +26 -4
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service.rb +22 -10
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +11 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +4 -1
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/composition.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/recording.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +0 -6
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +6 -20
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/usage_record.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/framework/version_spec.rb +166 -0
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +35 -36
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +39 -40
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +35 -36
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +25 -23
- data/spec/integration/api/v2010/account/message_spec.rb +37 -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/conversation/message_spec.rb +38 -0
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +56 -0
- data/spec/integration/conversations/v1/conversation_spec.rb +30 -0
- data/spec/integration/events/v1/sink/sink_test_spec.rb +42 -0
- data/spec/integration/events/v1/sink/sink_validate_spec.rb +44 -0
- data/spec/integration/events/v1/sink_spec.rb +217 -0
- data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +212 -0
- data/spec/integration/events/v1/subscription_spec.rb +205 -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/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/usage_record_spec.rb +463 -18
- data/spec/integration/trunking/v1/trunk_spec.rb +4 -0
- data/spec/integration/verify/v2/service/access_token_spec.rb +1 -1
- data/spec/integration/verify/v2/service/entity/challenge_spec.rb +8 -8
- data/spec/integration/video/v1/room_spec.rb +37 -0
- data/spec/integration/wireless/v1/sim/data_session_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +24 -2
@@ -0,0 +1,115 @@
|
|
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 SinkContext < 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 SinkTestList < ListResource
|
17
|
+
##
|
18
|
+
# Initialize the SinkTestList
|
19
|
+
# @param [Version] version Version that contains the resource
|
20
|
+
# @param [String] sid A 34 character string that uniquely identifies this Sink.
|
21
|
+
# @return [SinkTestList] SinkTestList
|
22
|
+
def initialize(version, sid: nil)
|
23
|
+
super(version)
|
24
|
+
|
25
|
+
# Path Solution
|
26
|
+
@solution = {sid: sid}
|
27
|
+
@uri = "/Sinks/#{@solution[:sid]}/Test"
|
28
|
+
end
|
29
|
+
|
30
|
+
##
|
31
|
+
# Create the SinkTestInstance
|
32
|
+
# @return [SinkTestInstance] Created SinkTestInstance
|
33
|
+
def create
|
34
|
+
payload = @version.create('POST', @uri)
|
35
|
+
|
36
|
+
SinkTestInstance.new(@version, payload, sid: @solution[:sid], )
|
37
|
+
end
|
38
|
+
|
39
|
+
##
|
40
|
+
# Provide a user friendly representation
|
41
|
+
def to_s
|
42
|
+
'#<Twilio.Events.V1.SinkTestList>'
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# 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.
|
48
|
+
class SinkTestPage < Page
|
49
|
+
##
|
50
|
+
# Initialize the SinkTestPage
|
51
|
+
# @param [Version] version Version that contains the resource
|
52
|
+
# @param [Response] response Response from the API
|
53
|
+
# @param [Hash] solution Path solution for the resource
|
54
|
+
# @return [SinkTestPage] SinkTestPage
|
55
|
+
def initialize(version, response, solution)
|
56
|
+
super(version, response)
|
57
|
+
|
58
|
+
# Path Solution
|
59
|
+
@solution = solution
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# Build an instance of SinkTestInstance
|
64
|
+
# @param [Hash] payload Payload response from the API
|
65
|
+
# @return [SinkTestInstance] SinkTestInstance
|
66
|
+
def get_instance(payload)
|
67
|
+
SinkTestInstance.new(@version, payload, sid: @solution[:sid], )
|
68
|
+
end
|
69
|
+
|
70
|
+
##
|
71
|
+
# Provide a user friendly representation
|
72
|
+
def to_s
|
73
|
+
'<Twilio.Events.V1.SinkTestPage>'
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
##
|
78
|
+
# 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.
|
79
|
+
class SinkTestInstance < InstanceResource
|
80
|
+
##
|
81
|
+
# Initialize the SinkTestInstance
|
82
|
+
# @param [Version] version Version that contains the resource
|
83
|
+
# @param [Hash] payload payload that contains response from Twilio
|
84
|
+
# @param [String] sid A 34 character string that uniquely identifies this Sink.
|
85
|
+
# @return [SinkTestInstance] SinkTestInstance
|
86
|
+
def initialize(version, payload, sid: nil)
|
87
|
+
super(version)
|
88
|
+
|
89
|
+
# Marshaled Properties
|
90
|
+
@properties = {'result' => payload['result'], }
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# @return [String] Feedback indicating whether the test event was generated.
|
95
|
+
def result
|
96
|
+
@properties['result']
|
97
|
+
end
|
98
|
+
|
99
|
+
##
|
100
|
+
# Provide a user friendly representation
|
101
|
+
def to_s
|
102
|
+
"<Twilio.Events.V1.SinkTestInstance>"
|
103
|
+
end
|
104
|
+
|
105
|
+
##
|
106
|
+
# Provide a detailed, user friendly representation
|
107
|
+
def inspect
|
108
|
+
"<Twilio.Events.V1.SinkTestInstance>"
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
@@ -0,0 +1,119 @@
|
|
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 SinkContext < 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 SinkValidateList < ListResource
|
17
|
+
##
|
18
|
+
# Initialize the SinkValidateList
|
19
|
+
# @param [Version] version Version that contains the resource
|
20
|
+
# @param [String] sid A 34 character string that uniquely identifies this Sink.
|
21
|
+
# @return [SinkValidateList] SinkValidateList
|
22
|
+
def initialize(version, sid: nil)
|
23
|
+
super(version)
|
24
|
+
|
25
|
+
# Path Solution
|
26
|
+
@solution = {sid: sid}
|
27
|
+
@uri = "/Sinks/#{@solution[:sid]}/Validate"
|
28
|
+
end
|
29
|
+
|
30
|
+
##
|
31
|
+
# Create the SinkValidateInstance
|
32
|
+
# @param [String] test_id A 34 character string that uniquely identifies the test
|
33
|
+
# event for a Sink being validated.
|
34
|
+
# @return [SinkValidateInstance] Created SinkValidateInstance
|
35
|
+
def create(test_id: nil)
|
36
|
+
data = Twilio::Values.of({'TestId' => test_id, })
|
37
|
+
|
38
|
+
payload = @version.create('POST', @uri, data: data)
|
39
|
+
|
40
|
+
SinkValidateInstance.new(@version, payload, sid: @solution[:sid], )
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Provide a user friendly representation
|
45
|
+
def to_s
|
46
|
+
'#<Twilio.Events.V1.SinkValidateList>'
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# 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.
|
52
|
+
class SinkValidatePage < Page
|
53
|
+
##
|
54
|
+
# Initialize the SinkValidatePage
|
55
|
+
# @param [Version] version Version that contains the resource
|
56
|
+
# @param [Response] response Response from the API
|
57
|
+
# @param [Hash] solution Path solution for the resource
|
58
|
+
# @return [SinkValidatePage] SinkValidatePage
|
59
|
+
def initialize(version, response, solution)
|
60
|
+
super(version, response)
|
61
|
+
|
62
|
+
# Path Solution
|
63
|
+
@solution = solution
|
64
|
+
end
|
65
|
+
|
66
|
+
##
|
67
|
+
# Build an instance of SinkValidateInstance
|
68
|
+
# @param [Hash] payload Payload response from the API
|
69
|
+
# @return [SinkValidateInstance] SinkValidateInstance
|
70
|
+
def get_instance(payload)
|
71
|
+
SinkValidateInstance.new(@version, payload, sid: @solution[:sid], )
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# Provide a user friendly representation
|
76
|
+
def to_s
|
77
|
+
'<Twilio.Events.V1.SinkValidatePage>'
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
##
|
82
|
+
# 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.
|
83
|
+
class SinkValidateInstance < InstanceResource
|
84
|
+
##
|
85
|
+
# Initialize the SinkValidateInstance
|
86
|
+
# @param [Version] version Version that contains the resource
|
87
|
+
# @param [Hash] payload payload that contains response from Twilio
|
88
|
+
# @param [String] sid A 34 character string that uniquely identifies this Sink.
|
89
|
+
# @return [SinkValidateInstance] SinkValidateInstance
|
90
|
+
def initialize(version, payload, sid: nil)
|
91
|
+
super(version)
|
92
|
+
|
93
|
+
# Marshaled Properties
|
94
|
+
@properties = {'result' => payload['result'], }
|
95
|
+
end
|
96
|
+
|
97
|
+
##
|
98
|
+
# @return [String] Feedback indicating whether the given Sink was validated.
|
99
|
+
def result
|
100
|
+
@properties['result']
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Provide a user friendly representation
|
105
|
+
def to_s
|
106
|
+
"<Twilio.Events.V1.SinkValidateInstance>"
|
107
|
+
end
|
108
|
+
|
109
|
+
##
|
110
|
+
# Provide a detailed, user friendly representation
|
111
|
+
def inspect
|
112
|
+
"<Twilio.Events.V1.SinkValidateInstance>"
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
@@ -0,0 +1,363 @@
|
|
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
|
+
##
|
14
|
+
# 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.
|
15
|
+
class SubscriptionList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the SubscriptionList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [SubscriptionList] SubscriptionList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/Subscriptions"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Lists SubscriptionInstance records from the API as a list.
|
30
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
|
+
# memory before returning.
|
32
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
33
|
+
# guarantees to never return more than limit. Default is no limit
|
34
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
35
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
36
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
37
|
+
# efficient page size, i.e. min(limit, 1000)
|
38
|
+
# @return [Array] Array of up to limit results
|
39
|
+
def list(limit: nil, page_size: nil)
|
40
|
+
self.stream(limit: limit, page_size: page_size).entries
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Streams SubscriptionInstance records from the API as an Enumerable.
|
45
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
46
|
+
# is reached.
|
47
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
48
|
+
# guarantees to never return more than limit. Default is no limit.
|
49
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
50
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
51
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
52
|
+
# efficient page size, i.e. min(limit, 1000)
|
53
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
54
|
+
def stream(limit: nil, page_size: nil)
|
55
|
+
limits = @version.read_limits(limit, page_size)
|
56
|
+
|
57
|
+
page = self.page(page_size: limits[:page_size], )
|
58
|
+
|
59
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# When passed a block, yields SubscriptionInstance records from the API.
|
64
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
65
|
+
# is reached.
|
66
|
+
def each
|
67
|
+
limits = @version.read_limits
|
68
|
+
|
69
|
+
page = self.page(page_size: limits[:page_size], )
|
70
|
+
|
71
|
+
@version.stream(page,
|
72
|
+
limit: limits[:limit],
|
73
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# Retrieve a single page of SubscriptionInstance records from the API.
|
78
|
+
# Request is executed immediately.
|
79
|
+
# @param [String] page_token PageToken provided by the API
|
80
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
81
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
82
|
+
# @return [Page] Page of SubscriptionInstance
|
83
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
84
|
+
params = Twilio::Values.of({
|
85
|
+
'PageToken' => page_token,
|
86
|
+
'Page' => page_number,
|
87
|
+
'PageSize' => page_size,
|
88
|
+
})
|
89
|
+
|
90
|
+
response = @version.page('GET', @uri, params: params)
|
91
|
+
|
92
|
+
SubscriptionPage.new(@version, response, @solution)
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Retrieve a single page of SubscriptionInstance records from the API.
|
97
|
+
# Request is executed immediately.
|
98
|
+
# @param [String] target_url API-generated URL for the requested results page
|
99
|
+
# @return [Page] Page of SubscriptionInstance
|
100
|
+
def get_page(target_url)
|
101
|
+
response = @version.domain.request(
|
102
|
+
'GET',
|
103
|
+
target_url
|
104
|
+
)
|
105
|
+
SubscriptionPage.new(@version, response, @solution)
|
106
|
+
end
|
107
|
+
|
108
|
+
##
|
109
|
+
# Create the SubscriptionInstance
|
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.
|
116
|
+
# @return [SubscriptionInstance] Created SubscriptionInstance
|
117
|
+
def create(description: nil, sink_sid: nil, types: nil)
|
118
|
+
data = Twilio::Values.of({
|
119
|
+
'Description' => description,
|
120
|
+
'SinkSid' => sink_sid,
|
121
|
+
'Types' => Twilio.serialize_list(types) { |e| Twilio.serialize_object(e) },
|
122
|
+
})
|
123
|
+
|
124
|
+
payload = @version.create('POST', @uri, data: data)
|
125
|
+
|
126
|
+
SubscriptionInstance.new(@version, payload, )
|
127
|
+
end
|
128
|
+
|
129
|
+
##
|
130
|
+
# Provide a user friendly representation
|
131
|
+
def to_s
|
132
|
+
'#<Twilio.Events.V1.SubscriptionList>'
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
##
|
137
|
+
# 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.
|
138
|
+
class SubscriptionPage < Page
|
139
|
+
##
|
140
|
+
# Initialize the SubscriptionPage
|
141
|
+
# @param [Version] version Version that contains the resource
|
142
|
+
# @param [Response] response Response from the API
|
143
|
+
# @param [Hash] solution Path solution for the resource
|
144
|
+
# @return [SubscriptionPage] SubscriptionPage
|
145
|
+
def initialize(version, response, solution)
|
146
|
+
super(version, response)
|
147
|
+
|
148
|
+
# Path Solution
|
149
|
+
@solution = solution
|
150
|
+
end
|
151
|
+
|
152
|
+
##
|
153
|
+
# Build an instance of SubscriptionInstance
|
154
|
+
# @param [Hash] payload Payload response from the API
|
155
|
+
# @return [SubscriptionInstance] SubscriptionInstance
|
156
|
+
def get_instance(payload)
|
157
|
+
SubscriptionInstance.new(@version, payload, )
|
158
|
+
end
|
159
|
+
|
160
|
+
##
|
161
|
+
# Provide a user friendly representation
|
162
|
+
def to_s
|
163
|
+
'<Twilio.Events.V1.SubscriptionPage>'
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# 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.
|
169
|
+
class SubscriptionContext < InstanceContext
|
170
|
+
##
|
171
|
+
# Initialize the SubscriptionContext
|
172
|
+
# @param [Version] version Version that contains the resource
|
173
|
+
# @param [String] sid A 34 character string that uniquely identifies this
|
174
|
+
# Subscription.
|
175
|
+
# @return [SubscriptionContext] SubscriptionContext
|
176
|
+
def initialize(version, sid)
|
177
|
+
super(version)
|
178
|
+
|
179
|
+
# Path Solution
|
180
|
+
@solution = {sid: sid, }
|
181
|
+
@uri = "/Subscriptions/#{@solution[:sid]}"
|
182
|
+
|
183
|
+
# Dependents
|
184
|
+
@subscribed_events = nil
|
185
|
+
end
|
186
|
+
|
187
|
+
##
|
188
|
+
# Fetch the SubscriptionInstance
|
189
|
+
# @return [SubscriptionInstance] Fetched SubscriptionInstance
|
190
|
+
def fetch
|
191
|
+
payload = @version.fetch('GET', @uri)
|
192
|
+
|
193
|
+
SubscriptionInstance.new(@version, payload, sid: @solution[:sid], )
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# Delete the SubscriptionInstance
|
198
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
199
|
+
def delete
|
200
|
+
@version.delete('DELETE', @uri)
|
201
|
+
end
|
202
|
+
|
203
|
+
##
|
204
|
+
# Access the subscribed_events
|
205
|
+
# @return [SubscribedEventList]
|
206
|
+
# @return [SubscribedEventContext] if type was passed.
|
207
|
+
def subscribed_events(type=:unset)
|
208
|
+
raise ArgumentError, 'type cannot be nil' if type.nil?
|
209
|
+
|
210
|
+
if type != :unset
|
211
|
+
return SubscribedEventContext.new(@version, @solution[:sid], type, )
|
212
|
+
end
|
213
|
+
|
214
|
+
unless @subscribed_events
|
215
|
+
@subscribed_events = SubscribedEventList.new(@version, subscription_sid: @solution[:sid], )
|
216
|
+
end
|
217
|
+
|
218
|
+
@subscribed_events
|
219
|
+
end
|
220
|
+
|
221
|
+
##
|
222
|
+
# Provide a user friendly representation
|
223
|
+
def to_s
|
224
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
225
|
+
"#<Twilio.Events.V1.SubscriptionContext #{context}>"
|
226
|
+
end
|
227
|
+
|
228
|
+
##
|
229
|
+
# Provide a detailed, user friendly representation
|
230
|
+
def inspect
|
231
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
232
|
+
"#<Twilio.Events.V1.SubscriptionContext #{context}>"
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
##
|
237
|
+
# 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.
|
238
|
+
class SubscriptionInstance < InstanceResource
|
239
|
+
##
|
240
|
+
# Initialize the SubscriptionInstance
|
241
|
+
# @param [Version] version Version that contains the resource
|
242
|
+
# @param [Hash] payload payload that contains response from Twilio
|
243
|
+
# @param [String] sid A 34 character string that uniquely identifies this
|
244
|
+
# Subscription.
|
245
|
+
# @return [SubscriptionInstance] SubscriptionInstance
|
246
|
+
def initialize(version, payload, sid: nil)
|
247
|
+
super(version)
|
248
|
+
|
249
|
+
# Marshaled Properties
|
250
|
+
@properties = {
|
251
|
+
'account_sid' => payload['account_sid'],
|
252
|
+
'sid' => payload['sid'],
|
253
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
254
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
255
|
+
'description' => payload['description'],
|
256
|
+
'sink_sid' => payload['sink_sid'],
|
257
|
+
'url' => payload['url'],
|
258
|
+
'links' => payload['links'],
|
259
|
+
}
|
260
|
+
|
261
|
+
# Context
|
262
|
+
@instance_context = nil
|
263
|
+
@params = {'sid' => sid || @properties['sid'], }
|
264
|
+
end
|
265
|
+
|
266
|
+
##
|
267
|
+
# Generate an instance context for the instance, the context is capable of
|
268
|
+
# performing various actions. All instance actions are proxied to the context
|
269
|
+
# @return [SubscriptionContext] SubscriptionContext for this SubscriptionInstance
|
270
|
+
def context
|
271
|
+
unless @instance_context
|
272
|
+
@instance_context = SubscriptionContext.new(@version, @params['sid'], )
|
273
|
+
end
|
274
|
+
@instance_context
|
275
|
+
end
|
276
|
+
|
277
|
+
##
|
278
|
+
# @return [String] Account SID.
|
279
|
+
def account_sid
|
280
|
+
@properties['account_sid']
|
281
|
+
end
|
282
|
+
|
283
|
+
##
|
284
|
+
# @return [String] A string that uniquely identifies this Subscription.
|
285
|
+
def sid
|
286
|
+
@properties['sid']
|
287
|
+
end
|
288
|
+
|
289
|
+
##
|
290
|
+
# @return [Time] The date this Subscription was created
|
291
|
+
def date_created
|
292
|
+
@properties['date_created']
|
293
|
+
end
|
294
|
+
|
295
|
+
##
|
296
|
+
# @return [Time] The date this Subscription was updated
|
297
|
+
def date_updated
|
298
|
+
@properties['date_updated']
|
299
|
+
end
|
300
|
+
|
301
|
+
##
|
302
|
+
# @return [String] Subscription description
|
303
|
+
def description
|
304
|
+
@properties['description']
|
305
|
+
end
|
306
|
+
|
307
|
+
##
|
308
|
+
# @return [String] Sink SID.
|
309
|
+
def sink_sid
|
310
|
+
@properties['sink_sid']
|
311
|
+
end
|
312
|
+
|
313
|
+
##
|
314
|
+
# @return [String] The URL of this resource.
|
315
|
+
def url
|
316
|
+
@properties['url']
|
317
|
+
end
|
318
|
+
|
319
|
+
##
|
320
|
+
# @return [String] Nested resource URLs.
|
321
|
+
def links
|
322
|
+
@properties['links']
|
323
|
+
end
|
324
|
+
|
325
|
+
##
|
326
|
+
# Fetch the SubscriptionInstance
|
327
|
+
# @return [SubscriptionInstance] Fetched SubscriptionInstance
|
328
|
+
def fetch
|
329
|
+
context.fetch
|
330
|
+
end
|
331
|
+
|
332
|
+
##
|
333
|
+
# Delete the SubscriptionInstance
|
334
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
335
|
+
def delete
|
336
|
+
context.delete
|
337
|
+
end
|
338
|
+
|
339
|
+
##
|
340
|
+
# Access the subscribed_events
|
341
|
+
# @return [subscribed_events] subscribed_events
|
342
|
+
def subscribed_events
|
343
|
+
context.subscribed_events
|
344
|
+
end
|
345
|
+
|
346
|
+
##
|
347
|
+
# Provide a user friendly representation
|
348
|
+
def to_s
|
349
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
350
|
+
"<Twilio.Events.V1.SubscriptionInstance #{values}>"
|
351
|
+
end
|
352
|
+
|
353
|
+
##
|
354
|
+
# Provide a detailed, user friendly representation
|
355
|
+
def inspect
|
356
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
357
|
+
"<Twilio.Events.V1.SubscriptionInstance #{values}>"
|
358
|
+
end
|
359
|
+
end
|
360
|
+
end
|
361
|
+
end
|
362
|
+
end
|
363
|
+
end
|