twilio-ruby 5.67.3 → 5.74.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/pr-lint.yml +8 -2
- data/.github/workflows/test-and-deploy.yml +3 -3
- data/CHANGES.md +288 -0
- data/LICENSE +1 -1
- data/Makefile +6 -2
- data/PULL_REQUEST_TEMPLATE.md +1 -1
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +19 -3
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +22 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -17
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +17 -1
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +2 -2
- data/lib/twilio-ruby/rest/client.rb +28 -0
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
- data/lib/twilio-ruby/rest/content/v1/content.rb +346 -0
- data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
- data/lib/twilio-ruby/rest/content/v1.rb +52 -0
- data/lib/twilio-ruby/rest/content.rb +53 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +17 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +17 -2
- data/lib/twilio-ruby/rest/events/v1/schema/version.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +397 -0
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +314 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +394 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +313 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +390 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +413 -0
- data/lib/twilio-ruby/rest/{preview/trusted_comms/brands_information.rb → flex_api/v1/insights_session.rb} +58 -55
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +144 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +130 -0
- data/lib/twilio-ruby/rest/{preview/trusted_comms/cps.rb → flex_api/v1/insights_user_roles.rb} +42 -54
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +22 -1
- data/lib/twilio-ruby/rest/flex_api/v1.rb +115 -0
- data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +133 -0
- data/lib/twilio-ruby/rest/flex_api/v2.rb +35 -0
- data/lib/twilio-ruby/rest/flex_api.rb +83 -0
- data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +322 -0
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +14 -0
- data/lib/twilio-ruby/rest/insights/v1/call.rb +16 -8
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/room.rb +3 -3
- data/lib/twilio-ruby/rest/insights/v1.rb +0 -16
- data/lib/twilio-ruby/rest/insights.rb +0 -8
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +94 -12
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -9
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +5 -5
- data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +267 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +98 -3
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +709 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +50 -0
- data/lib/twilio-ruby/rest/messaging.rb +26 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +317 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +310 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +192 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app.rb +330 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +342 -0
- data/lib/twilio-ruby/rest/{preview/bulk_exports/export/day.rb → microvisor/v1/device/device_secret.rb} +125 -84
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +393 -0
- data/lib/twilio-ruby/rest/microvisor/v1.rb +92 -0
- data/lib/twilio-ruby/rest/microvisor.rb +70 -0
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
- data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +153 -0
- data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +162 -0
- data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +242 -0
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +157 -0
- data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +193 -0
- data/lib/twilio-ruby/rest/oauth/v1.rb +63 -0
- data/lib/twilio-ruby/rest/oauth.rb +68 -0
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
- data/lib/twilio-ruby/rest/preview.rb +0 -58
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -46
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +235 -0
- data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +231 -0
- data/lib/twilio-ruby/rest/routes/v2/trunk.rb +235 -0
- data/lib/twilio-ruby/rest/routes/v2.rb +76 -0
- data/lib/twilio-ruby/rest/routes.rb +62 -0
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +21 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +17 -7
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +5 -2
- data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +247 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +195 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +20 -0
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +3 -3
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +4 -4
- data/lib/twilio-ruby/rest/supersim/v1.rb +7 -0
- data/lib/twilio-ruby/rest/supersim.rb +6 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +12 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -3
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/safelist.rb +215 -0
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +1 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +1 -7
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +14 -10
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +8 -1
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/template.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
- data/lib/twilio-ruby/rest/verify/v2.rb +18 -0
- data/lib/twilio-ruby/rest/verify.rb +8 -0
- data/lib/twilio-ruby/rest/video/v1/composition.rb +3 -3
- data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb +240 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +16 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +4 -4
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +2 -2
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
- data/lib/twilio-ruby/security/request_validator.rb +1 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +135 -35
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +52 -17
- data/lib/twilio-ruby/rest/insights/v1/annotation.rb +0 -271
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +0 -275
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +0 -249
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -251
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -234
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -62
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
@@ -0,0 +1,313 @@
|
|
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 FlexApi < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
15
|
+
class InsightsQuestionnairesCategoryList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the InsightsQuestionnairesCategoryList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [InsightsQuestionnairesCategoryList] InsightsQuestionnairesCategoryList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/Insights/QM/Categories"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Create the InsightsQuestionnairesCategoryInstance
|
30
|
+
# @param [String] name The name of this category.
|
31
|
+
# @param [String] token The Token HTTP request header
|
32
|
+
# @return [InsightsQuestionnairesCategoryInstance] Created InsightsQuestionnairesCategoryInstance
|
33
|
+
def create(name: nil, token: :unset)
|
34
|
+
data = Twilio::Values.of({'Name' => name, })
|
35
|
+
headers = Twilio::Values.of({'Token' => token, })
|
36
|
+
|
37
|
+
payload = @version.create('POST', @uri, data: data, headers: headers)
|
38
|
+
|
39
|
+
InsightsQuestionnairesCategoryInstance.new(@version, payload, )
|
40
|
+
end
|
41
|
+
|
42
|
+
##
|
43
|
+
# Lists InsightsQuestionnairesCategoryInstance records from the API as a list.
|
44
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
45
|
+
# memory before returning.
|
46
|
+
# @param [String] token The Token HTTP request header
|
47
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
48
|
+
# guarantees to never return more than limit. Default is no limit
|
49
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
50
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
51
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
52
|
+
# efficient page size, i.e. min(limit, 1000)
|
53
|
+
# @return [Array] Array of up to limit results
|
54
|
+
def list(token: :unset, limit: nil, page_size: nil)
|
55
|
+
self.stream(token: token, limit: limit, page_size: page_size).entries
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Streams InsightsQuestionnairesCategoryInstance records from the API as an Enumerable.
|
60
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
61
|
+
# is reached.
|
62
|
+
# @param [String] token The Token HTTP request header
|
63
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
64
|
+
# guarantees to never return more than limit. Default is no limit.
|
65
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
66
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
67
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
68
|
+
# efficient page size, i.e. min(limit, 1000)
|
69
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
70
|
+
def stream(token: :unset, limit: nil, page_size: nil)
|
71
|
+
limits = @version.read_limits(limit, page_size)
|
72
|
+
|
73
|
+
page = self.page(token: token, page_size: limits[:page_size], )
|
74
|
+
|
75
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
76
|
+
end
|
77
|
+
|
78
|
+
##
|
79
|
+
# When passed a block, yields InsightsQuestionnairesCategoryInstance records from the API.
|
80
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
81
|
+
# is reached.
|
82
|
+
def each
|
83
|
+
limits = @version.read_limits
|
84
|
+
|
85
|
+
page = self.page(page_size: limits[:page_size], )
|
86
|
+
|
87
|
+
@version.stream(page,
|
88
|
+
limit: limits[:limit],
|
89
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
90
|
+
end
|
91
|
+
|
92
|
+
##
|
93
|
+
# Retrieve a single page of InsightsQuestionnairesCategoryInstance records from the API.
|
94
|
+
# Request is executed immediately.
|
95
|
+
# @param [String] token The Token HTTP request header
|
96
|
+
# @param [String] page_token PageToken provided by the API
|
97
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
98
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
99
|
+
# @return [Page] Page of InsightsQuestionnairesCategoryInstance
|
100
|
+
def page(token: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
101
|
+
params = Twilio::Values.of({
|
102
|
+
'PageToken' => page_token,
|
103
|
+
'Page' => page_number,
|
104
|
+
'PageSize' => page_size,
|
105
|
+
})
|
106
|
+
headers = Twilio::Values.of({'Token' => token, })
|
107
|
+
|
108
|
+
response = @version.page('GET', @uri, params: params, headers: headers)
|
109
|
+
|
110
|
+
InsightsQuestionnairesCategoryPage.new(@version, response, @solution)
|
111
|
+
end
|
112
|
+
|
113
|
+
##
|
114
|
+
# Retrieve a single page of InsightsQuestionnairesCategoryInstance records from the API.
|
115
|
+
# Request is executed immediately.
|
116
|
+
# @param [String] target_url API-generated URL for the requested results page
|
117
|
+
# @return [Page] Page of InsightsQuestionnairesCategoryInstance
|
118
|
+
def get_page(target_url)
|
119
|
+
response = @version.domain.request(
|
120
|
+
'GET',
|
121
|
+
target_url
|
122
|
+
)
|
123
|
+
InsightsQuestionnairesCategoryPage.new(@version, response, @solution)
|
124
|
+
end
|
125
|
+
|
126
|
+
##
|
127
|
+
# Provide a user friendly representation
|
128
|
+
def to_s
|
129
|
+
'#<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryList>'
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
##
|
134
|
+
# 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.
|
135
|
+
class InsightsQuestionnairesCategoryPage < Page
|
136
|
+
##
|
137
|
+
# Initialize the InsightsQuestionnairesCategoryPage
|
138
|
+
# @param [Version] version Version that contains the resource
|
139
|
+
# @param [Response] response Response from the API
|
140
|
+
# @param [Hash] solution Path solution for the resource
|
141
|
+
# @return [InsightsQuestionnairesCategoryPage] InsightsQuestionnairesCategoryPage
|
142
|
+
def initialize(version, response, solution)
|
143
|
+
super(version, response)
|
144
|
+
|
145
|
+
# Path Solution
|
146
|
+
@solution = solution
|
147
|
+
end
|
148
|
+
|
149
|
+
##
|
150
|
+
# Build an instance of InsightsQuestionnairesCategoryInstance
|
151
|
+
# @param [Hash] payload Payload response from the API
|
152
|
+
# @return [InsightsQuestionnairesCategoryInstance] InsightsQuestionnairesCategoryInstance
|
153
|
+
def get_instance(payload)
|
154
|
+
InsightsQuestionnairesCategoryInstance.new(@version, payload, )
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# Provide a user friendly representation
|
159
|
+
def to_s
|
160
|
+
'<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryPage>'
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
##
|
165
|
+
# 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.
|
166
|
+
class InsightsQuestionnairesCategoryContext < InstanceContext
|
167
|
+
##
|
168
|
+
# Initialize the InsightsQuestionnairesCategoryContext
|
169
|
+
# @param [Version] version Version that contains the resource
|
170
|
+
# @param [String] category_id The ID of the category to be update
|
171
|
+
# @return [InsightsQuestionnairesCategoryContext] InsightsQuestionnairesCategoryContext
|
172
|
+
def initialize(version, category_id)
|
173
|
+
super(version)
|
174
|
+
|
175
|
+
# Path Solution
|
176
|
+
@solution = {category_id: category_id, }
|
177
|
+
@uri = "/Insights/QM/Categories/#{@solution[:category_id]}"
|
178
|
+
end
|
179
|
+
|
180
|
+
##
|
181
|
+
# Update the InsightsQuestionnairesCategoryInstance
|
182
|
+
# @param [String] name The name of this category.
|
183
|
+
# @param [String] token The Token HTTP request header
|
184
|
+
# @return [InsightsQuestionnairesCategoryInstance] Updated InsightsQuestionnairesCategoryInstance
|
185
|
+
def update(name: nil, token: :unset)
|
186
|
+
data = Twilio::Values.of({'Name' => name, })
|
187
|
+
headers = Twilio::Values.of({'Token' => token, })
|
188
|
+
|
189
|
+
payload = @version.update('POST', @uri, data: data, headers: headers)
|
190
|
+
|
191
|
+
InsightsQuestionnairesCategoryInstance.new(@version, payload, category_id: @solution[:category_id], )
|
192
|
+
end
|
193
|
+
|
194
|
+
##
|
195
|
+
# Delete the InsightsQuestionnairesCategoryInstance
|
196
|
+
# @param [String] token The Token HTTP request header
|
197
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
198
|
+
def delete(token: :unset)
|
199
|
+
headers = Twilio::Values.of({'Token' => token, })
|
200
|
+
|
201
|
+
@version.delete('DELETE', @uri, headers: headers)
|
202
|
+
end
|
203
|
+
|
204
|
+
##
|
205
|
+
# Provide a user friendly representation
|
206
|
+
def to_s
|
207
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
208
|
+
"#<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryContext #{context}>"
|
209
|
+
end
|
210
|
+
|
211
|
+
##
|
212
|
+
# Provide a detailed, user friendly representation
|
213
|
+
def inspect
|
214
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
215
|
+
"#<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryContext #{context}>"
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
##
|
220
|
+
# 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.
|
221
|
+
class InsightsQuestionnairesCategoryInstance < InstanceResource
|
222
|
+
##
|
223
|
+
# Initialize the InsightsQuestionnairesCategoryInstance
|
224
|
+
# @param [Version] version Version that contains the resource
|
225
|
+
# @param [Hash] payload payload that contains response from Twilio
|
226
|
+
# @param [String] category_id The ID of the category to be update
|
227
|
+
# @return [InsightsQuestionnairesCategoryInstance] InsightsQuestionnairesCategoryInstance
|
228
|
+
def initialize(version, payload, category_id: nil)
|
229
|
+
super(version)
|
230
|
+
|
231
|
+
# Marshaled Properties
|
232
|
+
@properties = {
|
233
|
+
'account_sid' => payload['account_sid'],
|
234
|
+
'category_id' => payload['category_id'],
|
235
|
+
'name' => payload['name'],
|
236
|
+
'url' => payload['url'],
|
237
|
+
}
|
238
|
+
|
239
|
+
# Context
|
240
|
+
@instance_context = nil
|
241
|
+
@params = {'category_id' => category_id || @properties['category_id'], }
|
242
|
+
end
|
243
|
+
|
244
|
+
##
|
245
|
+
# Generate an instance context for the instance, the context is capable of
|
246
|
+
# performing various actions. All instance actions are proxied to the context
|
247
|
+
# @return [InsightsQuestionnairesCategoryContext] InsightsQuestionnairesCategoryContext for this InsightsQuestionnairesCategoryInstance
|
248
|
+
def context
|
249
|
+
unless @instance_context
|
250
|
+
@instance_context = InsightsQuestionnairesCategoryContext.new(@version, @params['category_id'], )
|
251
|
+
end
|
252
|
+
@instance_context
|
253
|
+
end
|
254
|
+
|
255
|
+
##
|
256
|
+
# @return [String] The SID of the Account that created the resource and owns this Flex Insights
|
257
|
+
def account_sid
|
258
|
+
@properties['account_sid']
|
259
|
+
end
|
260
|
+
|
261
|
+
##
|
262
|
+
# @return [String] Unique category ID
|
263
|
+
def category_id
|
264
|
+
@properties['category_id']
|
265
|
+
end
|
266
|
+
|
267
|
+
##
|
268
|
+
# @return [String] The category name.
|
269
|
+
def name
|
270
|
+
@properties['name']
|
271
|
+
end
|
272
|
+
|
273
|
+
##
|
274
|
+
# @return [String] The url
|
275
|
+
def url
|
276
|
+
@properties['url']
|
277
|
+
end
|
278
|
+
|
279
|
+
##
|
280
|
+
# Update the InsightsQuestionnairesCategoryInstance
|
281
|
+
# @param [String] name The name of this category.
|
282
|
+
# @param [String] token The Token HTTP request header
|
283
|
+
# @return [InsightsQuestionnairesCategoryInstance] Updated InsightsQuestionnairesCategoryInstance
|
284
|
+
def update(name: nil, token: :unset)
|
285
|
+
context.update(name: name, token: token, )
|
286
|
+
end
|
287
|
+
|
288
|
+
##
|
289
|
+
# Delete the InsightsQuestionnairesCategoryInstance
|
290
|
+
# @param [String] token The Token HTTP request header
|
291
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
292
|
+
def delete(token: :unset)
|
293
|
+
context.delete(token: token, )
|
294
|
+
end
|
295
|
+
|
296
|
+
##
|
297
|
+
# Provide a user friendly representation
|
298
|
+
def to_s
|
299
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
300
|
+
"<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryInstance #{values}>"
|
301
|
+
end
|
302
|
+
|
303
|
+
##
|
304
|
+
# Provide a detailed, user friendly representation
|
305
|
+
def inspect
|
306
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
307
|
+
"<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryInstance #{values}>"
|
308
|
+
end
|
309
|
+
end
|
310
|
+
end
|
311
|
+
end
|
312
|
+
end
|
313
|
+
end
|