twilio-ruby 7.11.1 → 7.11.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 +221 -0
- data/Gemfile.lock +2 -2
- data/README.md +2 -2
- data/lib/rack/twilio_webhook_authentication.rb +45 -2
- data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/credential.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/messaging_geopermissions.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/balance.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +6 -0
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +0 -59
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +0 -59
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +0 -59
- data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +0 -59
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +0 -59
- data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +0 -59
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v2/action.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v2/configuration.rb +525 -0
- data/lib/twilio-ruby/rest/conversations/v2/operation.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v2.rb +10 -4
- data/lib/twilio-ruby/rest/events/v1/schema.rb +0 -59
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +0 -59
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +0 -59
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +0 -59
- data/lib/twilio-ruby/rest/iam/v1/api_key.rb +0 -59
- data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +0 -59
- data/lib/twilio-ruby/rest/iam/v1/o_auth_app.rb +0 -59
- data/lib/twilio-ruby/rest/iam/v1/token.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v1/call.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v1/setting.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v2/inbound.rb +2 -261
- data/lib/twilio-ruby/rest/insights/v2/inbound_report.rb +258 -0
- data/lib/twilio-ruby/rest/insights/v2/outbound.rb +18 -299
- data/lib/twilio-ruby/rest/insights/v2/outbound_report.rb +258 -0
- data/lib/twilio-ruby/rest/insights/v2/report.rb +27 -184
- data/lib/twilio-ruby/rest/insights/v2.rb +14 -4
- data/lib/twilio-ruby/rest/insights/v3/metadata.rb +1 -60
- data/lib/twilio-ruby/rest/insights/v3/query.rb +1 -60
- data/lib/twilio-ruby/rest/insights/v3/query_job.rb +654 -0
- data/lib/twilio-ruby/rest/insights/v3/result.rb +195 -0
- data/lib/twilio-ruby/rest/insights/v3.rb +17 -1
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb +0 -59
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb +0 -59
- data/lib/twilio-ruby/rest/knowledge/v2/operation.rb +0 -59
- data/lib/twilio-ruby/rest/knowledge/v2/search.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/bucket.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/lookup_override.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/query.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/rate_limit.rb +0 -59
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +0 -59
- data/lib/twilio-ruby/rest/marketplace/v1/module_data.rb +0 -59
- data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +0 -59
- data/lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/bulk.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/conversation_summary.rb +2 -4
- data/lib/twilio-ruby/rest/memory/v1/identifier.rb +0 -80
- data/lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/lookup.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/observation.rb +2 -4
- data/lib/twilio-ruby/rest/memory/v1/operation.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/recall.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/revision.rb +2 -4
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/deactivations.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/domain_validate_dn.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/request_managed_cert.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +2 -4
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/usecase.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v2/domain_certs.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb +0 -59
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/embedded_session.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/sender_id_registration.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification_check.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification_check.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/webhook.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2.rb +0 -16
- data/lib/twilio-ruby/rest/numbers/v3/hosted_number_order.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v1/authorize.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v2/authorize.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v2/token.rb +2 -61
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +0 -59
- data/lib/twilio-ruby/rest/preview_iam/v1/authorize.rb +0 -59
- data/lib/twilio-ruby/rest/preview_iam/v1/token.rb +0 -59
- data/lib/twilio-ruby/rest/preview_iam/versionless/organization.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v2/number.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v2/voice.rb +0 -59
- data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +0 -59
- data/lib/twilio-ruby/rest/routes/v2/trunk.rb +0 -59
- data/lib/twilio-ruby/rest/routes/v3/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +0 -59
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +0 -59
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration_embedded_session.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration_embedded_session.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/form.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/safelist.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/new_challenge.rb +3 -62
- data/lib/twilio-ruby/rest/verify/v2/service/new_factor.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +8 -61
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/room/recording_rules.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/account_default_configuration.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/configuration/default.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/configuration.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/recording.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/transcription.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/type.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v3/transcription.rb +259 -50
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +6 -4
- data/lib/twilio-ruby/rest/memory/v1/event.rb +0 -320
- data/lib/twilio-ruby/rest/numbers/v2/caller_id.rb +0 -515
|
@@ -214,65 +214,6 @@ module Twilio
|
|
|
214
214
|
end
|
|
215
215
|
end
|
|
216
216
|
|
|
217
|
-
class SchemaPageMetadata < PageMetadata
|
|
218
|
-
attr_reader :schema_page
|
|
219
|
-
|
|
220
|
-
def initialize(version, response, solution, limit)
|
|
221
|
-
super(version, response)
|
|
222
|
-
@schema_page = []
|
|
223
|
-
@limit = limit
|
|
224
|
-
key = get_key(response.body)
|
|
225
|
-
records = 0
|
|
226
|
-
while( limit != :unset && records < limit )
|
|
227
|
-
@schema_page << SchemaListResponse.new(version, @payload, key, limit - records)
|
|
228
|
-
@payload = self.next_page
|
|
229
|
-
break unless @payload
|
|
230
|
-
records += (@payload.body[key] || []).size
|
|
231
|
-
end
|
|
232
|
-
# Path Solution
|
|
233
|
-
@solution = solution
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
def each
|
|
237
|
-
@schema_page.each do |record|
|
|
238
|
-
yield record
|
|
239
|
-
end
|
|
240
|
-
end
|
|
241
|
-
|
|
242
|
-
def to_s
|
|
243
|
-
'<Twilio::REST::Events::V1PageMetadata>';
|
|
244
|
-
end
|
|
245
|
-
end
|
|
246
|
-
class SchemaListResponse < InstanceListResource
|
|
247
|
-
|
|
248
|
-
# @param [Array<SchemaInstance>] instance
|
|
249
|
-
# @param [Hash{String => Object}] headers
|
|
250
|
-
# @param [Integer] status_code
|
|
251
|
-
def initialize(version, payload, key, limit = :unset)
|
|
252
|
-
data_list = payload.body[key] || []
|
|
253
|
-
if limit != :unset
|
|
254
|
-
data_list = data_list[0, limit]
|
|
255
|
-
end
|
|
256
|
-
@schema = data_list.map do |data|
|
|
257
|
-
SchemaInstance.new(version, data)
|
|
258
|
-
end
|
|
259
|
-
@headers = payload.headers
|
|
260
|
-
@status_code = payload.status_code
|
|
261
|
-
end
|
|
262
|
-
|
|
263
|
-
def schema
|
|
264
|
-
@schema
|
|
265
|
-
end
|
|
266
|
-
|
|
267
|
-
def headers
|
|
268
|
-
@headers
|
|
269
|
-
end
|
|
270
|
-
|
|
271
|
-
def status_code
|
|
272
|
-
@status_code
|
|
273
|
-
end
|
|
274
|
-
end
|
|
275
|
-
|
|
276
217
|
class SchemaInstance < InstanceResource
|
|
277
218
|
##
|
|
278
219
|
# Initialize the SchemaInstance
|
|
@@ -116,65 +116,6 @@ module Twilio
|
|
|
116
116
|
end
|
|
117
117
|
end
|
|
118
118
|
|
|
119
|
-
class SinkTestPageMetadata < PageMetadata
|
|
120
|
-
attr_reader :sink_test_page
|
|
121
|
-
|
|
122
|
-
def initialize(version, response, solution, limit)
|
|
123
|
-
super(version, response)
|
|
124
|
-
@sink_test_page = []
|
|
125
|
-
@limit = limit
|
|
126
|
-
key = get_key(response.body)
|
|
127
|
-
records = 0
|
|
128
|
-
while( limit != :unset && records < limit )
|
|
129
|
-
@sink_test_page << SinkTestListResponse.new(version, @payload, key, limit - records)
|
|
130
|
-
@payload = self.next_page
|
|
131
|
-
break unless @payload
|
|
132
|
-
records += (@payload.body[key] || []).size
|
|
133
|
-
end
|
|
134
|
-
# Path Solution
|
|
135
|
-
@solution = solution
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
def each
|
|
139
|
-
@sink_test_page.each do |record|
|
|
140
|
-
yield record
|
|
141
|
-
end
|
|
142
|
-
end
|
|
143
|
-
|
|
144
|
-
def to_s
|
|
145
|
-
'<Twilio::REST::Events::V1PageMetadata>';
|
|
146
|
-
end
|
|
147
|
-
end
|
|
148
|
-
class SinkTestListResponse < InstanceListResource
|
|
149
|
-
|
|
150
|
-
# @param [Array<SinkTestInstance>] instance
|
|
151
|
-
# @param [Hash{String => Object}] headers
|
|
152
|
-
# @param [Integer] status_code
|
|
153
|
-
def initialize(version, payload, key, limit = :unset)
|
|
154
|
-
data_list = payload.body[key] || []
|
|
155
|
-
if limit != :unset
|
|
156
|
-
data_list = data_list[0, limit]
|
|
157
|
-
end
|
|
158
|
-
@sink_test = data_list.map do |data|
|
|
159
|
-
SinkTestInstance.new(version, data)
|
|
160
|
-
end
|
|
161
|
-
@headers = payload.headers
|
|
162
|
-
@status_code = payload.status_code
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
def sink_test
|
|
166
|
-
@sink_test
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
def headers
|
|
170
|
-
@headers
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
def status_code
|
|
174
|
-
@status_code
|
|
175
|
-
end
|
|
176
|
-
end
|
|
177
|
-
|
|
178
119
|
class SinkTestInstance < InstanceResource
|
|
179
120
|
##
|
|
180
121
|
# Initialize the SinkTestInstance
|
|
@@ -130,65 +130,6 @@ module Twilio
|
|
|
130
130
|
end
|
|
131
131
|
end
|
|
132
132
|
|
|
133
|
-
class SinkValidatePageMetadata < PageMetadata
|
|
134
|
-
attr_reader :sink_validate_page
|
|
135
|
-
|
|
136
|
-
def initialize(version, response, solution, limit)
|
|
137
|
-
super(version, response)
|
|
138
|
-
@sink_validate_page = []
|
|
139
|
-
@limit = limit
|
|
140
|
-
key = get_key(response.body)
|
|
141
|
-
records = 0
|
|
142
|
-
while( limit != :unset && records < limit )
|
|
143
|
-
@sink_validate_page << SinkValidateListResponse.new(version, @payload, key, limit - records)
|
|
144
|
-
@payload = self.next_page
|
|
145
|
-
break unless @payload
|
|
146
|
-
records += (@payload.body[key] || []).size
|
|
147
|
-
end
|
|
148
|
-
# Path Solution
|
|
149
|
-
@solution = solution
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
def each
|
|
153
|
-
@sink_validate_page.each do |record|
|
|
154
|
-
yield record
|
|
155
|
-
end
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
def to_s
|
|
159
|
-
'<Twilio::REST::Events::V1PageMetadata>';
|
|
160
|
-
end
|
|
161
|
-
end
|
|
162
|
-
class SinkValidateListResponse < InstanceListResource
|
|
163
|
-
|
|
164
|
-
# @param [Array<SinkValidateInstance>] instance
|
|
165
|
-
# @param [Hash{String => Object}] headers
|
|
166
|
-
# @param [Integer] status_code
|
|
167
|
-
def initialize(version, payload, key, limit = :unset)
|
|
168
|
-
data_list = payload.body[key] || []
|
|
169
|
-
if limit != :unset
|
|
170
|
-
data_list = data_list[0, limit]
|
|
171
|
-
end
|
|
172
|
-
@sink_validate = data_list.map do |data|
|
|
173
|
-
SinkValidateInstance.new(version, data)
|
|
174
|
-
end
|
|
175
|
-
@headers = payload.headers
|
|
176
|
-
@status_code = payload.status_code
|
|
177
|
-
end
|
|
178
|
-
|
|
179
|
-
def sink_validate
|
|
180
|
-
@sink_validate
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
def headers
|
|
184
|
-
@headers
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
def status_code
|
|
188
|
-
@status_code
|
|
189
|
-
end
|
|
190
|
-
end
|
|
191
|
-
|
|
192
133
|
class SinkValidateInstance < InstanceResource
|
|
193
134
|
##
|
|
194
135
|
# Initialize the SinkValidateInstance
|
|
@@ -150,8 +150,8 @@ module Twilio
|
|
|
150
150
|
# Lists AssessmentsInstance records from the API as a list.
|
|
151
151
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
152
152
|
# memory before returning.
|
|
153
|
-
# @param [String] authorization The Authorization HTTP request header
|
|
154
153
|
# @param [String] segment_id The id of the segment.
|
|
154
|
+
# @param [String] authorization The Authorization HTTP request header
|
|
155
155
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
156
156
|
# guarantees to never return more than limit. Default is no limit
|
|
157
157
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -159,10 +159,10 @@ module Twilio
|
|
|
159
159
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
160
160
|
# efficient page size, i.e. min(limit, 1000)
|
|
161
161
|
# @return [Array] Array of up to limit results
|
|
162
|
-
def list(
|
|
162
|
+
def list(segment_id: :unset, authorization: :unset, limit: nil, page_size: nil)
|
|
163
163
|
self.stream(
|
|
164
|
-
authorization: authorization,
|
|
165
164
|
segment_id: segment_id,
|
|
165
|
+
authorization: authorization,
|
|
166
166
|
limit: limit,
|
|
167
167
|
page_size: page_size
|
|
168
168
|
).entries
|
|
@@ -172,8 +172,8 @@ module Twilio
|
|
|
172
172
|
# Streams Instance records from the API as an Enumerable.
|
|
173
173
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
174
174
|
# is reached.
|
|
175
|
-
# @param [String] authorization The Authorization HTTP request header
|
|
176
175
|
# @param [String] segment_id The id of the segment.
|
|
176
|
+
# @param [String] authorization The Authorization HTTP request header
|
|
177
177
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
178
178
|
# guarantees to never return more than limit. Default is no limit
|
|
179
179
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -181,12 +181,12 @@ module Twilio
|
|
|
181
181
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
182
182
|
# efficient page size, i.e. min(limit, 1000)
|
|
183
183
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
184
|
-
def stream(
|
|
184
|
+
def stream(segment_id: :unset, authorization: :unset, limit: nil, page_size: nil)
|
|
185
185
|
limits = @version.read_limits(limit, page_size)
|
|
186
186
|
|
|
187
187
|
page = self.page(
|
|
188
|
-
authorization: authorization,
|
|
189
188
|
segment_id: segment_id,
|
|
189
|
+
authorization: authorization,
|
|
190
190
|
page_size: limits[:page_size], )
|
|
191
191
|
|
|
192
192
|
return [].each if page.nil?
|
|
@@ -198,8 +198,8 @@ module Twilio
|
|
|
198
198
|
|
|
199
199
|
##
|
|
200
200
|
# Lists AssessmentsPageMetadata records from the API as a list.
|
|
201
|
-
# @param [String] authorization The Authorization HTTP request header
|
|
202
201
|
# @param [String] segment_id The id of the segment.
|
|
202
|
+
# @param [String] authorization The Authorization HTTP request header
|
|
203
203
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
204
204
|
# guarantees to never return more than limit. Default is no limit
|
|
205
205
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -207,15 +207,14 @@ module Twilio
|
|
|
207
207
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
208
208
|
# efficient page size, i.e. min(limit, 1000)
|
|
209
209
|
# @return [Array] Array of up to limit results
|
|
210
|
-
def list_with_metadata(
|
|
210
|
+
def list_with_metadata(segment_id: :unset, authorization: :unset, limit: nil, page_size: nil)
|
|
211
211
|
limits = @version.read_limits(limit, page_size)
|
|
212
212
|
params = Twilio::Values.of({
|
|
213
|
-
'Authorization' => authorization,
|
|
214
213
|
'SegmentId' => segment_id,
|
|
215
214
|
|
|
216
215
|
'PageSize' => limits[:page_size],
|
|
217
216
|
});
|
|
218
|
-
headers = Twilio::Values.of({})
|
|
217
|
+
headers = Twilio::Values.of({ 'Authorization' => authorization, })
|
|
219
218
|
|
|
220
219
|
response = @version.page('GET', @uri, params: params, headers: headers)
|
|
221
220
|
|
|
@@ -243,21 +242,20 @@ module Twilio
|
|
|
243
242
|
##
|
|
244
243
|
# Retrieve a single page of AssessmentsInstance records from the API.
|
|
245
244
|
# Request is executed immediately.
|
|
246
|
-
# @param [String] authorization The Authorization HTTP request header
|
|
247
245
|
# @param [String] segment_id The id of the segment.
|
|
246
|
+
# @param [String] authorization The Authorization HTTP request header
|
|
248
247
|
# @param [String] page_token PageToken provided by the API
|
|
249
248
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
250
249
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
251
250
|
# @return [Page] Page of AssessmentsInstance
|
|
252
|
-
def page(
|
|
251
|
+
def page(segment_id: :unset, authorization: :unset, page_token: :unset, page_number: :unset,page_size: :unset)
|
|
253
252
|
params = Twilio::Values.of({
|
|
254
|
-
'Authorization' => authorization,
|
|
255
253
|
'SegmentId' => segment_id,
|
|
256
254
|
'PageToken' => page_token,
|
|
257
255
|
'Page' => page_number,
|
|
258
256
|
'PageSize' => page_size,
|
|
259
257
|
})
|
|
260
|
-
headers = Twilio::Values.of({})
|
|
258
|
+
headers = Twilio::Values.of({ 'Authorization' => authorization, })
|
|
261
259
|
|
|
262
260
|
|
|
263
261
|
|
|
@@ -249,65 +249,6 @@ module Twilio
|
|
|
249
249
|
end
|
|
250
250
|
end
|
|
251
251
|
|
|
252
|
-
class ConfigurationPageMetadata < PageMetadata
|
|
253
|
-
attr_reader :configuration_page
|
|
254
|
-
|
|
255
|
-
def initialize(version, response, solution, limit)
|
|
256
|
-
super(version, response)
|
|
257
|
-
@configuration_page = []
|
|
258
|
-
@limit = limit
|
|
259
|
-
key = get_key(response.body)
|
|
260
|
-
records = 0
|
|
261
|
-
while( limit != :unset && records < limit )
|
|
262
|
-
@configuration_page << ConfigurationListResponse.new(version, @payload, key, limit - records)
|
|
263
|
-
@payload = self.next_page
|
|
264
|
-
break unless @payload
|
|
265
|
-
records += (@payload.body[key] || []).size
|
|
266
|
-
end
|
|
267
|
-
# Path Solution
|
|
268
|
-
@solution = solution
|
|
269
|
-
end
|
|
270
|
-
|
|
271
|
-
def each
|
|
272
|
-
@configuration_page.each do |record|
|
|
273
|
-
yield record
|
|
274
|
-
end
|
|
275
|
-
end
|
|
276
|
-
|
|
277
|
-
def to_s
|
|
278
|
-
'<Twilio::REST::FlexApi::V1PageMetadata>';
|
|
279
|
-
end
|
|
280
|
-
end
|
|
281
|
-
class ConfigurationListResponse < InstanceListResource
|
|
282
|
-
|
|
283
|
-
# @param [Array<ConfigurationInstance>] instance
|
|
284
|
-
# @param [Hash{String => Object}] headers
|
|
285
|
-
# @param [Integer] status_code
|
|
286
|
-
def initialize(version, payload, key, limit = :unset)
|
|
287
|
-
data_list = payload.body[key] || []
|
|
288
|
-
if limit != :unset
|
|
289
|
-
data_list = data_list[0, limit]
|
|
290
|
-
end
|
|
291
|
-
@configuration = data_list.map do |data|
|
|
292
|
-
ConfigurationInstance.new(version, data)
|
|
293
|
-
end
|
|
294
|
-
@headers = payload.headers
|
|
295
|
-
@status_code = payload.status_code
|
|
296
|
-
end
|
|
297
|
-
|
|
298
|
-
def configuration
|
|
299
|
-
@configuration
|
|
300
|
-
end
|
|
301
|
-
|
|
302
|
-
def headers
|
|
303
|
-
@headers
|
|
304
|
-
end
|
|
305
|
-
|
|
306
|
-
def status_code
|
|
307
|
-
@status_code
|
|
308
|
-
end
|
|
309
|
-
end
|
|
310
|
-
|
|
311
252
|
class ConfigurationInstance < InstanceResource
|
|
312
253
|
##
|
|
313
254
|
# Initialize the ConfigurationInstance
|
|
@@ -126,9 +126,9 @@ module Twilio
|
|
|
126
126
|
# Lists InsightsAssessmentsCommentInstance records from the API as a list.
|
|
127
127
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
128
128
|
# memory before returning.
|
|
129
|
-
# @param [String] authorization The Authorization HTTP request header
|
|
130
129
|
# @param [String] segment_id The id of the segment.
|
|
131
130
|
# @param [String] agent_id The id of the agent.
|
|
131
|
+
# @param [String] authorization The Authorization HTTP request header
|
|
132
132
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
133
133
|
# guarantees to never return more than limit. Default is no limit
|
|
134
134
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -136,11 +136,11 @@ module Twilio
|
|
|
136
136
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
137
137
|
# efficient page size, i.e. min(limit, 1000)
|
|
138
138
|
# @return [Array] Array of up to limit results
|
|
139
|
-
def list(
|
|
139
|
+
def list(segment_id: :unset, agent_id: :unset, authorization: :unset, limit: nil, page_size: nil)
|
|
140
140
|
self.stream(
|
|
141
|
-
authorization: authorization,
|
|
142
141
|
segment_id: segment_id,
|
|
143
142
|
agent_id: agent_id,
|
|
143
|
+
authorization: authorization,
|
|
144
144
|
limit: limit,
|
|
145
145
|
page_size: page_size
|
|
146
146
|
).entries
|
|
@@ -150,9 +150,9 @@ module Twilio
|
|
|
150
150
|
# Streams Instance records from the API as an Enumerable.
|
|
151
151
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
152
152
|
# is reached.
|
|
153
|
-
# @param [String] authorization The Authorization HTTP request header
|
|
154
153
|
# @param [String] segment_id The id of the segment.
|
|
155
154
|
# @param [String] agent_id The id of the agent.
|
|
155
|
+
# @param [String] authorization The Authorization HTTP request header
|
|
156
156
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
157
157
|
# guarantees to never return more than limit. Default is no limit
|
|
158
158
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -160,13 +160,13 @@ module Twilio
|
|
|
160
160
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
161
161
|
# efficient page size, i.e. min(limit, 1000)
|
|
162
162
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
163
|
-
def stream(
|
|
163
|
+
def stream(segment_id: :unset, agent_id: :unset, authorization: :unset, limit: nil, page_size: nil)
|
|
164
164
|
limits = @version.read_limits(limit, page_size)
|
|
165
165
|
|
|
166
166
|
page = self.page(
|
|
167
|
-
authorization: authorization,
|
|
168
167
|
segment_id: segment_id,
|
|
169
168
|
agent_id: agent_id,
|
|
169
|
+
authorization: authorization,
|
|
170
170
|
page_size: limits[:page_size], )
|
|
171
171
|
|
|
172
172
|
return [].each if page.nil?
|
|
@@ -178,9 +178,9 @@ module Twilio
|
|
|
178
178
|
|
|
179
179
|
##
|
|
180
180
|
# Lists InsightsAssessmentsCommentPageMetadata records from the API as a list.
|
|
181
|
-
# @param [String] authorization The Authorization HTTP request header
|
|
182
181
|
# @param [String] segment_id The id of the segment.
|
|
183
182
|
# @param [String] agent_id The id of the agent.
|
|
183
|
+
# @param [String] authorization The Authorization HTTP request header
|
|
184
184
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
185
185
|
# guarantees to never return more than limit. Default is no limit
|
|
186
186
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -188,16 +188,15 @@ module Twilio
|
|
|
188
188
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
189
189
|
# efficient page size, i.e. min(limit, 1000)
|
|
190
190
|
# @return [Array] Array of up to limit results
|
|
191
|
-
def list_with_metadata(
|
|
191
|
+
def list_with_metadata(segment_id: :unset, agent_id: :unset, authorization: :unset, limit: nil, page_size: nil)
|
|
192
192
|
limits = @version.read_limits(limit, page_size)
|
|
193
193
|
params = Twilio::Values.of({
|
|
194
|
-
'Authorization' => authorization,
|
|
195
194
|
'SegmentId' => segment_id,
|
|
196
195
|
'AgentId' => agent_id,
|
|
197
196
|
|
|
198
197
|
'PageSize' => limits[:page_size],
|
|
199
198
|
});
|
|
200
|
-
headers = Twilio::Values.of({})
|
|
199
|
+
headers = Twilio::Values.of({ 'Authorization' => authorization, })
|
|
201
200
|
|
|
202
201
|
response = @version.page('GET', @uri, params: params, headers: headers)
|
|
203
202
|
|
|
@@ -225,23 +224,22 @@ module Twilio
|
|
|
225
224
|
##
|
|
226
225
|
# Retrieve a single page of InsightsAssessmentsCommentInstance records from the API.
|
|
227
226
|
# Request is executed immediately.
|
|
228
|
-
# @param [String] authorization The Authorization HTTP request header
|
|
229
227
|
# @param [String] segment_id The id of the segment.
|
|
230
228
|
# @param [String] agent_id The id of the agent.
|
|
229
|
+
# @param [String] authorization The Authorization HTTP request header
|
|
231
230
|
# @param [String] page_token PageToken provided by the API
|
|
232
231
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
233
232
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
234
233
|
# @return [Page] Page of InsightsAssessmentsCommentInstance
|
|
235
|
-
def page(
|
|
234
|
+
def page(segment_id: :unset, agent_id: :unset, authorization: :unset, page_token: :unset, page_number: :unset,page_size: :unset)
|
|
236
235
|
params = Twilio::Values.of({
|
|
237
|
-
'Authorization' => authorization,
|
|
238
236
|
'SegmentId' => segment_id,
|
|
239
237
|
'AgentId' => agent_id,
|
|
240
238
|
'PageToken' => page_token,
|
|
241
239
|
'Page' => page_number,
|
|
242
240
|
'PageSize' => page_size,
|
|
243
241
|
})
|
|
244
|
-
headers = Twilio::Values.of({})
|
|
242
|
+
headers = Twilio::Values.of({ 'Authorization' => authorization, })
|
|
245
243
|
|
|
246
244
|
|
|
247
245
|
|
|
@@ -36,8 +36,8 @@ module Twilio
|
|
|
36
36
|
# Lists InsightsConversationsInstance records from the API as a list.
|
|
37
37
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
38
38
|
# memory before returning.
|
|
39
|
-
# @param [String] authorization The Authorization HTTP request header
|
|
40
39
|
# @param [String] segment_id Unique Id of the segment for which conversation details needs to be fetched
|
|
40
|
+
# @param [String] authorization The Authorization HTTP request header
|
|
41
41
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
42
42
|
# guarantees to never return more than limit. Default is no limit
|
|
43
43
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -45,10 +45,10 @@ module Twilio
|
|
|
45
45
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
46
46
|
# efficient page size, i.e. min(limit, 1000)
|
|
47
47
|
# @return [Array] Array of up to limit results
|
|
48
|
-
def list(
|
|
48
|
+
def list(segment_id: :unset, authorization: :unset, limit: nil, page_size: nil)
|
|
49
49
|
self.stream(
|
|
50
|
-
authorization: authorization,
|
|
51
50
|
segment_id: segment_id,
|
|
51
|
+
authorization: authorization,
|
|
52
52
|
limit: limit,
|
|
53
53
|
page_size: page_size
|
|
54
54
|
).entries
|
|
@@ -58,8 +58,8 @@ module Twilio
|
|
|
58
58
|
# Streams Instance records from the API as an Enumerable.
|
|
59
59
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
60
60
|
# is reached.
|
|
61
|
-
# @param [String] authorization The Authorization HTTP request header
|
|
62
61
|
# @param [String] segment_id Unique Id of the segment for which conversation details needs to be fetched
|
|
62
|
+
# @param [String] authorization The Authorization HTTP request header
|
|
63
63
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
64
64
|
# guarantees to never return more than limit. Default is no limit
|
|
65
65
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -67,12 +67,12 @@ module Twilio
|
|
|
67
67
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
68
68
|
# efficient page size, i.e. min(limit, 1000)
|
|
69
69
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
70
|
-
def stream(
|
|
70
|
+
def stream(segment_id: :unset, authorization: :unset, limit: nil, page_size: nil)
|
|
71
71
|
limits = @version.read_limits(limit, page_size)
|
|
72
72
|
|
|
73
73
|
page = self.page(
|
|
74
|
-
authorization: authorization,
|
|
75
74
|
segment_id: segment_id,
|
|
75
|
+
authorization: authorization,
|
|
76
76
|
page_size: limits[:page_size], )
|
|
77
77
|
|
|
78
78
|
return [].each if page.nil?
|
|
@@ -84,8 +84,8 @@ module Twilio
|
|
|
84
84
|
|
|
85
85
|
##
|
|
86
86
|
# Lists InsightsConversationsPageMetadata records from the API as a list.
|
|
87
|
-
# @param [String] authorization The Authorization HTTP request header
|
|
88
87
|
# @param [String] segment_id Unique Id of the segment for which conversation details needs to be fetched
|
|
88
|
+
# @param [String] authorization The Authorization HTTP request header
|
|
89
89
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
90
90
|
# guarantees to never return more than limit. Default is no limit
|
|
91
91
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -93,15 +93,14 @@ module Twilio
|
|
|
93
93
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
94
94
|
# efficient page size, i.e. min(limit, 1000)
|
|
95
95
|
# @return [Array] Array of up to limit results
|
|
96
|
-
def list_with_metadata(
|
|
96
|
+
def list_with_metadata(segment_id: :unset, authorization: :unset, limit: nil, page_size: nil)
|
|
97
97
|
limits = @version.read_limits(limit, page_size)
|
|
98
98
|
params = Twilio::Values.of({
|
|
99
|
-
'Authorization' => authorization,
|
|
100
99
|
'SegmentId' => segment_id,
|
|
101
100
|
|
|
102
101
|
'PageSize' => limits[:page_size],
|
|
103
102
|
});
|
|
104
|
-
headers = Twilio::Values.of({})
|
|
103
|
+
headers = Twilio::Values.of({ 'Authorization' => authorization, })
|
|
105
104
|
|
|
106
105
|
response = @version.page('GET', @uri, params: params, headers: headers)
|
|
107
106
|
|
|
@@ -129,21 +128,20 @@ module Twilio
|
|
|
129
128
|
##
|
|
130
129
|
# Retrieve a single page of InsightsConversationsInstance records from the API.
|
|
131
130
|
# Request is executed immediately.
|
|
132
|
-
# @param [String] authorization The Authorization HTTP request header
|
|
133
131
|
# @param [String] segment_id Unique Id of the segment for which conversation details needs to be fetched
|
|
132
|
+
# @param [String] authorization The Authorization HTTP request header
|
|
134
133
|
# @param [String] page_token PageToken provided by the API
|
|
135
134
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
136
135
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
137
136
|
# @return [Page] Page of InsightsConversationsInstance
|
|
138
|
-
def page(
|
|
137
|
+
def page(segment_id: :unset, authorization: :unset, page_token: :unset, page_number: :unset,page_size: :unset)
|
|
139
138
|
params = Twilio::Values.of({
|
|
140
|
-
'Authorization' => authorization,
|
|
141
139
|
'SegmentId' => segment_id,
|
|
142
140
|
'PageToken' => page_token,
|
|
143
141
|
'Page' => page_number,
|
|
144
142
|
'PageSize' => page_size,
|
|
145
143
|
})
|
|
146
|
-
headers = Twilio::Values.of({})
|
|
144
|
+
headers = Twilio::Values.of({ 'Authorization' => authorization, })
|
|
147
145
|
|
|
148
146
|
|
|
149
147
|
|