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.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/pr-lint.yml +8 -2
  3. data/.github/workflows/test-and-deploy.yml +3 -3
  4. data/CHANGES.md +288 -0
  5. data/LICENSE +1 -1
  6. data/Makefile +6 -2
  7. data/PULL_REQUEST_TEMPLATE.md +1 -1
  8. data/README.md +2 -2
  9. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +19 -3
  10. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +22 -3
  11. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -2
  12. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +2 -2
  13. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -2
  14. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +2 -2
  15. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +2 -2
  16. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -2
  17. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +2 -2
  18. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +1 -1
  19. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
  20. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -2
  21. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
  22. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
  23. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
  24. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -17
  25. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
  26. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +5 -5
  27. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +17 -1
  28. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
  29. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
  30. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
  31. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
  32. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +5 -5
  33. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +3 -3
  34. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
  35. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
  36. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
  37. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
  38. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
  39. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
  40. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
  41. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
  42. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
  43. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
  44. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +2 -2
  45. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
  46. data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
  47. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
  48. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
  49. data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
  50. data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
  51. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +2 -2
  52. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
  53. data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -4
  54. data/lib/twilio-ruby/rest/chat/v3/channel.rb +2 -2
  55. data/lib/twilio-ruby/rest/client.rb +28 -0
  56. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
  57. data/lib/twilio-ruby/rest/content/v1/content.rb +346 -0
  58. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
  59. data/lib/twilio-ruby/rest/content/v1.rb +52 -0
  60. data/lib/twilio-ruby/rest/content.rb +53 -0
  61. data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
  62. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +17 -2
  63. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +1 -1
  64. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +17 -2
  65. data/lib/twilio-ruby/rest/events/v1/schema/version.rb +1 -1
  66. data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -1
  67. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +1 -1
  68. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +397 -0
  69. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
  70. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +314 -0
  71. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +394 -0
  72. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +313 -0
  73. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +390 -0
  74. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +413 -0
  75. data/lib/twilio-ruby/rest/{preview/trusted_comms/brands_information.rb → flex_api/v1/insights_session.rb} +58 -55
  76. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +144 -0
  77. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +130 -0
  78. data/lib/twilio-ruby/rest/{preview/trusted_comms/cps.rb → flex_api/v1/insights_user_roles.rb} +42 -54
  79. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +22 -1
  80. data/lib/twilio-ruby/rest/flex_api/v1.rb +115 -0
  81. data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +133 -0
  82. data/lib/twilio-ruby/rest/flex_api/v2.rb +35 -0
  83. data/lib/twilio-ruby/rest/flex_api.rb +83 -0
  84. data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +322 -0
  85. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +14 -0
  86. data/lib/twilio-ruby/rest/insights/v1/call.rb +16 -8
  87. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
  88. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
  89. data/lib/twilio-ruby/rest/insights/v1/room.rb +3 -3
  90. data/lib/twilio-ruby/rest/insights/v1.rb +0 -16
  91. data/lib/twilio-ruby/rest/insights.rb +0 -8
  92. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
  93. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
  94. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
  95. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
  96. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
  97. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +2 -2
  98. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
  99. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -4
  100. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +94 -12
  101. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
  102. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -9
  103. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +5 -5
  104. data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
  105. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +267 -0
  106. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +2 -2
  107. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +98 -3
  108. data/lib/twilio-ruby/rest/messaging/v1/service.rb +1 -1
  109. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +709 -0
  110. data/lib/twilio-ruby/rest/messaging/v1.rb +50 -0
  111. data/lib/twilio-ruby/rest/messaging.rb +26 -0
  112. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +317 -0
  113. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +310 -0
  114. data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +192 -0
  115. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +330 -0
  116. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +342 -0
  117. data/lib/twilio-ruby/rest/{preview/bulk_exports/export/day.rb → microvisor/v1/device/device_secret.rb} +125 -84
  118. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +393 -0
  119. data/lib/twilio-ruby/rest/microvisor/v1.rb +92 -0
  120. data/lib/twilio-ruby/rest/microvisor.rb +70 -0
  121. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
  122. data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +153 -0
  123. data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +162 -0
  124. data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +242 -0
  125. data/lib/twilio-ruby/rest/oauth/v1/token.rb +157 -0
  126. data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +193 -0
  127. data/lib/twilio-ruby/rest/oauth/v1.rb +63 -0
  128. data/lib/twilio-ruby/rest/oauth.rb +68 -0
  129. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
  130. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
  131. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
  132. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +2 -2
  133. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
  134. data/lib/twilio-ruby/rest/preview.rb +0 -58
  135. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
  136. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
  137. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -46
  138. data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
  139. data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +235 -0
  140. data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +231 -0
  141. data/lib/twilio-ruby/rest/routes/v2/trunk.rb +235 -0
  142. data/lib/twilio-ruby/rest/routes/v2.rb +76 -0
  143. data/lib/twilio-ruby/rest/routes.rb +62 -0
  144. data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
  145. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
  146. data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
  147. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +21 -1
  148. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +17 -7
  149. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +5 -2
  150. data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +247 -0
  151. data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +195 -0
  152. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +20 -0
  153. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +3 -3
  154. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +4 -4
  155. data/lib/twilio-ruby/rest/supersim/v1.rb +7 -0
  156. data/lib/twilio-ruby/rest/supersim.rb +6 -0
  157. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
  158. data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
  159. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
  160. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
  161. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
  162. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +12 -12
  163. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -5
  164. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -4
  165. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +3 -3
  166. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
  167. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
  168. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
  169. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +13 -13
  170. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +2 -2
  171. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
  172. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +13 -13
  173. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -3
  174. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
  175. data/lib/twilio-ruby/rest/verify/v2/safelist.rb +215 -0
  176. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +1 -9
  177. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +1 -7
  178. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +0 -8
  179. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -8
  180. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -6
  181. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +0 -8
  182. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
  183. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +14 -10
  184. data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +8 -1
  185. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
  186. data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
  187. data/lib/twilio-ruby/rest/verify/v2/template.rb +7 -0
  188. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
  189. data/lib/twilio-ruby/rest/verify/v2.rb +18 -0
  190. data/lib/twilio-ruby/rest/verify.rb +8 -0
  191. data/lib/twilio-ruby/rest/video/v1/composition.rb +3 -3
  192. data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
  193. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
  194. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb +240 -0
  195. data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +16 -0
  196. data/lib/twilio-ruby/rest/video/v1/room.rb +4 -4
  197. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +2 -2
  198. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +1 -1
  199. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
  200. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
  201. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
  202. data/lib/twilio-ruby/security/request_validator.rb +1 -1
  203. data/lib/twilio-ruby/twiml/voice_response.rb +135 -35
  204. data/lib/twilio-ruby/version.rb +1 -1
  205. data/twilio-ruby.gemspec +1 -1
  206. metadata +52 -17
  207. data/lib/twilio-ruby/rest/insights/v1/annotation.rb +0 -271
  208. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +0 -275
  209. data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +0 -249
  210. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -251
  211. data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -234
  212. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -62
  213. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
  214. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
  215. data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
  216. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
@@ -0,0 +1,215 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class Verify < Domain
12
+ class V2 < Version
13
+ ##
14
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
15
+ class SafelistList < ListResource
16
+ ##
17
+ # Initialize the SafelistList
18
+ # @param [Version] version Version that contains the resource
19
+ # @return [SafelistList] SafelistList
20
+ def initialize(version)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {}
25
+ @uri = "/SafeList/Numbers"
26
+ end
27
+
28
+ ##
29
+ # Create the SafelistInstance
30
+ # @param [String] phone_number The phone number to be added in SafeList. Phone
31
+ # numbers must be in {E.164
32
+ # format}[https://www.twilio.com/docs/glossary/what-e164].
33
+ # @return [SafelistInstance] Created SafelistInstance
34
+ def create(phone_number: nil)
35
+ data = Twilio::Values.of({'PhoneNumber' => phone_number, })
36
+
37
+ payload = @version.create('POST', @uri, data: data)
38
+
39
+ SafelistInstance.new(@version, payload, )
40
+ end
41
+
42
+ ##
43
+ # Provide a user friendly representation
44
+ def to_s
45
+ '#<Twilio.Verify.V2.SafelistList>'
46
+ end
47
+ end
48
+
49
+ ##
50
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
51
+ class SafelistPage < Page
52
+ ##
53
+ # Initialize the SafelistPage
54
+ # @param [Version] version Version that contains the resource
55
+ # @param [Response] response Response from the API
56
+ # @param [Hash] solution Path solution for the resource
57
+ # @return [SafelistPage] SafelistPage
58
+ def initialize(version, response, solution)
59
+ super(version, response)
60
+
61
+ # Path Solution
62
+ @solution = solution
63
+ end
64
+
65
+ ##
66
+ # Build an instance of SafelistInstance
67
+ # @param [Hash] payload Payload response from the API
68
+ # @return [SafelistInstance] SafelistInstance
69
+ def get_instance(payload)
70
+ SafelistInstance.new(@version, payload, )
71
+ end
72
+
73
+ ##
74
+ # Provide a user friendly representation
75
+ def to_s
76
+ '<Twilio.Verify.V2.SafelistPage>'
77
+ end
78
+ end
79
+
80
+ ##
81
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
82
+ class SafelistContext < InstanceContext
83
+ ##
84
+ # Initialize the SafelistContext
85
+ # @param [Version] version Version that contains the resource
86
+ # @param [String] phone_number The phone number to be fetched from SafeList. Phone
87
+ # numbers must be in {E.164
88
+ # format}[https://www.twilio.com/docs/glossary/what-e164].
89
+ # @return [SafelistContext] SafelistContext
90
+ def initialize(version, phone_number)
91
+ super(version)
92
+
93
+ # Path Solution
94
+ @solution = {phone_number: phone_number, }
95
+ @uri = "/SafeList/Numbers/#{@solution[:phone_number]}"
96
+ end
97
+
98
+ ##
99
+ # Fetch the SafelistInstance
100
+ # @return [SafelistInstance] Fetched SafelistInstance
101
+ def fetch
102
+ payload = @version.fetch('GET', @uri)
103
+
104
+ SafelistInstance.new(@version, payload, phone_number: @solution[:phone_number], )
105
+ end
106
+
107
+ ##
108
+ # Delete the SafelistInstance
109
+ # @return [Boolean] true if delete succeeds, false otherwise
110
+ def delete
111
+ @version.delete('DELETE', @uri)
112
+ end
113
+
114
+ ##
115
+ # Provide a user friendly representation
116
+ def to_s
117
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
118
+ "#<Twilio.Verify.V2.SafelistContext #{context}>"
119
+ end
120
+
121
+ ##
122
+ # Provide a detailed, user friendly representation
123
+ def inspect
124
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
125
+ "#<Twilio.Verify.V2.SafelistContext #{context}>"
126
+ end
127
+ end
128
+
129
+ ##
130
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
131
+ class SafelistInstance < InstanceResource
132
+ ##
133
+ # Initialize the SafelistInstance
134
+ # @param [Version] version Version that contains the resource
135
+ # @param [Hash] payload payload that contains response from Twilio
136
+ # @param [String] phone_number The phone number to be fetched from SafeList. Phone
137
+ # numbers must be in {E.164
138
+ # format}[https://www.twilio.com/docs/glossary/what-e164].
139
+ # @return [SafelistInstance] SafelistInstance
140
+ def initialize(version, payload, phone_number: nil)
141
+ super(version)
142
+
143
+ # Marshaled Properties
144
+ @properties = {
145
+ 'sid' => payload['sid'],
146
+ 'phone_number' => payload['phone_number'],
147
+ 'url' => payload['url'],
148
+ }
149
+
150
+ # Context
151
+ @instance_context = nil
152
+ @params = {'phone_number' => phone_number || @properties['phone_number'], }
153
+ end
154
+
155
+ ##
156
+ # Generate an instance context for the instance, the context is capable of
157
+ # performing various actions. All instance actions are proxied to the context
158
+ # @return [SafelistContext] SafelistContext for this SafelistInstance
159
+ def context
160
+ unless @instance_context
161
+ @instance_context = SafelistContext.new(@version, @params['phone_number'], )
162
+ end
163
+ @instance_context
164
+ end
165
+
166
+ ##
167
+ # @return [String] The unique string that identifies the resource.
168
+ def sid
169
+ @properties['sid']
170
+ end
171
+
172
+ ##
173
+ # @return [String] The phone number in SafeList.
174
+ def phone_number
175
+ @properties['phone_number']
176
+ end
177
+
178
+ ##
179
+ # @return [String] The absolute URL of the SafeList resource.
180
+ def url
181
+ @properties['url']
182
+ end
183
+
184
+ ##
185
+ # Fetch the SafelistInstance
186
+ # @return [SafelistInstance] Fetched SafelistInstance
187
+ def fetch
188
+ context.fetch
189
+ end
190
+
191
+ ##
192
+ # Delete the SafelistInstance
193
+ # @return [Boolean] true if delete succeeds, false otherwise
194
+ def delete
195
+ context.delete
196
+ end
197
+
198
+ ##
199
+ # Provide a user friendly representation
200
+ def to_s
201
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
202
+ "<Twilio.Verify.V2.SafelistInstance #{values}>"
203
+ end
204
+
205
+ ##
206
+ # Provide a detailed, user friendly representation
207
+ def inspect
208
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
209
+ "<Twilio.Verify.V2.SafelistInstance #{values}>"
210
+ end
211
+ end
212
+ end
213
+ end
214
+ end
215
+ end
@@ -11,8 +11,6 @@ module Twilio
11
11
  class Verify < Domain
12
12
  class V2 < Version
13
13
  class ServiceContext < InstanceContext
14
- ##
15
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
14
  class AccessTokenList < ListResource
17
15
  ##
18
16
  # Initialize the AccessTokenList
@@ -59,8 +57,6 @@ module Twilio
59
57
  end
60
58
  end
61
59
 
62
- ##
63
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
64
60
  class AccessTokenPage < Page
65
61
  ##
66
62
  # Initialize the AccessTokenPage
@@ -90,8 +86,6 @@ module Twilio
90
86
  end
91
87
  end
92
88
 
93
- ##
94
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
95
89
  class AccessTokenContext < InstanceContext
96
90
  ##
97
91
  # Initialize the AccessTokenContext
@@ -137,8 +131,6 @@ module Twilio
137
131
  end
138
132
  end
139
133
 
140
- ##
141
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
142
134
  class AccessTokenInstance < InstanceResource
143
135
  ##
144
136
  # Initialize the AccessTokenInstance
@@ -161,7 +153,7 @@ module Twilio
161
153
  'factor_friendly_name' => payload['factor_friendly_name'],
162
154
  'token' => payload['token'],
163
155
  'url' => payload['url'],
164
- 'ttl' => payload['ttl'].to_i,
156
+ 'ttl' => payload['ttl'] == nil ? payload['ttl'] : payload['ttl'].to_i,
165
157
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
166
158
  }
167
159
 
@@ -13,8 +13,6 @@ module Twilio
13
13
  class ServiceContext < InstanceContext
14
14
  class EntityContext < InstanceContext
15
15
  class ChallengeContext < InstanceContext
16
- ##
17
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
18
16
  class NotificationList < ListResource
19
17
  ##
20
18
  # Initialize the NotificationList
@@ -62,8 +60,6 @@ module Twilio
62
60
  end
63
61
  end
64
62
 
65
- ##
66
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
67
63
  class NotificationPage < Page
68
64
  ##
69
65
  # Initialize the NotificationPage
@@ -99,8 +95,6 @@ module Twilio
99
95
  end
100
96
  end
101
97
 
102
- ##
103
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
104
98
  class NotificationInstance < InstanceResource
105
99
  ##
106
100
  # Initialize the NotificationInstance
@@ -125,7 +119,7 @@ module Twilio
125
119
  'identity' => payload['identity'],
126
120
  'challenge_sid' => payload['challenge_sid'],
127
121
  'priority' => payload['priority'],
128
- 'ttl' => payload['ttl'].to_i,
122
+ 'ttl' => payload['ttl'] == nil ? payload['ttl'] : payload['ttl'].to_i,
129
123
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
130
124
  }
131
125
  end
@@ -12,8 +12,6 @@ module Twilio
12
12
  class V2 < Version
13
13
  class ServiceContext < InstanceContext
14
14
  class EntityContext < InstanceContext
15
- ##
16
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
17
15
  class ChallengeList < ListResource
18
16
  ##
19
17
  # Initialize the ChallengeList
@@ -195,8 +193,6 @@ module Twilio
195
193
  end
196
194
  end
197
195
 
198
- ##
199
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
200
196
  class ChallengePage < Page
201
197
  ##
202
198
  # Initialize the ChallengePage
@@ -231,8 +227,6 @@ module Twilio
231
227
  end
232
228
  end
233
229
 
234
- ##
235
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
236
230
  class ChallengeContext < InstanceContext
237
231
  ##
238
232
  # Initialize the ChallengeContext
@@ -331,8 +325,6 @@ module Twilio
331
325
  end
332
326
  end
333
327
 
334
- ##
335
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
336
328
  class ChallengeInstance < InstanceResource
337
329
  ##
338
330
  # Initialize the ChallengeInstance
@@ -12,8 +12,6 @@ module Twilio
12
12
  class V2 < Version
13
13
  class ServiceContext < InstanceContext
14
14
  class EntityContext < InstanceContext
15
- ##
16
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
17
15
  class FactorList < ListResource
18
16
  ##
19
17
  # Initialize the FactorList
@@ -119,8 +117,6 @@ module Twilio
119
117
  end
120
118
  end
121
119
 
122
- ##
123
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
124
120
  class FactorPage < Page
125
121
  ##
126
122
  # Initialize the FactorPage
@@ -155,8 +151,6 @@ module Twilio
155
151
  end
156
152
  end
157
153
 
158
- ##
159
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
160
154
  class FactorContext < InstanceContext
161
155
  ##
162
156
  # Initialize the FactorContext
@@ -263,8 +257,6 @@ module Twilio
263
257
  end
264
258
  end
265
259
 
266
- ##
267
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
268
260
  class FactorInstance < InstanceResource
269
261
  ##
270
262
  # Initialize the FactorInstance
@@ -12,8 +12,6 @@ module Twilio
12
12
  class V2 < Version
13
13
  class ServiceContext < InstanceContext
14
14
  class EntityContext < InstanceContext
15
- ##
16
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
17
15
  class NewFactorList < ListResource
18
16
  ##
19
17
  # Initialize the NewFactorList
@@ -134,8 +132,6 @@ module Twilio
134
132
  end
135
133
  end
136
134
 
137
- ##
138
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
139
135
  class NewFactorPage < Page
140
136
  ##
141
137
  # Initialize the NewFactorPage
@@ -170,8 +166,6 @@ module Twilio
170
166
  end
171
167
  end
172
168
 
173
- ##
174
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
175
169
  class NewFactorInstance < InstanceResource
176
170
  ##
177
171
  # Initialize the NewFactorInstance
@@ -11,8 +11,6 @@ module Twilio
11
11
  class Verify < Domain
12
12
  class V2 < Version
13
13
  class ServiceContext < InstanceContext
14
- ##
15
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
14
  class EntityList < ListResource
17
15
  ##
18
16
  # Initialize the EntityList
@@ -129,8 +127,6 @@ module Twilio
129
127
  end
130
128
  end
131
129
 
132
- ##
133
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
134
130
  class EntityPage < Page
135
131
  ##
136
132
  # Initialize the EntityPage
@@ -160,8 +156,6 @@ module Twilio
160
156
  end
161
157
  end
162
158
 
163
- ##
164
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
165
159
  class EntityContext < InstanceContext
166
160
  ##
167
161
  # Initialize the EntityContext
@@ -281,8 +275,6 @@ module Twilio
281
275
  end
282
276
  end
283
277
 
284
- ##
285
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
286
278
  class EntityInstance < InstanceResource
287
279
  ##
288
280
  # Initialize the EntityInstance
@@ -267,8 +267,8 @@ module Twilio
267
267
  'rate_limit_sid' => payload['rate_limit_sid'],
268
268
  'service_sid' => payload['service_sid'],
269
269
  'account_sid' => payload['account_sid'],
270
- 'max' => payload['max'].to_i,
271
- 'interval' => payload['interval'].to_i,
270
+ 'max' => payload['max'] == nil ? payload['max'] : payload['max'].to_i,
271
+ 'interval' => payload['interval'] == nil ? payload['interval'] : payload['interval'].to_i,
272
272
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
273
273
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
274
274
  'url' => payload['url'],
@@ -32,9 +32,9 @@ module Twilio
32
32
  # @param [String] to The phone number or
33
33
  # {email}[https://www.twilio.com/docs/verify/email] to verify. Phone numbers must
34
34
  # be in {E.164 format}[https://www.twilio.com/docs/glossary/what-e164].
35
- # @param [String] channel The verification method to use. Can be:
36
- # {`email`}[https://www.twilio.com/docs/verify/email], `sms`, `whatsapp` or
37
- # `call`.
35
+ # @param [String] channel The verification method to use. One of:
36
+ # {`email`}[https://www.twilio.com/docs/verify/email], `sms`, `whatsapp`, `call`,
37
+ # `sna` or `auto`.
38
38
  # @param [String] custom_friendly_name A custom user defined friendly name that
39
39
  # overwrites the existing one in the verification message
40
40
  # @param [String] custom_message The text of a custom message to use for the
@@ -43,11 +43,12 @@ module Twilio
43
43
  # for example, to dial an extension. For more information, see the Programmable
44
44
  # Voice documentation of
45
45
  # {sendDigits}[https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits].
46
- # @param [String] locale The locale to use for the verification SMS, WhatsApp or
47
- # call. Can be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-GB`, `es`,
48
- # `fi`, `fr`, `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`,
49
- # `pl`, `pt`, `pr-BR`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or
50
- # `zh-HK.`
46
+ # @param [String] locale Locale will automatically resolve based on phone number
47
+ # country code for SMS, WhatsApp, and call channel verifications. It will fallback
48
+ # to English or the template’s default translation if the selected translation is
49
+ # not available. This parameter will override the automatic locale resolution.
50
+ # {See supported languages and more information
51
+ # here}[https://www.twilio.com/docs/verify/supported-languages].
51
52
  # @param [String] custom_code A pre-generated code to use for verification. The
52
53
  # code can be between 4 and 10 characters, inclusive.
53
54
  # @param [String] amount The amount of the associated PSD2 compliant transaction.
@@ -69,12 +70,14 @@ module Twilio
69
70
  # Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`.
70
71
  # @param [String] template_sid The message
71
72
  # {template}[https://www.twilio.com/docs/verify/api/templates]. If provided, will
72
- # override the default template for the Service. SMS channel only.
73
+ # override the default template for the Service. SMS and Voice channels only.
73
74
  # @param [String] template_custom_substitutions A stringified JSON object in which
74
75
  # the keys are the template's special variables and the values are the variables
75
76
  # substitutions.
77
+ # @param [String] device_ip The IP address of the client's device. If provided, it
78
+ # has to be a valid IPv4 or IPv6 address.
76
79
  # @return [VerificationInstance] Created VerificationInstance
77
- def create(to: nil, channel: nil, custom_friendly_name: :unset, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset, rate_limits: :unset, channel_configuration: :unset, app_hash: :unset, template_sid: :unset, template_custom_substitutions: :unset)
80
+ def create(to: nil, channel: nil, custom_friendly_name: :unset, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset, rate_limits: :unset, channel_configuration: :unset, app_hash: :unset, template_sid: :unset, template_custom_substitutions: :unset, device_ip: :unset)
78
81
  data = Twilio::Values.of({
79
82
  'To' => to,
80
83
  'Channel' => channel,
@@ -90,6 +93,7 @@ module Twilio
90
93
  'AppHash' => app_hash,
91
94
  'TemplateSid' => template_sid,
92
95
  'TemplateCustomSubstitutions' => template_custom_substitutions,
96
+ 'DeviceIp' => device_ip,
93
97
  })
94
98
 
95
99
  payload = @version.create('POST', @uri, data: data)
@@ -42,7 +42,7 @@ module Twilio
42
42
  # @param [String] payee The payee of the associated PSD2 compliant transaction.
43
43
  # Requires the PSD2 Service flag enabled.
44
44
  # @return [VerificationCheckInstance] Created VerificationCheckInstance
45
- def create(code: nil, to: :unset, verification_sid: :unset, amount: :unset, payee: :unset)
45
+ def create(code: :unset, to: :unset, verification_sid: :unset, amount: :unset, payee: :unset)
46
46
  data = Twilio::Values.of({
47
47
  'Code' => code,
48
48
  'To' => to,
@@ -117,6 +117,7 @@ module Twilio
117
117
  'payee' => payload['payee'],
118
118
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
119
119
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
120
+ 'sna_attempts_error_codes' => payload['sna_attempts_error_codes'],
120
121
  }
121
122
  end
122
123
 
@@ -186,6 +187,12 @@ module Twilio
186
187
  @properties['date_updated']
187
188
  end
188
189
 
190
+ ##
191
+ # @return [Array[Hash]] List of error codes as a result of attempting a verification using the `sna` channel.
192
+ def sna_attempts_error_codes
193
+ @properties['sna_attempts_error_codes']
194
+ end
195
+
189
196
  ##
190
197
  # Provide a user friendly representation
191
198
  def to_s
@@ -11,8 +11,6 @@ module Twilio
11
11
  class Verify < Domain
12
12
  class V2 < Version
13
13
  class ServiceContext < InstanceContext
14
- ##
15
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
14
  class WebhookList < ListResource
17
15
  ##
18
16
  # Initialize the WebhookList
@@ -142,8 +140,6 @@ module Twilio
142
140
  end
143
141
  end
144
142
 
145
- ##
146
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
147
143
  class WebhookPage < Page
148
144
  ##
149
145
  # Initialize the WebhookPage
@@ -173,8 +169,6 @@ module Twilio
173
169
  end
174
170
  end
175
171
 
176
- ##
177
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
178
172
  class WebhookContext < InstanceContext
179
173
  ##
180
174
  # Initialize the WebhookContext
@@ -250,8 +244,6 @@ module Twilio
250
244
  end
251
245
  end
252
246
 
253
- ##
254
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
255
247
  class WebhookInstance < InstanceResource
256
248
  ##
257
249
  # Initialize the WebhookInstance
@@ -491,7 +491,7 @@ module Twilio
491
491
  'sid' => payload['sid'],
492
492
  'account_sid' => payload['account_sid'],
493
493
  'friendly_name' => payload['friendly_name'],
494
- 'code_length' => payload['code_length'].to_i,
494
+ 'code_length' => payload['code_length'] == nil ? payload['code_length'] : payload['code_length'].to_i,
495
495
  'lookup_enabled' => payload['lookup_enabled'],
496
496
  'psd2_enabled' => payload['psd2_enabled'],
497
497
  'skip_sms_to_landlines' => payload['skip_sms_to_landlines'],
@@ -160,6 +160,7 @@ module Twilio
160
160
  'sid' => payload['sid'],
161
161
  'account_sid' => payload['account_sid'],
162
162
  'friendly_name' => payload['friendly_name'],
163
+ 'channels' => payload['channels'],
163
164
  'translations' => payload['translations'],
164
165
  }
165
166
  end
@@ -182,6 +183,12 @@ module Twilio
182
183
  @properties['friendly_name']
183
184
  end
184
185
 
186
+ ##
187
+ # @return [Array[String]] A list of channels that support the Template
188
+ def channels
189
+ @properties['channels']
190
+ end
191
+
185
192
  ##
186
193
  # @return [Hash] Object with the template translations.
187
194
  def translations
@@ -131,10 +131,10 @@ module Twilio
131
131
 
132
132
  # Marshaled Properties
133
133
  @properties = {
134
- 'total_attempts' => payload['total_attempts'].to_i,
135
- 'total_converted' => payload['total_converted'].to_i,
136
- 'total_unconverted' => payload['total_unconverted'].to_i,
137
- 'conversion_rate_percentage' => payload['conversion_rate_percentage'].to_f,
134
+ 'total_attempts' => payload['total_attempts'] == nil ? payload['total_attempts'] : payload['total_attempts'].to_i,
135
+ 'total_converted' => payload['total_converted'] == nil ? payload['total_converted'] : payload['total_converted'].to_i,
136
+ 'total_unconverted' => payload['total_unconverted'] == nil ? payload['total_unconverted'] : payload['total_unconverted'].to_i,
137
+ 'conversion_rate_percentage' => payload['conversion_rate_percentage'] == nil ? payload['conversion_rate_percentage'] : payload['conversion_rate_percentage'].to_f,
138
138
  'url' => payload['url'],
139
139
  }
140
140
 
@@ -16,6 +16,7 @@ module Twilio
16
16
  super
17
17
  @version = 'v2'
18
18
  @forms = nil
19
+ @safelist = nil
19
20
  @services = nil
20
21
  @verification_attempts = nil
21
22
  @verification_attempts_summary = nil
@@ -38,6 +39,23 @@ module Twilio
38
39
  end
39
40
  end
40
41
 
42
+ ##
43
+ # @param [String] phone_number The phone number to be fetched from SafeList. Phone
44
+ # numbers must be in {E.164
45
+ # format}[https://www.twilio.com/docs/glossary/what-e164].
46
+ # @return [Twilio::REST::Verify::V2::SafelistContext] if phone_number was passed.
47
+ # @return [Twilio::REST::Verify::V2::SafelistList]
48
+ def safelist(phone_number=:unset)
49
+ if phone_number.nil?
50
+ raise ArgumentError, 'phone_number cannot be nil'
51
+ end
52
+ if phone_number == :unset
53
+ @safelist ||= SafelistList.new self
54
+ else
55
+ SafelistContext.new(self, phone_number)
56
+ end
57
+ end
58
+
41
59
  ##
42
60
  # @param [String] sid The Twilio-provided string that uniquely identifies the
43
61
  # Verification Service resource to fetch.
@@ -37,6 +37,14 @@ module Twilio
37
37
  self.v2.forms(form_type)
38
38
  end
39
39
 
40
+ ##
41
+ # @param [String] phone_number The phone number in SafeList.
42
+ # @return [Twilio::REST::Verify::V2::SafelistInstance] if phone_number was passed.
43
+ # @return [Twilio::REST::Verify::V2::SafelistList]
44
+ def safelist(phone_number=:unset)
45
+ self.v2.safelist(phone_number)
46
+ end
47
+
40
48
  ##
41
49
  # @param [String] sid The unique string that we created to identify the Service
42
50
  # resource.