twilio-ruby 5.36.0 → 5.39.2
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 +107 -0
- data/Makefile +1 -1
- data/README.md +9 -3
- data/lib/twilio-ruby/framework/version.rb +3 -3
- data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +13 -30
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +13 -30
- data/lib/twilio-ruby/rest/api/v2010/account.rb +10 -27
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +13 -30
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +13 -30
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +6 -14
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +6 -14
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/balance.rb +2 -8
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +13 -30
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +9 -25
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +9 -20
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +6 -14
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +4 -13
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +13 -30
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +7 -19
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +60 -39
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +10 -22
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +10 -22
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +27 -30
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +12 -25
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +6 -14
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +6 -13
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +6 -13
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +6 -13
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +10 -22
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +13 -30
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +3 -8
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +9 -17
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +3 -8
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +3 -8
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +6 -14
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +10 -22
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +13 -30
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +7 -19
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +9 -17
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +9 -17
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +9 -17
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +9 -17
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +7 -19
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +10 -22
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +13 -30
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +13 -30
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +13 -30
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +12 -25
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +12 -25
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +12 -25
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +12 -25
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +12 -25
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +13 -30
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +13 -30
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +3 -8
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +9 -17
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +3 -5
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +13 -30
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +15 -20
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +13 -46
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb +4 -14
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb +3 -9
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +13 -30
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +12 -25
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +13 -30
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +25 -33
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb +4 -14
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +13 -30
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +12 -25
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +13 -30
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb +4 -14
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +3 -9
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +13 -30
- data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +1 -5
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +3 -9
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +6 -14
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +6 -13
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +6 -12
- data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +4 -14
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +13 -30
- data/lib/twilio-ruby/rest/chat/v1/service.rb +13 -30
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +13 -30
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +12 -25
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +13 -30
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +13 -30
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +13 -30
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +13 -30
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +3 -5
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +13 -30
- data/lib/twilio-ruby/rest/chat/v2/service.rb +13 -30
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +9 -17
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +34 -36
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +12 -25
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +34 -36
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +34 -36
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +13 -30
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +13 -30
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +30 -34
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +9 -17
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +10 -22
- data/lib/twilio-ruby/rest/client.rb +0 -7
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +59 -36
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +80 -36
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +348 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +46 -36
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +13 -30
- data/lib/twilio-ruby/rest/conversations/v1/webhook.rb +4 -14
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +13 -30
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +9 -17
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +12 -25
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +9 -34
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +13 -30
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +13 -30
- data/lib/twilio-ruby/rest/insights/v1/call.rb +3 -9
- data/lib/twilio-ruby/rest/insights/v1/call/event.rb +3 -5
- data/lib/twilio-ruby/rest/insights/v1/call/metric.rb +3 -5
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +3 -7
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +13 -30
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +13 -30
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +13 -30
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +12 -25
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +13 -30
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +13 -30
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +13 -30
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +13 -30
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +3 -5
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +13 -30
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +13 -30
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +9 -17
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +34 -36
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +12 -25
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +34 -36
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +34 -36
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +13 -30
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +13 -30
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +30 -34
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +9 -17
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +10 -22
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +4 -8
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +13 -30
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +12 -25
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +12 -25
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +12 -25
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +14 -22
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +6 -14
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +13 -30
- data/lib/twilio-ruby/rest/notify/v1/service.rb +33 -31
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +12 -25
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +3 -8
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +31 -27
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +9 -24
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb +12 -25
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +10 -27
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +6 -14
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb +6 -14
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +10 -27
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +6 -14
- data/lib/twilio-ruby/rest/preview.rb +6 -0
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +3 -9
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +6 -14
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +6 -13
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +6 -12
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +4 -14
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +13 -30
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +13 -30
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +13 -30
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +13 -30
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +13 -30
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +10 -27
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +3 -5
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +13 -30
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +6 -14
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +6 -14
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +13 -30
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +7 -19
- data/lib/twilio-ruby/rest/preview/sync/service.rb +13 -30
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +26 -36
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +10 -22
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +12 -25
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +26 -36
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +10 -22
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +12 -25
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +26 -36
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +10 -22
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +7 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +3 -8
- data/lib/twilio-ruby/rest/{authy/v1/form.rb → preview/trusted_comms/brands_information.rb} +59 -61
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +3 -9
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb +3 -9
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +3 -9
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +6 -14
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +3 -7
- data/lib/twilio-ruby/rest/preview/trusted_comms/cps.rb +11 -11
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +25 -11
- data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +3 -8
- data/lib/twilio-ruby/rest/preview/understand/assistant.rb +13 -30
- data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb +4 -14
- data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb +4 -14
- data/lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb +3 -9
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +13 -30
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +12 -25
- data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +13 -30
- data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +13 -30
- data/lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb +4 -14
- data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +13 -30
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb +12 -25
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb +13 -30
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb +4 -14
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +3 -9
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +9 -22
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +13 -30
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +7 -19
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +3 -7
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +6 -14
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +6 -14
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +6 -14
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +3 -9
- data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +6 -14
- data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +3 -7
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +13 -30
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +13 -30
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +13 -30
- data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +9 -17
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +12 -25
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +9 -22
- data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +13 -30
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +13 -30
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +13 -30
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +6 -14
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +12 -25
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +12 -25
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +9 -22
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +6 -14
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +13 -30
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +13 -30
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +6 -14
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +3 -9
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +9 -17
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +12 -25
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb +3 -9
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +6 -14
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb +3 -9
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +13 -30
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb +3 -9
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +6 -14
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb +3 -9
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +13 -30
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +13 -30
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +3 -9
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +6 -14
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +3 -9
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +6 -14
- data/lib/twilio-ruby/rest/studio/v2/flow/test_user.rb +4 -14
- data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +1 -5
- data/lib/twilio-ruby/rest/supersim/v1/command.rb +9 -22
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +36 -49
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +6 -14
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +10 -27
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +12 -25
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +31 -23
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +3 -5
- data/lib/twilio-ruby/rest/sync/v1/service.rb +13 -30
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +26 -36
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +10 -22
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +13 -30
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +32 -36
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +10 -22
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +13 -30
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +32 -36
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +10 -22
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +13 -30
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +3 -8
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +13 -30
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +13 -30
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +15 -17
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +13 -30
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -19
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +13 -30
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +13 -30
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +3 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +3 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +3 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +3 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +13 -30
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -19
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +7 -19
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +3 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +3 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +3 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +3 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +13 -30
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +3 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +3 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +3 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +3 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +3 -7
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +13 -30
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +12 -25
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +12 -25
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +13 -30
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +12 -25
- data/lib/twilio-ruby/rest/verify.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/form.rb +7 -13
- data/lib/twilio-ruby/rest/verify/v2/service.rb +84 -33
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +124 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +74 -40
- data/lib/twilio-ruby/rest/{authy/v1/service/entity/factor.rb → verify/v2/service/entity/challenge.rb} +166 -189
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +66 -100
- data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +13 -30
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +13 -30
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +13 -30
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +7 -22
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +3 -8
- data/lib/twilio-ruby/rest/{authy/v1/service/entity.rb → verify/v2/service/webhook.rb} +159 -130
- data/lib/twilio-ruby/rest/video/v1/composition.rb +12 -25
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +13 -30
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +8 -20
- data/lib/twilio-ruby/rest/video/v1/recording.rb +9 -17
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +8 -20
- data/lib/twilio-ruby/rest/video/v1/room.rb +10 -27
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +9 -17
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +7 -19
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb +6 -14
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +3 -13
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +6 -14
- data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +13 -30
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +13 -30
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +13 -30
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +3 -8
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +6 -14
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb +3 -5
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +4 -14
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +13 -30
- data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +13 -30
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +12 -25
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +13 -30
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +10 -22
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +3 -5
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +3 -5
- data/lib/twilio-ruby/rest/wireless/v1/usage_record.rb +3 -5
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/framework/version_spec.rb +166 -0
- data/spec/holodeck/holodeck.rb +11 -6
- data/spec/integration/accounts/v1/credential/aws_spec.rb +0 -4
- data/spec/integration/accounts/v1/credential/public_key_spec.rb +0 -4
- data/spec/integration/api/v2010/account/address/dependent_phone_number_spec.rb +0 -1
- data/spec/integration/api/v2010/account/address_spec.rb +0 -4
- data/spec/integration/api/v2010/account/application_spec.rb +0 -5
- data/spec/integration/api/v2010/account/authorized_connect_app_spec.rb +0 -2
- data/spec/integration/api/v2010/account/available_phone_number/local_spec.rb +0 -1
- data/spec/integration/api/v2010/account/available_phone_number/machine_to_machine_spec.rb +0 -1
- data/spec/integration/api/v2010/account/available_phone_number/mobile_spec.rb +0 -1
- data/spec/integration/api/v2010/account/available_phone_number/national_spec.rb +0 -1
- data/spec/integration/api/v2010/account/available_phone_number/shared_cost_spec.rb +0 -1
- data/spec/integration/api/v2010/account/available_phone_number/toll_free_spec.rb +0 -1
- data/spec/integration/api/v2010/account/available_phone_number/voip_spec.rb +0 -1
- data/spec/integration/api/v2010/account/available_phone_number_spec.rb +0 -2
- data/spec/integration/api/v2010/account/balance_spec.rb +0 -1
- data/spec/integration/api/v2010/account/call/feedback_spec.rb +0 -1
- data/spec/integration/api/v2010/account/call/feedback_summary_spec.rb +0 -2
- data/spec/integration/api/v2010/account/call/notification_spec.rb +0 -2
- data/spec/integration/api/v2010/account/call/recording_spec.rb +0 -4
- data/spec/integration/api/v2010/account/call_spec.rb +0 -4
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +177 -4
- data/spec/integration/api/v2010/account/conference/recording_spec.rb +0 -3
- data/spec/integration/api/v2010/account/conference_spec.rb +0 -3
- data/spec/integration/api/v2010/account/connect_app_spec.rb +0 -4
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension_spec.rb +0 -2
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb +0 -3
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +0 -1
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +0 -1
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +0 -1
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +43 -20
- data/spec/integration/api/v2010/account/key_spec.rb +0 -4
- data/spec/integration/api/v2010/account/message/feedback_spec.rb +0 -1
- data/spec/integration/api/v2010/account/message/media_spec.rb +0 -3
- data/spec/integration/api/v2010/account/message_spec.rb +0 -3
- data/spec/integration/api/v2010/account/new_key_spec.rb +0 -1
- data/spec/integration/api/v2010/account/new_signing_key_spec.rb +0 -1
- data/spec/integration/api/v2010/account/notification_spec.rb +0 -2
- data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +8 -18
- data/spec/integration/api/v2010/account/queue/member_spec.rb +0 -2
- data/spec/integration/api/v2010/account/queue_spec.rb +0 -4
- data/spec/integration/api/v2010/account/recording/add_on_result/payload_spec.rb +0 -3
- data/spec/integration/api/v2010/account/recording/add_on_result_spec.rb +0 -3
- data/spec/integration/api/v2010/account/recording/transcription_spec.rb +0 -3
- data/spec/integration/api/v2010/account/recording_spec.rb +0 -3
- data/spec/integration/api/v2010/account/short_code_spec.rb +0 -3
- data/spec/integration/api/v2010/account/signing_key_spec.rb +0 -4
- data/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb +0 -4
- data/spec/integration/api/v2010/account/sip/credential_list_spec.rb +0 -3
- data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping_spec.rb +0 -3
- data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping_spec.rb +0 -3
- data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping_spec.rb +0 -3
- data/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb +0 -3
- data/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb +0 -3
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +0 -4
- data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +0 -4
- data/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb +0 -3
- data/spec/integration/api/v2010/account/token_spec.rb +0 -1
- data/spec/integration/api/v2010/account/transcription_spec.rb +0 -3
- data/spec/integration/api/v2010/account/usage/record/all_time_spec.rb +0 -1
- data/spec/integration/api/v2010/account/usage/record/daily_spec.rb +0 -1
- data/spec/integration/api/v2010/account/usage/record/last_month_spec.rb +0 -1
- data/spec/integration/api/v2010/account/usage/record/monthly_spec.rb +0 -1
- data/spec/integration/api/v2010/account/usage/record/this_month_spec.rb +0 -1
- data/spec/integration/api/v2010/account/usage/record/today_spec.rb +0 -1
- data/spec/integration/api/v2010/account/usage/record/yearly_spec.rb +0 -1
- data/spec/integration/api/v2010/account/usage/record/yesterday_spec.rb +0 -1
- data/spec/integration/api/v2010/account/usage/record_spec.rb +0 -1
- data/spec/integration/api/v2010/account/usage/trigger_spec.rb +0 -4
- data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -1
- data/spec/integration/api/v2010/account_spec.rb +0 -4
- data/spec/integration/autopilot/v1/assistant/defaults_spec.rb +0 -2
- data/spec/integration/autopilot/v1/assistant/dialogue_spec.rb +0 -1
- data/spec/integration/autopilot/v1/assistant/field_type/field_value_spec.rb +0 -3
- data/spec/integration/autopilot/v1/assistant/field_type_spec.rb +0 -4
- data/spec/integration/autopilot/v1/assistant/model_build_spec.rb +0 -5
- data/spec/integration/autopilot/v1/assistant/query_spec.rb +4 -8
- data/spec/integration/autopilot/v1/assistant/style_sheet_spec.rb +0 -2
- data/spec/integration/autopilot/v1/assistant/task/field_spec.rb +0 -3
- data/spec/integration/autopilot/v1/assistant/task/sample_spec.rb +0 -4
- data/spec/integration/autopilot/v1/assistant/task/task_actions_spec.rb +0 -2
- data/spec/integration/autopilot/v1/assistant/task/task_statistics_spec.rb +0 -1
- data/spec/integration/autopilot/v1/assistant/task_spec.rb +0 -4
- data/spec/integration/autopilot/v1/assistant/webhook_spec.rb +0 -4
- data/spec/integration/autopilot/v1/assistant_spec.rb +4 -13
- data/spec/integration/bulkexports/v1/export/day_spec.rb +0 -2
- data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +0 -2
- data/spec/integration/bulkexports/v1/export/job_spec.rb +0 -2
- data/spec/integration/bulkexports/v1/export_configuration_spec.rb +0 -2
- data/spec/integration/bulkexports/v1/export_spec.rb +0 -1
- data/spec/integration/chat/v1/credential_spec.rb +0 -4
- data/spec/integration/chat/v1/service/channel/invite_spec.rb +0 -3
- data/spec/integration/chat/v1/service/channel/member_spec.rb +0 -4
- data/spec/integration/chat/v1/service/channel/message_spec.rb +0 -4
- data/spec/integration/chat/v1/service/channel_spec.rb +0 -5
- data/spec/integration/chat/v1/service/role_spec.rb +0 -3
- data/spec/integration/chat/v1/service/user/user_channel_spec.rb +0 -1
- data/spec/integration/chat/v1/service/user_spec.rb +0 -4
- data/spec/integration/chat/v1/service_spec.rb +0 -4
- data/spec/integration/chat/v2/credential_spec.rb +0 -4
- data/spec/integration/chat/v2/service/binding_spec.rb +0 -3
- data/spec/integration/chat/v2/service/channel/invite_spec.rb +0 -3
- data/spec/integration/chat/v2/service/channel/member_spec.rb +9 -7
- data/spec/integration/chat/v2/service/channel/message_spec.rb +9 -8
- data/spec/integration/chat/v2/service/channel/webhook_spec.rb +0 -4
- data/spec/integration/chat/v2/service/channel_spec.rb +9 -8
- data/spec/integration/chat/v2/service/role_spec.rb +0 -3
- data/spec/integration/chat/v2/service/user/user_binding_spec.rb +0 -3
- data/spec/integration/chat/v2/service/user/user_channel_spec.rb +0 -4
- data/spec/integration/chat/v2/service/user_spec.rb +6 -6
- data/spec/integration/chat/v2/service_spec.rb +0 -4
- data/spec/integration/conversations/v1/conversation/message/delivery_receipt_spec.rb +132 -0
- data/spec/integration/conversations/v1/conversation/message_spec.rb +93 -15
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +37 -8
- data/spec/integration/conversations/v1/conversation/webhook_spec.rb +0 -4
- data/spec/integration/conversations/v1/conversation_spec.rb +25 -8
- data/spec/integration/conversations/v1/webhook_spec.rb +0 -2
- data/spec/integration/fax/v1/fax/fax_media_spec.rb +0 -3
- data/spec/integration/fax/v1/fax_spec.rb +0 -4
- data/spec/integration/flex_api/v1/channel_spec.rb +0 -3
- data/spec/integration/flex_api/v1/configuration_spec.rb +0 -51
- data/spec/integration/flex_api/v1/flex_flow_spec.rb +0 -4
- data/spec/integration/flex_api/v1/web_channel_spec.rb +0 -4
- data/spec/integration/insights/v1/call/event_spec.rb +0 -1
- data/spec/integration/insights/v1/call/metric_spec.rb +0 -1
- data/spec/integration/insights/v1/call/summary_spec.rb +0 -1
- data/spec/integration/insights/v1/call_spec.rb +0 -1
- data/spec/integration/ip_messaging/v1/credential_spec.rb +0 -4
- data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +0 -3
- data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +0 -4
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +0 -4
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +0 -5
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +0 -3
- data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +0 -1
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +0 -4
- data/spec/integration/ip_messaging/v1/service_spec.rb +0 -4
- data/spec/integration/ip_messaging/v2/credential_spec.rb +0 -4
- data/spec/integration/ip_messaging/v2/service/binding_spec.rb +0 -3
- data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +0 -3
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +9 -7
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +9 -8
- data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +0 -4
- data/spec/integration/ip_messaging/v2/service/channel_spec.rb +9 -8
- data/spec/integration/ip_messaging/v2/service/role_spec.rb +0 -3
- data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +0 -3
- data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +0 -4
- data/spec/integration/ip_messaging/v2/service/user_spec.rb +6 -6
- data/spec/integration/ip_messaging/v2/service_spec.rb +0 -4
- data/spec/integration/lookups/v1/phone_number_spec.rb +0 -1
- data/spec/integration/messaging/v1/service/alpha_sender_spec.rb +0 -3
- data/spec/integration/messaging/v1/service/phone_number_spec.rb +0 -3
- data/spec/integration/messaging/v1/service/short_code_spec.rb +0 -3
- data/spec/integration/messaging/v1/service_spec.rb +0 -4
- data/spec/integration/monitor/v1/alert_spec.rb +0 -2
- data/spec/integration/monitor/v1/event_spec.rb +0 -2
- data/spec/integration/notify/v1/credential_spec.rb +0 -4
- data/spec/integration/notify/v1/service/binding_spec.rb +0 -3
- data/spec/integration/notify/v1/service/notification_spec.rb +0 -1
- data/spec/integration/notify/v1/service_spec.rb +0 -5
- data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +0 -3
- data/spec/integration/numbers/v2/regulatory_compliance/bundle/item_assignment_spec.rb +0 -3
- data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +32 -4
- data/spec/integration/numbers/v2/regulatory_compliance/end_user_spec.rb +0 -3
- data/spec/integration/numbers/v2/regulatory_compliance/end_user_type_spec.rb +0 -2
- data/spec/integration/numbers/v2/regulatory_compliance/regulation_spec.rb +0 -2
- data/spec/integration/numbers/v2/regulatory_compliance/supporting_document_spec.rb +0 -3
- data/spec/integration/numbers/v2/regulatory_compliance/supporting_document_type_spec.rb +0 -2
- data/spec/integration/preview/bulk_exports/export/day_spec.rb +0 -2
- data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +0 -2
- data/spec/integration/preview/bulk_exports/export/job_spec.rb +0 -2
- data/spec/integration/preview/bulk_exports/export_configuration_spec.rb +0 -2
- data/spec/integration/preview/bulk_exports/export_spec.rb +0 -1
- data/spec/integration/preview/deployed_devices/fleet/certificate_spec.rb +0 -4
- data/spec/integration/preview/deployed_devices/fleet/deployment_spec.rb +0 -5
- data/spec/integration/preview/deployed_devices/fleet/device_spec.rb +0 -5
- data/spec/integration/preview/deployed_devices/fleet/key_spec.rb +0 -5
- data/spec/integration/preview/deployed_devices/fleet_spec.rb +0 -5
- data/spec/integration/preview/hosted_numbers/authorization_document/dependent_hosted_number_order_spec.rb +0 -1
- data/spec/integration/preview/hosted_numbers/authorization_document_spec.rb +0 -3
- data/spec/integration/preview/hosted_numbers/hosted_number_order_spec.rb +0 -4
- data/spec/integration/preview/marketplace/available_add_on/available_add_on_extension_spec.rb +0 -2
- data/spec/integration/preview/marketplace/available_add_on_spec.rb +0 -2
- data/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb +0 -2
- data/spec/integration/preview/marketplace/installed_add_on_spec.rb +0 -4
- data/spec/integration/preview/sync/service/document/document_permission_spec.rb +0 -3
- data/spec/integration/preview/sync/service/document_spec.rb +6 -6
- data/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb +6 -5
- data/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb +0 -3
- data/spec/integration/preview/sync/service/sync_list_spec.rb +0 -4
- data/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb +6 -5
- data/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb +0 -3
- data/spec/integration/preview/sync/service/sync_map_spec.rb +0 -4
- data/spec/integration/preview/sync/service_spec.rb +0 -5
- data/spec/integration/preview/trusted_comms/brands_information_spec.rb +45 -0
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb +3 -3
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb +0 -1
- data/spec/integration/preview/trusted_comms/business/brand_spec.rb +0 -1
- data/spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb +0 -1
- data/spec/integration/preview/trusted_comms/business_spec.rb +0 -1
- data/spec/integration/preview/trusted_comms/cps_spec.rb +3 -2
- data/spec/integration/preview/trusted_comms/current_call_spec.rb +6 -2
- data/spec/integration/preview/understand/assistant/assistant_fallback_actions_spec.rb +0 -2
- data/spec/integration/preview/understand/assistant/assistant_initiation_actions_spec.rb +0 -2
- data/spec/integration/preview/understand/assistant/dialogue_spec.rb +0 -1
- data/spec/integration/preview/understand/assistant/field_type/field_value_spec.rb +0 -3
- data/spec/integration/preview/understand/assistant/field_type_spec.rb +0 -4
- data/spec/integration/preview/understand/assistant/model_build_spec.rb +0 -5
- data/spec/integration/preview/understand/assistant/query_spec.rb +0 -4
- data/spec/integration/preview/understand/assistant/style_sheet_spec.rb +0 -2
- data/spec/integration/preview/understand/assistant/task/field_spec.rb +0 -3
- data/spec/integration/preview/understand/assistant/task/sample_spec.rb +0 -4
- data/spec/integration/preview/understand/assistant/task/task_actions_spec.rb +0 -2
- data/spec/integration/preview/understand/assistant/task/task_statistics_spec.rb +0 -1
- data/spec/integration/preview/understand/assistant/task_spec.rb +0 -4
- data/spec/integration/preview/understand/assistant_spec.rb +0 -5
- data/spec/integration/preview/wireless/command_spec.rb +0 -2
- data/spec/integration/preview/wireless/rate_plan_spec.rb +0 -5
- data/spec/integration/preview/wireless/sim/usage_spec.rb +0 -1
- data/spec/integration/preview/wireless/sim_spec.rb +0 -3
- data/spec/integration/pricing/v1/messaging/country_spec.rb +0 -2
- data/spec/integration/pricing/v1/phone_number/country_spec.rb +0 -2
- data/spec/integration/pricing/v1/voice/country_spec.rb +0 -2
- data/spec/integration/pricing/v1/voice/number_spec.rb +0 -1
- data/spec/integration/pricing/v2/voice/country_spec.rb +0 -2
- data/spec/integration/pricing/v2/voice/number_spec.rb +0 -1
- data/spec/integration/proxy/v1/service/phone_number_spec.rb +0 -5
- data/spec/integration/proxy/v1/service/session/interaction_spec.rb +0 -3
- data/spec/integration/proxy/v1/service/session/participant/message_interaction_spec.rb +0 -3
- data/spec/integration/proxy/v1/service/session/participant_spec.rb +0 -3
- data/spec/integration/proxy/v1/service/session_spec.rb +0 -5
- data/spec/integration/proxy/v1/service/short_code_spec.rb +0 -4
- data/spec/integration/proxy/v1/service_spec.rb +0 -4
- data/spec/integration/serverless/v1/service/asset/asset_version_spec.rb +0 -2
- data/spec/integration/serverless/v1/service/asset_spec.rb +0 -3
- data/spec/integration/serverless/v1/service/build_spec.rb +0 -4
- data/spec/integration/serverless/v1/service/environment/deployment_spec.rb +0 -3
- data/spec/integration/serverless/v1/service/environment/log_spec.rb +0 -2
- data/spec/integration/serverless/v1/service/environment/variable_spec.rb +0 -4
- data/spec/integration/serverless/v1/service/environment_spec.rb +0 -3
- data/spec/integration/serverless/v1/service/function/function_version/function_version_content_spec.rb +0 -1
- data/spec/integration/serverless/v1/service/function/function_version_spec.rb +0 -2
- data/spec/integration/serverless/v1/service/function_spec.rb +0 -3
- data/spec/integration/serverless/v1/service_spec.rb +0 -4
- data/spec/integration/studio/v1/flow/engagement/engagement_context_spec.rb +0 -1
- data/spec/integration/studio/v1/flow/engagement/step/step_context_spec.rb +0 -1
- data/spec/integration/studio/v1/flow/engagement/step_spec.rb +0 -2
- data/spec/integration/studio/v1/flow/engagement_spec.rb +0 -3
- data/spec/integration/studio/v1/flow/execution/execution_context_spec.rb +0 -1
- data/spec/integration/studio/v1/flow/execution/execution_step/execution_step_context_spec.rb +0 -1
- data/spec/integration/studio/v1/flow/execution/execution_step_spec.rb +0 -2
- data/spec/integration/studio/v1/flow/execution_spec.rb +0 -3
- data/spec/integration/studio/v1/flow_spec.rb +0 -3
- data/spec/integration/studio/v2/flow/execution/execution_context_spec.rb +0 -1
- data/spec/integration/studio/v2/flow/execution/execution_step/execution_step_context_spec.rb +0 -1
- data/spec/integration/studio/v2/flow/execution/execution_step_spec.rb +0 -2
- data/spec/integration/studio/v2/flow/execution_spec.rb +0 -3
- data/spec/integration/studio/v2/flow/flow_revision_spec.rb +0 -2
- data/spec/integration/studio/v2/flow/test_user_spec.rb +0 -1
- data/spec/integration/studio/v2/flow_spec.rb +0 -3
- data/spec/integration/supersim/v1/command_spec.rb +0 -2
- data/spec/integration/supersim/v1/fleet_spec.rb +4 -6
- data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +0 -3
- data/spec/integration/supersim/v1/network_access_profile_spec.rb +0 -4
- data/spec/integration/supersim/v1/network_spec.rb +0 -2
- data/spec/integration/supersim/v1/sim_spec.rb +78 -9
- data/spec/integration/supersim/v1/usage_record_spec.rb +0 -1
- data/spec/integration/sync/v1/service/document/document_permission_spec.rb +0 -3
- data/spec/integration/sync/v1/service/document_spec.rb +6 -7
- data/spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb +6 -6
- data/spec/integration/sync/v1/service/sync_list/sync_list_permission_spec.rb +0 -3
- data/spec/integration/sync/v1/service/sync_list_spec.rb +0 -5
- data/spec/integration/sync/v1/service/sync_map/sync_map_item_spec.rb +6 -6
- data/spec/integration/sync/v1/service/sync_map/sync_map_permission_spec.rb +0 -3
- data/spec/integration/sync/v1/service/sync_map_spec.rb +0 -5
- data/spec/integration/sync/v1/service/sync_stream_spec.rb +0 -5
- data/spec/integration/sync/v1/service_spec.rb +0 -5
- data/spec/integration/taskrouter/v1/workspace/activity_spec.rb +0 -4
- data/spec/integration/taskrouter/v1/workspace/event_spec.rb +0 -2
- data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +0 -3
- data/spec/integration/taskrouter/v1/workspace/task_channel_spec.rb +0 -4
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics_spec.rb +0 -1
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics_spec.rb +0 -1
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_statistics_spec.rb +0 -1
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queues_statistics_spec.rb +0 -1
- data/spec/integration/taskrouter/v1/workspace/task_queue_spec.rb +0 -4
- data/spec/integration/taskrouter/v1/workspace/task_spec.rb +0 -5
- data/spec/integration/taskrouter/v1/workspace/worker/reservation_spec.rb +0 -3
- data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +0 -3
- data/spec/integration/taskrouter/v1/workspace/worker/worker_statistics_spec.rb +0 -1
- data/spec/integration/taskrouter/v1/workspace/worker/workers_cumulative_statistics_spec.rb +0 -1
- data/spec/integration/taskrouter/v1/workspace/worker/workers_real_time_statistics_spec.rb +0 -1
- data/spec/integration/taskrouter/v1/workspace/worker/workers_statistics_spec.rb +0 -1
- data/spec/integration/taskrouter/v1/workspace/worker_spec.rb +0 -4
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics_spec.rb +0 -1
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_real_time_statistics_spec.rb +0 -1
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_statistics_spec.rb +0 -1
- data/spec/integration/taskrouter/v1/workspace/workflow_spec.rb +0 -4
- data/spec/integration/taskrouter/v1/workspace/workspace_cumulative_statistics_spec.rb +0 -1
- data/spec/integration/taskrouter/v1/workspace/workspace_real_time_statistics_spec.rb +0 -1
- data/spec/integration/taskrouter/v1/workspace/workspace_statistics_spec.rb +0 -1
- data/spec/integration/taskrouter/v1/workspace_spec.rb +0 -4
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +0 -3
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +0 -3
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +0 -4
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +0 -3
- data/spec/integration/trunking/v1/trunk_spec.rb +0 -5
- data/spec/integration/verify/v2/form_spec.rb +5 -6
- data/spec/integration/verify/v2/service/access_token_spec.rb +44 -0
- data/spec/integration/verify/v2/service/entity/{factor/challenge_spec.rb → challenge_spec.rb} +33 -134
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +21 -27
- data/spec/integration/verify/v2/service/entity_spec.rb +18 -10
- data/spec/integration/verify/v2/service/messaging_configuration_spec.rb +0 -3
- data/spec/integration/verify/v2/service/rate_limit/bucket_spec.rb +0 -4
- data/spec/integration/verify/v2/service/rate_limit_spec.rb +0 -4
- data/spec/integration/verify/v2/service/verification_spec.rb +0 -1
- data/spec/integration/verify/v2/service/webhook_spec.rb +258 -0
- data/spec/integration/verify/v2/service_spec.rb +12 -8
- data/spec/integration/video/v1/composition_hook_spec.rb +0 -3
- data/spec/integration/video/v1/composition_settings_spec.rb +0 -1
- data/spec/integration/video/v1/composition_spec.rb +0 -3
- data/spec/integration/video/v1/recording_settings_spec.rb +0 -1
- data/spec/integration/video/v1/recording_spec.rb +0 -3
- data/spec/integration/video/v1/room/recording_spec.rb +0 -3
- data/spec/integration/video/v1/room/room_participant/room_participant_published_track_spec.rb +0 -2
- data/spec/integration/video/v1/room/room_participant/room_participant_subscribe_rule_spec.rb +0 -2
- data/spec/integration/video/v1/room/room_participant/room_participant_subscribed_track_spec.rb +0 -2
- data/spec/integration/video/v1/room/room_participant_spec.rb +0 -3
- data/spec/integration/video/v1/room_spec.rb +0 -3
- data/spec/integration/voice/v1/byoc_trunk_spec.rb +0 -5
- data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +0 -4
- data/spec/integration/voice/v1/connection_policy_spec.rb +0 -5
- data/spec/integration/voice/v1/dialing_permissions/country/highrisk_special_prefix_spec.rb +0 -1
- data/spec/integration/voice/v1/dialing_permissions/country_spec.rb +0 -2
- data/spec/integration/voice/v1/dialing_permissions/settings_spec.rb +0 -2
- data/spec/integration/voice/v1/ip_record_spec.rb +0 -4
- data/spec/integration/voice/v1/source_ip_mapping_spec.rb +0 -3
- data/spec/integration/wireless/v1/command_spec.rb +0 -3
- data/spec/integration/wireless/v1/rate_plan_spec.rb +0 -5
- data/spec/integration/wireless/v1/sim/data_session_spec.rb +0 -1
- data/spec/integration/wireless/v1/sim/usage_record_spec.rb +0 -1
- data/spec/integration/wireless/v1/sim_spec.rb +0 -4
- data/spec/integration/wireless/v1/usage_record_spec.rb +0 -1
- metadata +19 -25
- data/lib/twilio-ruby/rest/authy.rb +0 -55
- data/lib/twilio-ruby/rest/authy/v1.rb +0 -59
- data/lib/twilio-ruby/rest/authy/v1/service.rb +0 -404
- data/lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb +0 -494
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb +0 -222
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor/challenge.rb +0 -494
- data/spec/integration/authy/v1/form_spec.rb +0 -48
- data/spec/integration/authy/v1/service/entity/factor/challenge_spec.rb +0 -353
- data/spec/integration/authy/v1/service/entity/factor_spec.rb +0 -298
- data/spec/integration/authy/v1/service/entity_spec.rb +0 -201
- data/spec/integration/authy/v1/service_spec.rb +0 -231
- data/spec/integration/autopilot/v1/assistant/export_assistant_spec.rb +0 -49
@@ -0,0 +1,124 @@
|
|
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 Verify < Domain
|
12
|
+
class V2 < Version
|
13
|
+
class ServiceContext < 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 AccessTokenList < ListResource
|
17
|
+
##
|
18
|
+
# Initialize the AccessTokenList
|
19
|
+
# @param [Version] version Version that contains the resource
|
20
|
+
# @param [String] service_sid The unique string that we created to identify the
|
21
|
+
# Service resource.
|
22
|
+
# @return [AccessTokenList] AccessTokenList
|
23
|
+
def initialize(version, service_sid: nil)
|
24
|
+
super(version)
|
25
|
+
|
26
|
+
# Path Solution
|
27
|
+
@solution = {service_sid: service_sid}
|
28
|
+
@uri = "/Services/#{@solution[:service_sid]}/AccessTokens"
|
29
|
+
end
|
30
|
+
|
31
|
+
##
|
32
|
+
# Create the AccessTokenInstance
|
33
|
+
# @param [String] identity The unique external identifier for the Entity of the
|
34
|
+
# Service. This identifier should be immutable, not PII, and generated by your
|
35
|
+
# external system, such as your user's UUID, GUID, or SID.
|
36
|
+
# @param [access_token.FactorTypes] factor_type The Type of this Factor. Eg.
|
37
|
+
# `push`
|
38
|
+
# @return [AccessTokenInstance] Created AccessTokenInstance
|
39
|
+
def create(identity: nil, factor_type: nil)
|
40
|
+
data = Twilio::Values.of({'Identity' => identity, 'FactorType' => factor_type, })
|
41
|
+
|
42
|
+
payload = @version.create('POST', @uri, data: data)
|
43
|
+
|
44
|
+
AccessTokenInstance.new(@version, payload, service_sid: @solution[:service_sid], )
|
45
|
+
end
|
46
|
+
|
47
|
+
##
|
48
|
+
# Provide a user friendly representation
|
49
|
+
def to_s
|
50
|
+
'#<Twilio.Verify.V2.AccessTokenList>'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# 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.
|
56
|
+
class AccessTokenPage < Page
|
57
|
+
##
|
58
|
+
# Initialize the AccessTokenPage
|
59
|
+
# @param [Version] version Version that contains the resource
|
60
|
+
# @param [Response] response Response from the API
|
61
|
+
# @param [Hash] solution Path solution for the resource
|
62
|
+
# @return [AccessTokenPage] AccessTokenPage
|
63
|
+
def initialize(version, response, solution)
|
64
|
+
super(version, response)
|
65
|
+
|
66
|
+
# Path Solution
|
67
|
+
@solution = solution
|
68
|
+
end
|
69
|
+
|
70
|
+
##
|
71
|
+
# Build an instance of AccessTokenInstance
|
72
|
+
# @param [Hash] payload Payload response from the API
|
73
|
+
# @return [AccessTokenInstance] AccessTokenInstance
|
74
|
+
def get_instance(payload)
|
75
|
+
AccessTokenInstance.new(@version, payload, service_sid: @solution[:service_sid], )
|
76
|
+
end
|
77
|
+
|
78
|
+
##
|
79
|
+
# Provide a user friendly representation
|
80
|
+
def to_s
|
81
|
+
'<Twilio.Verify.V2.AccessTokenPage>'
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
##
|
86
|
+
# 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.
|
87
|
+
class AccessTokenInstance < InstanceResource
|
88
|
+
##
|
89
|
+
# Initialize the AccessTokenInstance
|
90
|
+
# @param [Version] version Version that contains the resource
|
91
|
+
# @param [Hash] payload payload that contains response from Twilio
|
92
|
+
# @param [String] service_sid The unique string that we created to identify the
|
93
|
+
# Service resource.
|
94
|
+
# @return [AccessTokenInstance] AccessTokenInstance
|
95
|
+
def initialize(version, payload, service_sid: nil)
|
96
|
+
super(version)
|
97
|
+
|
98
|
+
# Marshaled Properties
|
99
|
+
@properties = {'token' => payload['token'], }
|
100
|
+
end
|
101
|
+
|
102
|
+
##
|
103
|
+
# @return [String] Generated access token.
|
104
|
+
def token
|
105
|
+
@properties['token']
|
106
|
+
end
|
107
|
+
|
108
|
+
##
|
109
|
+
# Provide a user friendly representation
|
110
|
+
def to_s
|
111
|
+
"<Twilio.Verify.V2.AccessTokenInstance>"
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# Provide a detailed, user friendly representation
|
116
|
+
def inspect
|
117
|
+
"<Twilio.Verify.V2.AccessTokenInstance>"
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
@@ -28,18 +28,16 @@ module Twilio
|
|
28
28
|
end
|
29
29
|
|
30
30
|
##
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
# @
|
35
|
-
|
31
|
+
# Create the EntityInstance
|
32
|
+
# @param [String] identity The unique external identifier for the Entity of the
|
33
|
+
# Service
|
34
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
35
|
+
# @return [EntityInstance] Created EntityInstance
|
36
|
+
def create(identity: nil, twilio_sandbox_mode: :unset)
|
36
37
|
data = Twilio::Values.of({'Identity' => identity, })
|
38
|
+
headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
|
37
39
|
|
38
|
-
payload = @version.create(
|
39
|
-
'POST',
|
40
|
-
@uri,
|
41
|
-
data: data
|
42
|
-
)
|
40
|
+
payload = @version.create('POST', @uri, data: data, headers: headers)
|
43
41
|
|
44
42
|
EntityInstance.new(@version, payload, service_sid: @solution[:service_sid], )
|
45
43
|
end
|
@@ -48,6 +46,7 @@ module Twilio
|
|
48
46
|
# Lists EntityInstance records from the API as a list.
|
49
47
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
50
48
|
# memory before returning.
|
49
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
51
50
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
52
51
|
# guarantees to never return more than limit. Default is no limit
|
53
52
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -55,14 +54,15 @@ module Twilio
|
|
55
54
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
56
55
|
# efficient page size, i.e. min(limit, 1000)
|
57
56
|
# @return [Array] Array of up to limit results
|
58
|
-
def list(limit: nil, page_size: nil)
|
59
|
-
self.stream(limit: limit, page_size: page_size).entries
|
57
|
+
def list(twilio_sandbox_mode: :unset, limit: nil, page_size: nil)
|
58
|
+
self.stream(twilio_sandbox_mode: twilio_sandbox_mode, limit: limit, page_size: page_size).entries
|
60
59
|
end
|
61
60
|
|
62
61
|
##
|
63
62
|
# Streams EntityInstance records from the API as an Enumerable.
|
64
63
|
# This operation lazily loads records as efficiently as possible until the limit
|
65
64
|
# is reached.
|
65
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
66
66
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
67
67
|
# guarantees to never return more than limit. Default is no limit.
|
68
68
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -70,10 +70,10 @@ module Twilio
|
|
70
70
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
71
71
|
# efficient page size, i.e. min(limit, 1000)
|
72
72
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
73
|
-
def stream(limit: nil, page_size: nil)
|
73
|
+
def stream(twilio_sandbox_mode: :unset, limit: nil, page_size: nil)
|
74
74
|
limits = @version.read_limits(limit, page_size)
|
75
75
|
|
76
|
-
page = self.page(page_size: limits[:page_size], )
|
76
|
+
page = self.page(twilio_sandbox_mode: twilio_sandbox_mode, page_size: limits[:page_size], )
|
77
77
|
|
78
78
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
79
79
|
end
|
@@ -95,21 +95,21 @@ module Twilio
|
|
95
95
|
##
|
96
96
|
# Retrieve a single page of EntityInstance records from the API.
|
97
97
|
# Request is executed immediately.
|
98
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
98
99
|
# @param [String] page_token PageToken provided by the API
|
99
100
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
100
101
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
101
102
|
# @return [Page] Page of EntityInstance
|
102
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
103
|
+
def page(twilio_sandbox_mode: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
103
104
|
params = Twilio::Values.of({
|
104
105
|
'PageToken' => page_token,
|
105
106
|
'Page' => page_number,
|
106
107
|
'PageSize' => page_size,
|
107
108
|
})
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
)
|
109
|
+
headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
|
110
|
+
|
111
|
+
response = @version.page('GET', @uri, params: params, headers: headers)
|
112
|
+
|
113
113
|
EntityPage.new(@version, response, @solution)
|
114
114
|
end
|
115
115
|
|
@@ -171,7 +171,8 @@ module Twilio
|
|
171
171
|
# Initialize the EntityContext
|
172
172
|
# @param [Version] version Version that contains the resource
|
173
173
|
# @param [String] service_sid The unique SID identifier of the Service.
|
174
|
-
# @param [String] identity
|
174
|
+
# @param [String] identity The unique external identifier for the Entity of the
|
175
|
+
# Service
|
175
176
|
# @return [EntityContext] EntityContext
|
176
177
|
def initialize(version, service_sid, identity)
|
177
178
|
super(version)
|
@@ -182,26 +183,27 @@ module Twilio
|
|
182
183
|
|
183
184
|
# Dependents
|
184
185
|
@factors = nil
|
186
|
+
@challenges = nil
|
185
187
|
end
|
186
188
|
|
187
189
|
##
|
188
|
-
#
|
190
|
+
# Delete the EntityInstance
|
191
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
189
192
|
# @return [Boolean] true if delete succeeds, false otherwise
|
190
|
-
def delete
|
191
|
-
|
193
|
+
def delete(twilio_sandbox_mode: :unset)
|
194
|
+
headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
|
195
|
+
|
196
|
+
@version.delete('DELETE', @uri, headers: headers)
|
192
197
|
end
|
193
198
|
|
194
199
|
##
|
195
|
-
# Fetch
|
200
|
+
# Fetch the EntityInstance
|
201
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
196
202
|
# @return [EntityInstance] Fetched EntityInstance
|
197
|
-
def fetch
|
198
|
-
|
203
|
+
def fetch(twilio_sandbox_mode: :unset)
|
204
|
+
headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
|
199
205
|
|
200
|
-
payload = @version.fetch(
|
201
|
-
'GET',
|
202
|
-
@uri,
|
203
|
-
params,
|
204
|
-
)
|
206
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
205
207
|
|
206
208
|
EntityInstance.new(
|
207
209
|
@version,
|
@@ -233,6 +235,28 @@ module Twilio
|
|
233
235
|
@factors
|
234
236
|
end
|
235
237
|
|
238
|
+
##
|
239
|
+
# Access the challenges
|
240
|
+
# @return [ChallengeList]
|
241
|
+
# @return [ChallengeContext] if sid was passed.
|
242
|
+
def challenges(sid=:unset)
|
243
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
244
|
+
|
245
|
+
if sid != :unset
|
246
|
+
return ChallengeContext.new(@version, @solution[:service_sid], @solution[:identity], sid, )
|
247
|
+
end
|
248
|
+
|
249
|
+
unless @challenges
|
250
|
+
@challenges = ChallengeList.new(
|
251
|
+
@version,
|
252
|
+
service_sid: @solution[:service_sid],
|
253
|
+
identity: @solution[:identity],
|
254
|
+
)
|
255
|
+
end
|
256
|
+
|
257
|
+
@challenges
|
258
|
+
end
|
259
|
+
|
236
260
|
##
|
237
261
|
# Provide a user friendly representation
|
238
262
|
def to_s
|
@@ -256,7 +280,8 @@ module Twilio
|
|
256
280
|
# @param [Version] version Version that contains the resource
|
257
281
|
# @param [Hash] payload payload that contains response from Twilio
|
258
282
|
# @param [String] service_sid The unique SID identifier of the Service.
|
259
|
-
# @param [String] identity
|
283
|
+
# @param [String] identity The unique external identifier for the Entity of the
|
284
|
+
# Service
|
260
285
|
# @return [EntityInstance] EntityInstance
|
261
286
|
def initialize(version, payload, service_sid: nil, identity: nil)
|
262
287
|
super(version)
|
@@ -296,7 +321,7 @@ module Twilio
|
|
296
321
|
end
|
297
322
|
|
298
323
|
##
|
299
|
-
# @return [String] Unique
|
324
|
+
# @return [String] Unique external identifier of the Entity
|
300
325
|
def identity
|
301
326
|
@properties['identity']
|
302
327
|
end
|
@@ -338,17 +363,19 @@ module Twilio
|
|
338
363
|
end
|
339
364
|
|
340
365
|
##
|
341
|
-
#
|
366
|
+
# Delete the EntityInstance
|
367
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
342
368
|
# @return [Boolean] true if delete succeeds, false otherwise
|
343
|
-
def delete
|
344
|
-
context.delete
|
369
|
+
def delete(twilio_sandbox_mode: :unset)
|
370
|
+
context.delete(twilio_sandbox_mode: twilio_sandbox_mode, )
|
345
371
|
end
|
346
372
|
|
347
373
|
##
|
348
|
-
# Fetch
|
374
|
+
# Fetch the EntityInstance
|
375
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
349
376
|
# @return [EntityInstance] Fetched EntityInstance
|
350
|
-
def fetch
|
351
|
-
context.fetch
|
377
|
+
def fetch(twilio_sandbox_mode: :unset)
|
378
|
+
context.fetch(twilio_sandbox_mode: twilio_sandbox_mode, )
|
352
379
|
end
|
353
380
|
|
354
381
|
##
|
@@ -358,6 +385,13 @@ module Twilio
|
|
358
385
|
context.factors
|
359
386
|
end
|
360
387
|
|
388
|
+
##
|
389
|
+
# Access the challenges
|
390
|
+
# @return [challenges] challenges
|
391
|
+
def challenges
|
392
|
+
context.challenges
|
393
|
+
end
|
394
|
+
|
361
395
|
##
|
362
396
|
# Provide a user friendly representation
|
363
397
|
def to_s
|
@@ -8,56 +8,51 @@
|
|
8
8
|
|
9
9
|
module Twilio
|
10
10
|
module REST
|
11
|
-
class
|
12
|
-
class
|
11
|
+
class Verify < Domain
|
12
|
+
class V2 < Version
|
13
13
|
class ServiceContext < InstanceContext
|
14
14
|
class EntityContext < InstanceContext
|
15
15
|
##
|
16
16
|
# 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.
|
17
|
-
class
|
17
|
+
class ChallengeList < ListResource
|
18
18
|
##
|
19
|
-
# Initialize the
|
19
|
+
# Initialize the ChallengeList
|
20
20
|
# @param [Version] version Version that contains the resource
|
21
21
|
# @param [String] service_sid The unique SID identifier of the Service.
|
22
22
|
# @param [String] identity Customer unique identity for the Entity owner of the
|
23
|
-
#
|
24
|
-
# @return [
|
23
|
+
# Challenge
|
24
|
+
# @return [ChallengeList] ChallengeList
|
25
25
|
def initialize(version, service_sid: nil, identity: nil)
|
26
26
|
super(version)
|
27
27
|
|
28
28
|
# Path Solution
|
29
29
|
@solution = {service_sid: service_sid, identity: identity}
|
30
|
-
@uri = "/Services/#{@solution[:service_sid]}/Entities/#{@solution[:identity]}/
|
30
|
+
@uri = "/Services/#{@solution[:service_sid]}/Entities/#{@solution[:identity]}/Challenges"
|
31
31
|
end
|
32
32
|
|
33
33
|
##
|
34
|
-
#
|
35
|
-
#
|
36
|
-
# @param [
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
# @param [String]
|
41
|
-
#
|
42
|
-
#
|
43
|
-
# @
|
44
|
-
|
45
|
-
# @return [FactorInstance] Newly created FactorInstance
|
46
|
-
def create(binding: nil, friendly_name: nil, factor_type: nil, config: nil)
|
34
|
+
# Create the ChallengeInstance
|
35
|
+
# @param [String] factor_sid The unique SID identifier of the Factor.
|
36
|
+
# @param [Time] expiration_date The future date in which this Challenge will
|
37
|
+
# expire, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
38
|
+
# @param [String] details Details provided to give context about the Challenge.
|
39
|
+
# Shown to the end user.
|
40
|
+
# @param [String] hidden_details Details provided to give context about the
|
41
|
+
# Challenge. Not shown to the end user.
|
42
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
43
|
+
# @return [ChallengeInstance] Created ChallengeInstance
|
44
|
+
def create(factor_sid: nil, expiration_date: :unset, details: :unset, hidden_details: :unset, twilio_sandbox_mode: :unset)
|
47
45
|
data = Twilio::Values.of({
|
48
|
-
'
|
49
|
-
'
|
50
|
-
'
|
51
|
-
'
|
46
|
+
'FactorSid' => factor_sid,
|
47
|
+
'ExpirationDate' => Twilio.serialize_iso8601_datetime(expiration_date),
|
48
|
+
'Details' => details,
|
49
|
+
'HiddenDetails' => hidden_details,
|
52
50
|
})
|
51
|
+
headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
|
53
52
|
|
54
|
-
payload = @version.create(
|
55
|
-
'POST',
|
56
|
-
@uri,
|
57
|
-
data: data
|
58
|
-
)
|
53
|
+
payload = @version.create('POST', @uri, data: data, headers: headers)
|
59
54
|
|
60
|
-
|
55
|
+
ChallengeInstance.new(
|
61
56
|
@version,
|
62
57
|
payload,
|
63
58
|
service_sid: @solution[:service_sid],
|
@@ -66,9 +61,13 @@ module Twilio
|
|
66
61
|
end
|
67
62
|
|
68
63
|
##
|
69
|
-
# Lists
|
64
|
+
# Lists ChallengeInstance records from the API as a list.
|
70
65
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
71
66
|
# memory before returning.
|
67
|
+
# @param [String] factor_sid The unique SID identifier of the Factor.
|
68
|
+
# @param [challenge.ChallengeStatuses] status The Status of the Challenges to
|
69
|
+
# fetch. One of `pending`, `expired`, `approved` or `denied`.
|
70
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
72
71
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
73
72
|
# guarantees to never return more than limit. Default is no limit
|
74
73
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -76,14 +75,24 @@ module Twilio
|
|
76
75
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
77
76
|
# efficient page size, i.e. min(limit, 1000)
|
78
77
|
# @return [Array] Array of up to limit results
|
79
|
-
def list(limit: nil, page_size: nil)
|
80
|
-
self.stream(
|
78
|
+
def list(factor_sid: :unset, status: :unset, twilio_sandbox_mode: :unset, limit: nil, page_size: nil)
|
79
|
+
self.stream(
|
80
|
+
factor_sid: factor_sid,
|
81
|
+
status: status,
|
82
|
+
twilio_sandbox_mode: twilio_sandbox_mode,
|
83
|
+
limit: limit,
|
84
|
+
page_size: page_size
|
85
|
+
).entries
|
81
86
|
end
|
82
87
|
|
83
88
|
##
|
84
|
-
# Streams
|
89
|
+
# Streams ChallengeInstance records from the API as an Enumerable.
|
85
90
|
# This operation lazily loads records as efficiently as possible until the limit
|
86
91
|
# is reached.
|
92
|
+
# @param [String] factor_sid The unique SID identifier of the Factor.
|
93
|
+
# @param [challenge.ChallengeStatuses] status The Status of the Challenges to
|
94
|
+
# fetch. One of `pending`, `expired`, `approved` or `denied`.
|
95
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
87
96
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
88
97
|
# guarantees to never return more than limit. Default is no limit.
|
89
98
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -91,16 +100,21 @@ module Twilio
|
|
91
100
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
92
101
|
# efficient page size, i.e. min(limit, 1000)
|
93
102
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
94
|
-
def stream(limit: nil, page_size: nil)
|
103
|
+
def stream(factor_sid: :unset, status: :unset, twilio_sandbox_mode: :unset, limit: nil, page_size: nil)
|
95
104
|
limits = @version.read_limits(limit, page_size)
|
96
105
|
|
97
|
-
page = self.page(
|
106
|
+
page = self.page(
|
107
|
+
factor_sid: factor_sid,
|
108
|
+
status: status,
|
109
|
+
twilio_sandbox_mode: twilio_sandbox_mode,
|
110
|
+
page_size: limits[:page_size],
|
111
|
+
)
|
98
112
|
|
99
113
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
103
|
-
# When passed a block, yields
|
117
|
+
# When passed a block, yields ChallengeInstance records from the API.
|
104
118
|
# This operation lazily loads records as efficiently as possible until the limit
|
105
119
|
# is reached.
|
106
120
|
def each
|
@@ -114,55 +128,60 @@ module Twilio
|
|
114
128
|
end
|
115
129
|
|
116
130
|
##
|
117
|
-
# Retrieve a single page of
|
131
|
+
# Retrieve a single page of ChallengeInstance records from the API.
|
118
132
|
# Request is executed immediately.
|
133
|
+
# @param [String] factor_sid The unique SID identifier of the Factor.
|
134
|
+
# @param [challenge.ChallengeStatuses] status The Status of the Challenges to
|
135
|
+
# fetch. One of `pending`, `expired`, `approved` or `denied`.
|
136
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
119
137
|
# @param [String] page_token PageToken provided by the API
|
120
138
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
121
139
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
122
|
-
# @return [Page] Page of
|
123
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
140
|
+
# @return [Page] Page of ChallengeInstance
|
141
|
+
def page(factor_sid: :unset, status: :unset, twilio_sandbox_mode: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
124
142
|
params = Twilio::Values.of({
|
143
|
+
'FactorSid' => factor_sid,
|
144
|
+
'Status' => status,
|
125
145
|
'PageToken' => page_token,
|
126
146
|
'Page' => page_number,
|
127
147
|
'PageSize' => page_size,
|
128
148
|
})
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
)
|
134
|
-
FactorPage.new(@version, response, @solution)
|
149
|
+
headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
|
150
|
+
|
151
|
+
response = @version.page('GET', @uri, params: params, headers: headers)
|
152
|
+
|
153
|
+
ChallengePage.new(@version, response, @solution)
|
135
154
|
end
|
136
155
|
|
137
156
|
##
|
138
|
-
# Retrieve a single page of
|
157
|
+
# Retrieve a single page of ChallengeInstance records from the API.
|
139
158
|
# Request is executed immediately.
|
140
159
|
# @param [String] target_url API-generated URL for the requested results page
|
141
|
-
# @return [Page] Page of
|
160
|
+
# @return [Page] Page of ChallengeInstance
|
142
161
|
def get_page(target_url)
|
143
162
|
response = @version.domain.request(
|
144
163
|
'GET',
|
145
164
|
target_url
|
146
165
|
)
|
147
|
-
|
166
|
+
ChallengePage.new(@version, response, @solution)
|
148
167
|
end
|
149
168
|
|
150
169
|
##
|
151
170
|
# Provide a user friendly representation
|
152
171
|
def to_s
|
153
|
-
'#<Twilio.
|
172
|
+
'#<Twilio.Verify.V2.ChallengeList>'
|
154
173
|
end
|
155
174
|
end
|
156
175
|
|
157
176
|
##
|
158
177
|
# 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.
|
159
|
-
class
|
178
|
+
class ChallengePage < Page
|
160
179
|
##
|
161
|
-
# Initialize the
|
180
|
+
# Initialize the ChallengePage
|
162
181
|
# @param [Version] version Version that contains the resource
|
163
182
|
# @param [Response] response Response from the API
|
164
183
|
# @param [Hash] solution Path solution for the resource
|
165
|
-
# @return [
|
184
|
+
# @return [ChallengePage] ChallengePage
|
166
185
|
def initialize(version, response, solution)
|
167
186
|
super(version, response)
|
168
187
|
|
@@ -171,11 +190,11 @@ module Twilio
|
|
171
190
|
end
|
172
191
|
|
173
192
|
##
|
174
|
-
# Build an instance of
|
193
|
+
# Build an instance of ChallengeInstance
|
175
194
|
# @param [Hash] payload Payload response from the API
|
176
|
-
# @return [
|
195
|
+
# @return [ChallengeInstance] ChallengeInstance
|
177
196
|
def get_instance(payload)
|
178
|
-
|
197
|
+
ChallengeInstance.new(
|
179
198
|
@version,
|
180
199
|
payload,
|
181
200
|
service_sid: @solution[:service_sid],
|
@@ -186,52 +205,41 @@ module Twilio
|
|
186
205
|
##
|
187
206
|
# Provide a user friendly representation
|
188
207
|
def to_s
|
189
|
-
'<Twilio.
|
208
|
+
'<Twilio.Verify.V2.ChallengePage>'
|
190
209
|
end
|
191
210
|
end
|
192
211
|
|
193
212
|
##
|
194
213
|
# 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.
|
195
|
-
class
|
214
|
+
class ChallengeContext < InstanceContext
|
196
215
|
##
|
197
|
-
# Initialize the
|
216
|
+
# Initialize the ChallengeContext
|
198
217
|
# @param [Version] version Version that contains the resource
|
199
218
|
# @param [String] service_sid The unique SID identifier of the Service.
|
200
|
-
# @param [String] identity
|
201
|
-
#
|
202
|
-
#
|
203
|
-
# @
|
219
|
+
# @param [String] identity The unique external identifier for the Entity of the
|
220
|
+
# Service. This identifier should be immutable, not PII, and generated by your
|
221
|
+
# external system, such as your user's UUID, GUID, or SID.
|
222
|
+
# @param [String] sid A 34 character string that uniquely identifies this
|
223
|
+
# Challenge.
|
224
|
+
# @return [ChallengeContext] ChallengeContext
|
204
225
|
def initialize(version, service_sid, identity, sid)
|
205
226
|
super(version)
|
206
227
|
|
207
228
|
# Path Solution
|
208
229
|
@solution = {service_sid: service_sid, identity: identity, sid: sid, }
|
209
|
-
@uri = "/Services/#{@solution[:service_sid]}/Entities/#{@solution[:identity]}/
|
210
|
-
|
211
|
-
# Dependents
|
212
|
-
@challenges = nil
|
213
|
-
end
|
214
|
-
|
215
|
-
##
|
216
|
-
# Deletes the FactorInstance
|
217
|
-
# @return [Boolean] true if delete succeeds, false otherwise
|
218
|
-
def delete
|
219
|
-
@version.delete('delete', @uri)
|
230
|
+
@uri = "/Services/#{@solution[:service_sid]}/Entities/#{@solution[:identity]}/Challenges/#{@solution[:sid]}"
|
220
231
|
end
|
221
232
|
|
222
233
|
##
|
223
|
-
# Fetch
|
224
|
-
# @
|
225
|
-
|
226
|
-
|
234
|
+
# Fetch the ChallengeInstance
|
235
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
236
|
+
# @return [ChallengeInstance] Fetched ChallengeInstance
|
237
|
+
def fetch(twilio_sandbox_mode: :unset)
|
238
|
+
headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
|
227
239
|
|
228
|
-
payload = @version.fetch(
|
229
|
-
'GET',
|
230
|
-
@uri,
|
231
|
-
params,
|
232
|
-
)
|
240
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
233
241
|
|
234
|
-
|
242
|
+
ChallengeInstance.new(
|
235
243
|
@version,
|
236
244
|
payload,
|
237
245
|
service_sid: @solution[:service_sid],
|
@@ -241,27 +249,18 @@ module Twilio
|
|
241
249
|
end
|
242
250
|
|
243
251
|
##
|
244
|
-
# Update the
|
245
|
-
# @param [String] auth_payload The optional payload needed to verify the
|
246
|
-
#
|
247
|
-
# @param [String]
|
248
|
-
# @
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
data = Twilio::Values.of({
|
253
|
-
'AuthPayload' => auth_payload,
|
254
|
-
'FriendlyName' => friendly_name,
|
255
|
-
'Config' => config,
|
256
|
-
})
|
252
|
+
# Update the ChallengeInstance
|
253
|
+
# @param [String] auth_payload The optional payload needed to verify the
|
254
|
+
# Challenge. E.g., a TOTP would use the numeric code.
|
255
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
256
|
+
# @return [ChallengeInstance] Updated ChallengeInstance
|
257
|
+
def update(auth_payload: :unset, twilio_sandbox_mode: :unset)
|
258
|
+
data = Twilio::Values.of({'AuthPayload' => auth_payload, })
|
259
|
+
headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
|
257
260
|
|
258
|
-
payload = @version.update(
|
259
|
-
'POST',
|
260
|
-
@uri,
|
261
|
-
data: data,
|
262
|
-
)
|
261
|
+
payload = @version.update('POST', @uri, data: data, headers: headers)
|
263
262
|
|
264
|
-
|
263
|
+
ChallengeInstance.new(
|
265
264
|
@version,
|
266
265
|
payload,
|
267
266
|
service_sid: @solution[:service_sid],
|
@@ -270,62 +269,34 @@ module Twilio
|
|
270
269
|
)
|
271
270
|
end
|
272
271
|
|
273
|
-
##
|
274
|
-
# Access the challenges
|
275
|
-
# @return [ChallengeList]
|
276
|
-
# @return [ChallengeContext] if sid was passed.
|
277
|
-
def challenges(sid=:unset)
|
278
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
279
|
-
|
280
|
-
if sid != :unset
|
281
|
-
return ChallengeContext.new(
|
282
|
-
@version,
|
283
|
-
@solution[:service_sid],
|
284
|
-
@solution[:identity],
|
285
|
-
@solution[:sid],
|
286
|
-
sid,
|
287
|
-
)
|
288
|
-
end
|
289
|
-
|
290
|
-
unless @challenges
|
291
|
-
@challenges = ChallengeList.new(
|
292
|
-
@version,
|
293
|
-
service_sid: @solution[:service_sid],
|
294
|
-
identity: @solution[:identity],
|
295
|
-
factor_sid: @solution[:sid],
|
296
|
-
)
|
297
|
-
end
|
298
|
-
|
299
|
-
@challenges
|
300
|
-
end
|
301
|
-
|
302
272
|
##
|
303
273
|
# Provide a user friendly representation
|
304
274
|
def to_s
|
305
275
|
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
306
|
-
"#<Twilio.
|
276
|
+
"#<Twilio.Verify.V2.ChallengeContext #{context}>"
|
307
277
|
end
|
308
278
|
|
309
279
|
##
|
310
280
|
# Provide a detailed, user friendly representation
|
311
281
|
def inspect
|
312
282
|
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
313
|
-
"#<Twilio.
|
283
|
+
"#<Twilio.Verify.V2.ChallengeContext #{context}>"
|
314
284
|
end
|
315
285
|
end
|
316
286
|
|
317
287
|
##
|
318
288
|
# 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.
|
319
|
-
class
|
289
|
+
class ChallengeInstance < InstanceResource
|
320
290
|
##
|
321
|
-
# Initialize the
|
291
|
+
# Initialize the ChallengeInstance
|
322
292
|
# @param [Version] version Version that contains the resource
|
323
293
|
# @param [Hash] payload payload that contains response from Twilio
|
324
294
|
# @param [String] service_sid The unique SID identifier of the Service.
|
325
295
|
# @param [String] identity Customer unique identity for the Entity owner of the
|
326
|
-
#
|
327
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
328
|
-
#
|
296
|
+
# Challenge
|
297
|
+
# @param [String] sid A 34 character string that uniquely identifies this
|
298
|
+
# Challenge.
|
299
|
+
# @return [ChallengeInstance] ChallengeInstance
|
329
300
|
def initialize(version, payload, service_sid: nil, identity: nil, sid: nil)
|
330
301
|
super(version)
|
331
302
|
|
@@ -336,14 +307,17 @@ module Twilio
|
|
336
307
|
'service_sid' => payload['service_sid'],
|
337
308
|
'entity_sid' => payload['entity_sid'],
|
338
309
|
'identity' => payload['identity'],
|
310
|
+
'factor_sid' => payload['factor_sid'],
|
339
311
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
340
312
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
341
|
-
'
|
313
|
+
'date_responded' => Twilio.deserialize_iso8601_datetime(payload['date_responded']),
|
314
|
+
'expiration_date' => Twilio.deserialize_iso8601_datetime(payload['expiration_date']),
|
342
315
|
'status' => payload['status'],
|
316
|
+
'responded_reason' => payload['responded_reason'],
|
317
|
+
'details' => payload['details'],
|
318
|
+
'hidden_details' => payload['hidden_details'],
|
343
319
|
'factor_type' => payload['factor_type'],
|
344
|
-
'config' => payload['config'],
|
345
320
|
'url' => payload['url'],
|
346
|
-
'links' => payload['links'],
|
347
321
|
}
|
348
322
|
|
349
323
|
# Context
|
@@ -354,10 +328,10 @@ module Twilio
|
|
354
328
|
##
|
355
329
|
# Generate an instance context for the instance, the context is capable of
|
356
330
|
# performing various actions. All instance actions are proxied to the context
|
357
|
-
# @return [
|
331
|
+
# @return [ChallengeContext] ChallengeContext for this ChallengeInstance
|
358
332
|
def context
|
359
333
|
unless @instance_context
|
360
|
-
@instance_context =
|
334
|
+
@instance_context = ChallengeContext.new(
|
361
335
|
@version,
|
362
336
|
@params['service_sid'],
|
363
337
|
@params['identity'],
|
@@ -368,7 +342,7 @@ module Twilio
|
|
368
342
|
end
|
369
343
|
|
370
344
|
##
|
371
|
-
# @return [String] A string that uniquely identifies this
|
345
|
+
# @return [String] A string that uniquely identifies this Challenge.
|
372
346
|
def sid
|
373
347
|
@properties['sid']
|
374
348
|
end
|
@@ -392,104 +366,107 @@ module Twilio
|
|
392
366
|
end
|
393
367
|
|
394
368
|
##
|
395
|
-
# @return [String] Unique
|
369
|
+
# @return [String] Unique external identifier of the Entity
|
396
370
|
def identity
|
397
371
|
@properties['identity']
|
398
372
|
end
|
399
373
|
|
400
374
|
##
|
401
|
-
# @return [
|
375
|
+
# @return [String] Factor Sid.
|
376
|
+
def factor_sid
|
377
|
+
@properties['factor_sid']
|
378
|
+
end
|
379
|
+
|
380
|
+
##
|
381
|
+
# @return [Time] The date this Challenge was created
|
402
382
|
def date_created
|
403
383
|
@properties['date_created']
|
404
384
|
end
|
405
385
|
|
406
386
|
##
|
407
|
-
# @return [Time] The date this
|
387
|
+
# @return [Time] The date this Challenge was updated
|
408
388
|
def date_updated
|
409
389
|
@properties['date_updated']
|
410
390
|
end
|
411
391
|
|
412
392
|
##
|
413
|
-
# @return [
|
414
|
-
def
|
415
|
-
@properties['
|
393
|
+
# @return [Time] The date this Challenge was responded
|
394
|
+
def date_responded
|
395
|
+
@properties['date_responded']
|
416
396
|
end
|
417
397
|
|
418
398
|
##
|
419
|
-
# @return [
|
420
|
-
def
|
421
|
-
@properties['
|
399
|
+
# @return [Time] The date this Challenge is expired
|
400
|
+
def expiration_date
|
401
|
+
@properties['expiration_date']
|
422
402
|
end
|
423
403
|
|
424
404
|
##
|
425
|
-
# @return [
|
426
|
-
def
|
427
|
-
@properties['
|
405
|
+
# @return [challenge.ChallengeStatuses] The Status of this Challenge
|
406
|
+
def status
|
407
|
+
@properties['status']
|
428
408
|
end
|
429
409
|
|
430
410
|
##
|
431
|
-
# @return [
|
432
|
-
def
|
433
|
-
@properties['
|
411
|
+
# @return [challenge.ChallengeReasons] The Reason of this Challenge `status`
|
412
|
+
def responded_reason
|
413
|
+
@properties['responded_reason']
|
434
414
|
end
|
435
415
|
|
436
416
|
##
|
437
|
-
# @return [String]
|
438
|
-
def
|
439
|
-
@properties['
|
417
|
+
# @return [String] Public details provided to contextualize the Challenge
|
418
|
+
def details
|
419
|
+
@properties['details']
|
440
420
|
end
|
441
421
|
|
442
422
|
##
|
443
|
-
# @return [String]
|
444
|
-
def
|
445
|
-
@properties['
|
423
|
+
# @return [String] Hidden details provided to contextualize the Challenge
|
424
|
+
def hidden_details
|
425
|
+
@properties['hidden_details']
|
446
426
|
end
|
447
427
|
|
448
428
|
##
|
449
|
-
#
|
450
|
-
|
451
|
-
|
452
|
-
context.delete
|
429
|
+
# @return [challenge.FactorTypes] The Factor Type of this Challenge
|
430
|
+
def factor_type
|
431
|
+
@properties['factor_type']
|
453
432
|
end
|
454
433
|
|
455
434
|
##
|
456
|
-
#
|
457
|
-
|
458
|
-
|
459
|
-
context.fetch
|
435
|
+
# @return [String] The URL of this resource.
|
436
|
+
def url
|
437
|
+
@properties['url']
|
460
438
|
end
|
461
439
|
|
462
440
|
##
|
463
|
-
#
|
464
|
-
# @param [String]
|
465
|
-
#
|
466
|
-
|
467
|
-
|
468
|
-
# with the required properties for the given factor type
|
469
|
-
# @return [FactorInstance] Updated FactorInstance
|
470
|
-
def update(auth_payload: :unset, friendly_name: :unset, config: :unset)
|
471
|
-
context.update(auth_payload: auth_payload, friendly_name: friendly_name, config: config, )
|
441
|
+
# Fetch the ChallengeInstance
|
442
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
443
|
+
# @return [ChallengeInstance] Fetched ChallengeInstance
|
444
|
+
def fetch(twilio_sandbox_mode: :unset)
|
445
|
+
context.fetch(twilio_sandbox_mode: twilio_sandbox_mode, )
|
472
446
|
end
|
473
447
|
|
474
448
|
##
|
475
|
-
#
|
476
|
-
# @
|
477
|
-
|
478
|
-
|
449
|
+
# Update the ChallengeInstance
|
450
|
+
# @param [String] auth_payload The optional payload needed to verify the
|
451
|
+
# Challenge. E.g., a TOTP would use the numeric code.
|
452
|
+
# @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
|
453
|
+
# @return [ChallengeInstance] Updated ChallengeInstance
|
454
|
+
def update(auth_payload: :unset, twilio_sandbox_mode: :unset)
|
455
|
+
context.update(auth_payload: auth_payload, twilio_sandbox_mode: twilio_sandbox_mode, )
|
479
456
|
end
|
480
457
|
|
481
458
|
##
|
482
459
|
# Provide a user friendly representation
|
483
460
|
def to_s
|
484
461
|
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
485
|
-
"<Twilio.
|
462
|
+
"<Twilio.Verify.V2.ChallengeInstance #{values}>"
|
486
463
|
end
|
487
464
|
|
488
465
|
##
|
489
466
|
# Provide a detailed, user friendly representation
|
490
467
|
def inspect
|
491
468
|
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
492
|
-
"<Twilio.
|
469
|
+
"<Twilio.Verify.V2.ChallengeInstance #{values}>"
|
493
470
|
end
|
494
471
|
end
|
495
472
|
end
|