twilio-ruby 5.67.3 → 5.74.5
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/.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
@@ -1,249 +0,0 @@
|
|
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 Preview < Domain
|
12
|
-
class BulkExports < Version
|
13
|
-
class ExportList < ListResource
|
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 JobList < ListResource
|
17
|
-
##
|
18
|
-
# Initialize the JobList
|
19
|
-
# @param [Version] version Version that contains the resource
|
20
|
-
# @return [JobList] JobList
|
21
|
-
def initialize(version)
|
22
|
-
super(version)
|
23
|
-
|
24
|
-
# Path Solution
|
25
|
-
@solution = {}
|
26
|
-
end
|
27
|
-
|
28
|
-
##
|
29
|
-
# Provide a user friendly representation
|
30
|
-
def to_s
|
31
|
-
'#<Twilio.Preview.BulkExports.JobList>'
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
##
|
36
|
-
# 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.
|
37
|
-
class JobPage < Page
|
38
|
-
##
|
39
|
-
# Initialize the JobPage
|
40
|
-
# @param [Version] version Version that contains the resource
|
41
|
-
# @param [Response] response Response from the API
|
42
|
-
# @param [Hash] solution Path solution for the resource
|
43
|
-
# @return [JobPage] JobPage
|
44
|
-
def initialize(version, response, solution)
|
45
|
-
super(version, response)
|
46
|
-
|
47
|
-
# Path Solution
|
48
|
-
@solution = solution
|
49
|
-
end
|
50
|
-
|
51
|
-
##
|
52
|
-
# Build an instance of JobInstance
|
53
|
-
# @param [Hash] payload Payload response from the API
|
54
|
-
# @return [JobInstance] JobInstance
|
55
|
-
def get_instance(payload)
|
56
|
-
JobInstance.new(@version, payload, )
|
57
|
-
end
|
58
|
-
|
59
|
-
##
|
60
|
-
# Provide a user friendly representation
|
61
|
-
def to_s
|
62
|
-
'<Twilio.Preview.BulkExports.JobPage>'
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
##
|
67
|
-
# 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.
|
68
|
-
class JobContext < InstanceContext
|
69
|
-
##
|
70
|
-
# Initialize the JobContext
|
71
|
-
# @param [Version] version Version that contains the resource
|
72
|
-
# @param [String] job_sid The unique string that that we created to identify the
|
73
|
-
# Bulk Export job
|
74
|
-
# @return [JobContext] JobContext
|
75
|
-
def initialize(version, job_sid)
|
76
|
-
super(version)
|
77
|
-
|
78
|
-
# Path Solution
|
79
|
-
@solution = {job_sid: job_sid, }
|
80
|
-
@uri = "/Exports/Jobs/#{@solution[:job_sid]}"
|
81
|
-
end
|
82
|
-
|
83
|
-
##
|
84
|
-
# Fetch the JobInstance
|
85
|
-
# @return [JobInstance] Fetched JobInstance
|
86
|
-
def fetch
|
87
|
-
payload = @version.fetch('GET', @uri)
|
88
|
-
|
89
|
-
JobInstance.new(@version, payload, job_sid: @solution[:job_sid], )
|
90
|
-
end
|
91
|
-
|
92
|
-
##
|
93
|
-
# Delete the JobInstance
|
94
|
-
# @return [Boolean] true if delete succeeds, false otherwise
|
95
|
-
def delete
|
96
|
-
@version.delete('DELETE', @uri)
|
97
|
-
end
|
98
|
-
|
99
|
-
##
|
100
|
-
# Provide a user friendly representation
|
101
|
-
def to_s
|
102
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
103
|
-
"#<Twilio.Preview.BulkExports.JobContext #{context}>"
|
104
|
-
end
|
105
|
-
|
106
|
-
##
|
107
|
-
# Provide a detailed, user friendly representation
|
108
|
-
def inspect
|
109
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
110
|
-
"#<Twilio.Preview.BulkExports.JobContext #{context}>"
|
111
|
-
end
|
112
|
-
end
|
113
|
-
|
114
|
-
##
|
115
|
-
# 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.
|
116
|
-
class JobInstance < InstanceResource
|
117
|
-
##
|
118
|
-
# Initialize the JobInstance
|
119
|
-
# @param [Version] version Version that contains the resource
|
120
|
-
# @param [Hash] payload payload that contains response from Twilio
|
121
|
-
# @param [String] job_sid The unique string that that we created to identify the
|
122
|
-
# Bulk Export job
|
123
|
-
# @return [JobInstance] JobInstance
|
124
|
-
def initialize(version, payload, job_sid: nil)
|
125
|
-
super(version)
|
126
|
-
|
127
|
-
# Marshaled Properties
|
128
|
-
@properties = {
|
129
|
-
'resource_type' => payload['resource_type'],
|
130
|
-
'friendly_name' => payload['friendly_name'],
|
131
|
-
'details' => payload['details'],
|
132
|
-
'start_day' => payload['start_day'],
|
133
|
-
'end_day' => payload['end_day'],
|
134
|
-
'job_sid' => payload['job_sid'],
|
135
|
-
'webhook_url' => payload['webhook_url'],
|
136
|
-
'webhook_method' => payload['webhook_method'],
|
137
|
-
'email' => payload['email'],
|
138
|
-
'url' => payload['url'],
|
139
|
-
}
|
140
|
-
|
141
|
-
# Context
|
142
|
-
@instance_context = nil
|
143
|
-
@params = {'job_sid' => job_sid || @properties['job_sid'], }
|
144
|
-
end
|
145
|
-
|
146
|
-
##
|
147
|
-
# Generate an instance context for the instance, the context is capable of
|
148
|
-
# performing various actions. All instance actions are proxied to the context
|
149
|
-
# @return [JobContext] JobContext for this JobInstance
|
150
|
-
def context
|
151
|
-
unless @instance_context
|
152
|
-
@instance_context = JobContext.new(@version, @params['job_sid'], )
|
153
|
-
end
|
154
|
-
@instance_context
|
155
|
-
end
|
156
|
-
|
157
|
-
##
|
158
|
-
# @return [String] The type of communication – Messages, Calls, Conferences, and Participants
|
159
|
-
def resource_type
|
160
|
-
@properties['resource_type']
|
161
|
-
end
|
162
|
-
|
163
|
-
##
|
164
|
-
# @return [String] The friendly name specified when creating the job
|
165
|
-
def friendly_name
|
166
|
-
@properties['friendly_name']
|
167
|
-
end
|
168
|
-
|
169
|
-
##
|
170
|
-
# @return [Hash] This is a list of the completed, pending, or errored dates within the export time range, with one entry for each status with more than one day in that status
|
171
|
-
def details
|
172
|
-
@properties['details']
|
173
|
-
end
|
174
|
-
|
175
|
-
##
|
176
|
-
# @return [String] The start time for the export specified when creating the job
|
177
|
-
def start_day
|
178
|
-
@properties['start_day']
|
179
|
-
end
|
180
|
-
|
181
|
-
##
|
182
|
-
# @return [String] The end time for the export specified when creating the job
|
183
|
-
def end_day
|
184
|
-
@properties['end_day']
|
185
|
-
end
|
186
|
-
|
187
|
-
##
|
188
|
-
# @return [String] The job_sid returned when the export was created
|
189
|
-
def job_sid
|
190
|
-
@properties['job_sid']
|
191
|
-
end
|
192
|
-
|
193
|
-
##
|
194
|
-
# @return [String] The optional webhook url called on completion
|
195
|
-
def webhook_url
|
196
|
-
@properties['webhook_url']
|
197
|
-
end
|
198
|
-
|
199
|
-
##
|
200
|
-
# @return [String] This is the method used to call the webhook
|
201
|
-
def webhook_method
|
202
|
-
@properties['webhook_method']
|
203
|
-
end
|
204
|
-
|
205
|
-
##
|
206
|
-
# @return [String] The optional email to send the completion notification to
|
207
|
-
def email
|
208
|
-
@properties['email']
|
209
|
-
end
|
210
|
-
|
211
|
-
##
|
212
|
-
# @return [String] The url
|
213
|
-
def url
|
214
|
-
@properties['url']
|
215
|
-
end
|
216
|
-
|
217
|
-
##
|
218
|
-
# Fetch the JobInstance
|
219
|
-
# @return [JobInstance] Fetched JobInstance
|
220
|
-
def fetch
|
221
|
-
context.fetch
|
222
|
-
end
|
223
|
-
|
224
|
-
##
|
225
|
-
# Delete the JobInstance
|
226
|
-
# @return [Boolean] true if delete succeeds, false otherwise
|
227
|
-
def delete
|
228
|
-
context.delete
|
229
|
-
end
|
230
|
-
|
231
|
-
##
|
232
|
-
# Provide a user friendly representation
|
233
|
-
def to_s
|
234
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
235
|
-
"<Twilio.Preview.BulkExports.JobInstance #{values}>"
|
236
|
-
end
|
237
|
-
|
238
|
-
##
|
239
|
-
# Provide a detailed, user friendly representation
|
240
|
-
def inspect
|
241
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
242
|
-
"<Twilio.Preview.BulkExports.JobInstance #{values}>"
|
243
|
-
end
|
244
|
-
end
|
245
|
-
end
|
246
|
-
end
|
247
|
-
end
|
248
|
-
end
|
249
|
-
end
|
@@ -1,251 +0,0 @@
|
|
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 Preview < Domain
|
12
|
-
class BulkExports < 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 ExportList < ListResource
|
16
|
-
##
|
17
|
-
# Initialize the ExportList
|
18
|
-
# @param [Version] version Version that contains the resource
|
19
|
-
# @return [ExportList] ExportList
|
20
|
-
def initialize(version)
|
21
|
-
super(version)
|
22
|
-
|
23
|
-
# Path Solution
|
24
|
-
@solution = {}
|
25
|
-
|
26
|
-
# Components
|
27
|
-
@jobs = nil
|
28
|
-
end
|
29
|
-
|
30
|
-
##
|
31
|
-
# Access the jobs
|
32
|
-
# @param [String] job_sid The unique string that that we created to identify the
|
33
|
-
# Bulk Export job
|
34
|
-
# @return [JobList]
|
35
|
-
# @return [JobContext] if job_sid was passed.
|
36
|
-
def jobs(job_sid=:unset)
|
37
|
-
raise ArgumentError, 'job_sid cannot be nil' if job_sid.nil?
|
38
|
-
|
39
|
-
if job_sid != :unset
|
40
|
-
return JobContext.new(@version, job_sid, )
|
41
|
-
end
|
42
|
-
|
43
|
-
@jobs ||= JobList.new(@version, )
|
44
|
-
end
|
45
|
-
|
46
|
-
##
|
47
|
-
# Provide a user friendly representation
|
48
|
-
def to_s
|
49
|
-
'#<Twilio.Preview.BulkExports.ExportList>'
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
##
|
54
|
-
# 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.
|
55
|
-
class ExportPage < Page
|
56
|
-
##
|
57
|
-
# Initialize the ExportPage
|
58
|
-
# @param [Version] version Version that contains the resource
|
59
|
-
# @param [Response] response Response from the API
|
60
|
-
# @param [Hash] solution Path solution for the resource
|
61
|
-
# @return [ExportPage] ExportPage
|
62
|
-
def initialize(version, response, solution)
|
63
|
-
super(version, response)
|
64
|
-
|
65
|
-
# Path Solution
|
66
|
-
@solution = solution
|
67
|
-
end
|
68
|
-
|
69
|
-
##
|
70
|
-
# Build an instance of ExportInstance
|
71
|
-
# @param [Hash] payload Payload response from the API
|
72
|
-
# @return [ExportInstance] ExportInstance
|
73
|
-
def get_instance(payload)
|
74
|
-
ExportInstance.new(@version, payload, )
|
75
|
-
end
|
76
|
-
|
77
|
-
##
|
78
|
-
# Provide a user friendly representation
|
79
|
-
def to_s
|
80
|
-
'<Twilio.Preview.BulkExports.ExportPage>'
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
##
|
85
|
-
# 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.
|
86
|
-
class ExportContext < InstanceContext
|
87
|
-
##
|
88
|
-
# Initialize the ExportContext
|
89
|
-
# @param [Version] version Version that contains the resource
|
90
|
-
# @param [String] resource_type The type of communication – Messages, Calls,
|
91
|
-
# Conferences, and Participants
|
92
|
-
# @return [ExportContext] ExportContext
|
93
|
-
def initialize(version, resource_type)
|
94
|
-
super(version)
|
95
|
-
|
96
|
-
# Path Solution
|
97
|
-
@solution = {resource_type: resource_type, }
|
98
|
-
@uri = "/Exports/#{@solution[:resource_type]}"
|
99
|
-
|
100
|
-
# Dependents
|
101
|
-
@days = nil
|
102
|
-
@export_custom_jobs = nil
|
103
|
-
end
|
104
|
-
|
105
|
-
##
|
106
|
-
# Fetch the ExportInstance
|
107
|
-
# @return [ExportInstance] Fetched ExportInstance
|
108
|
-
def fetch
|
109
|
-
payload = @version.fetch('GET', @uri)
|
110
|
-
|
111
|
-
ExportInstance.new(@version, payload, resource_type: @solution[:resource_type], )
|
112
|
-
end
|
113
|
-
|
114
|
-
##
|
115
|
-
# Access the days
|
116
|
-
# @return [DayList]
|
117
|
-
# @return [DayContext] if day was passed.
|
118
|
-
def days(day=:unset)
|
119
|
-
raise ArgumentError, 'day cannot be nil' if day.nil?
|
120
|
-
|
121
|
-
if day != :unset
|
122
|
-
return DayContext.new(@version, @solution[:resource_type], day, )
|
123
|
-
end
|
124
|
-
|
125
|
-
unless @days
|
126
|
-
@days = DayList.new(@version, resource_type: @solution[:resource_type], )
|
127
|
-
end
|
128
|
-
|
129
|
-
@days
|
130
|
-
end
|
131
|
-
|
132
|
-
##
|
133
|
-
# Access the export_custom_jobs
|
134
|
-
# @return [ExportCustomJobList]
|
135
|
-
# @return [ExportCustomJobContext]
|
136
|
-
def export_custom_jobs
|
137
|
-
unless @export_custom_jobs
|
138
|
-
@export_custom_jobs = ExportCustomJobList.new(@version, resource_type: @solution[:resource_type], )
|
139
|
-
end
|
140
|
-
|
141
|
-
@export_custom_jobs
|
142
|
-
end
|
143
|
-
|
144
|
-
##
|
145
|
-
# Provide a user friendly representation
|
146
|
-
def to_s
|
147
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
148
|
-
"#<Twilio.Preview.BulkExports.ExportContext #{context}>"
|
149
|
-
end
|
150
|
-
|
151
|
-
##
|
152
|
-
# Provide a detailed, user friendly representation
|
153
|
-
def inspect
|
154
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
155
|
-
"#<Twilio.Preview.BulkExports.ExportContext #{context}>"
|
156
|
-
end
|
157
|
-
end
|
158
|
-
|
159
|
-
##
|
160
|
-
# 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.
|
161
|
-
class ExportInstance < InstanceResource
|
162
|
-
##
|
163
|
-
# Initialize the ExportInstance
|
164
|
-
# @param [Version] version Version that contains the resource
|
165
|
-
# @param [Hash] payload payload that contains response from Twilio
|
166
|
-
# @param [String] resource_type The type of communication – Messages, Calls,
|
167
|
-
# Conferences, and Participants
|
168
|
-
# @return [ExportInstance] ExportInstance
|
169
|
-
def initialize(version, payload, resource_type: nil)
|
170
|
-
super(version)
|
171
|
-
|
172
|
-
# Marshaled Properties
|
173
|
-
@properties = {
|
174
|
-
'resource_type' => payload['resource_type'],
|
175
|
-
'url' => payload['url'],
|
176
|
-
'links' => payload['links'],
|
177
|
-
}
|
178
|
-
|
179
|
-
# Context
|
180
|
-
@instance_context = nil
|
181
|
-
@params = {'resource_type' => resource_type || @properties['resource_type'], }
|
182
|
-
end
|
183
|
-
|
184
|
-
##
|
185
|
-
# Generate an instance context for the instance, the context is capable of
|
186
|
-
# performing various actions. All instance actions are proxied to the context
|
187
|
-
# @return [ExportContext] ExportContext for this ExportInstance
|
188
|
-
def context
|
189
|
-
unless @instance_context
|
190
|
-
@instance_context = ExportContext.new(@version, @params['resource_type'], )
|
191
|
-
end
|
192
|
-
@instance_context
|
193
|
-
end
|
194
|
-
|
195
|
-
##
|
196
|
-
# @return [String] The type of communication – Messages, Calls, Conferences, and Participants
|
197
|
-
def resource_type
|
198
|
-
@properties['resource_type']
|
199
|
-
end
|
200
|
-
|
201
|
-
##
|
202
|
-
# @return [String] The URL of this resource.
|
203
|
-
def url
|
204
|
-
@properties['url']
|
205
|
-
end
|
206
|
-
|
207
|
-
##
|
208
|
-
# @return [String] Nested resource URLs.
|
209
|
-
def links
|
210
|
-
@properties['links']
|
211
|
-
end
|
212
|
-
|
213
|
-
##
|
214
|
-
# Fetch the ExportInstance
|
215
|
-
# @return [ExportInstance] Fetched ExportInstance
|
216
|
-
def fetch
|
217
|
-
context.fetch
|
218
|
-
end
|
219
|
-
|
220
|
-
##
|
221
|
-
# Access the days
|
222
|
-
# @return [days] days
|
223
|
-
def days
|
224
|
-
context.days
|
225
|
-
end
|
226
|
-
|
227
|
-
##
|
228
|
-
# Access the export_custom_jobs
|
229
|
-
# @return [export_custom_jobs] export_custom_jobs
|
230
|
-
def export_custom_jobs
|
231
|
-
context.export_custom_jobs
|
232
|
-
end
|
233
|
-
|
234
|
-
##
|
235
|
-
# Provide a user friendly representation
|
236
|
-
def to_s
|
237
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
238
|
-
"<Twilio.Preview.BulkExports.ExportInstance #{values}>"
|
239
|
-
end
|
240
|
-
|
241
|
-
##
|
242
|
-
# Provide a detailed, user friendly representation
|
243
|
-
def inspect
|
244
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
245
|
-
"<Twilio.Preview.BulkExports.ExportInstance #{values}>"
|
246
|
-
end
|
247
|
-
end
|
248
|
-
end
|
249
|
-
end
|
250
|
-
end
|
251
|
-
end
|