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,235 @@
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 Routes < Domain
12
+ class V2 < Version
13
+ class TrunkList < ListResource
14
+ ##
15
+ # Initialize the TrunkList
16
+ # @param [Version] version Version that contains the resource
17
+ # @return [TrunkList] TrunkList
18
+ def initialize(version)
19
+ super(version)
20
+
21
+ # Path Solution
22
+ @solution = {}
23
+ end
24
+
25
+ ##
26
+ # Provide a user friendly representation
27
+ def to_s
28
+ '#<Twilio.Routes.V2.TrunkList>'
29
+ end
30
+ end
31
+
32
+ class TrunkPage < Page
33
+ ##
34
+ # Initialize the TrunkPage
35
+ # @param [Version] version Version that contains the resource
36
+ # @param [Response] response Response from the API
37
+ # @param [Hash] solution Path solution for the resource
38
+ # @return [TrunkPage] TrunkPage
39
+ def initialize(version, response, solution)
40
+ super(version, response)
41
+
42
+ # Path Solution
43
+ @solution = solution
44
+ end
45
+
46
+ ##
47
+ # Build an instance of TrunkInstance
48
+ # @param [Hash] payload Payload response from the API
49
+ # @return [TrunkInstance] TrunkInstance
50
+ def get_instance(payload)
51
+ TrunkInstance.new(@version, payload, )
52
+ end
53
+
54
+ ##
55
+ # Provide a user friendly representation
56
+ def to_s
57
+ '<Twilio.Routes.V2.TrunkPage>'
58
+ end
59
+ end
60
+
61
+ class TrunkContext < InstanceContext
62
+ ##
63
+ # Initialize the TrunkContext
64
+ # @param [Version] version Version that contains the resource
65
+ # @param [String] sip_trunk_domain The absolute URL of the SIP Trunk
66
+ # @return [TrunkContext] TrunkContext
67
+ def initialize(version, sip_trunk_domain)
68
+ super(version)
69
+
70
+ # Path Solution
71
+ @solution = {sip_trunk_domain: sip_trunk_domain, }
72
+ @uri = "/Trunks/#{@solution[:sip_trunk_domain]}"
73
+ end
74
+
75
+ ##
76
+ # Update the TrunkInstance
77
+ # @param [String] voice_region The Inbound Processing Region used for this SIP
78
+ # Trunk for voice
79
+ # @param [String] friendly_name A human readable description of this resource, up
80
+ # to 64 characters.
81
+ # @return [TrunkInstance] Updated TrunkInstance
82
+ def update(voice_region: :unset, friendly_name: :unset)
83
+ data = Twilio::Values.of({'VoiceRegion' => voice_region, 'FriendlyName' => friendly_name, })
84
+
85
+ payload = @version.update('POST', @uri, data: data)
86
+
87
+ TrunkInstance.new(@version, payload, sip_trunk_domain: @solution[:sip_trunk_domain], )
88
+ end
89
+
90
+ ##
91
+ # Fetch the TrunkInstance
92
+ # @return [TrunkInstance] Fetched TrunkInstance
93
+ def fetch
94
+ payload = @version.fetch('GET', @uri)
95
+
96
+ TrunkInstance.new(@version, payload, sip_trunk_domain: @solution[:sip_trunk_domain], )
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.Routes.V2.TrunkContext #{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.Routes.V2.TrunkContext #{context}>"
111
+ end
112
+ end
113
+
114
+ class TrunkInstance < InstanceResource
115
+ ##
116
+ # Initialize the TrunkInstance
117
+ # @param [Version] version Version that contains the resource
118
+ # @param [Hash] payload payload that contains response from Twilio
119
+ # @param [String] sip_trunk_domain The absolute URL of the SIP Trunk
120
+ # @return [TrunkInstance] TrunkInstance
121
+ def initialize(version, payload, sip_trunk_domain: nil)
122
+ super(version)
123
+
124
+ # Marshaled Properties
125
+ @properties = {
126
+ 'sip_trunk_domain' => payload['sip_trunk_domain'],
127
+ 'url' => payload['url'],
128
+ 'sid' => payload['sid'],
129
+ 'account_sid' => payload['account_sid'],
130
+ 'friendly_name' => payload['friendly_name'],
131
+ 'voice_region' => payload['voice_region'],
132
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
133
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
134
+ }
135
+
136
+ # Context
137
+ @instance_context = nil
138
+ @params = {'sip_trunk_domain' => sip_trunk_domain || @properties['sip_trunk_domain'], }
139
+ end
140
+
141
+ ##
142
+ # Generate an instance context for the instance, the context is capable of
143
+ # performing various actions. All instance actions are proxied to the context
144
+ # @return [TrunkContext] TrunkContext for this TrunkInstance
145
+ def context
146
+ unless @instance_context
147
+ @instance_context = TrunkContext.new(@version, @params['sip_trunk_domain'], )
148
+ end
149
+ @instance_context
150
+ end
151
+
152
+ ##
153
+ # @return [String] The SIP Trunk
154
+ def sip_trunk_domain
155
+ @properties['sip_trunk_domain']
156
+ end
157
+
158
+ ##
159
+ # @return [String] The absolute URL of the resource
160
+ def url
161
+ @properties['url']
162
+ end
163
+
164
+ ##
165
+ # @return [String] A string that uniquely identifies the Inbound Processing Region assignments for this SIP Trunk.
166
+ def sid
167
+ @properties['sid']
168
+ end
169
+
170
+ ##
171
+ # @return [String] Account Sid.
172
+ def account_sid
173
+ @properties['account_sid']
174
+ end
175
+
176
+ ##
177
+ # @return [String] A human readable description of the Inbound Processing Region assignments for this SIP Trunk.
178
+ def friendly_name
179
+ @properties['friendly_name']
180
+ end
181
+
182
+ ##
183
+ # @return [String] The Inbound Processing Region used for this SIP Trunk for voice.
184
+ def voice_region
185
+ @properties['voice_region']
186
+ end
187
+
188
+ ##
189
+ # @return [Time] The date that this SIP Trunk was assigned an Inbound Processing Region.
190
+ def date_created
191
+ @properties['date_created']
192
+ end
193
+
194
+ ##
195
+ # @return [Time] The date that the Inbound Processing Region was updated for this SIP Trunk.
196
+ def date_updated
197
+ @properties['date_updated']
198
+ end
199
+
200
+ ##
201
+ # Update the TrunkInstance
202
+ # @param [String] voice_region The Inbound Processing Region used for this SIP
203
+ # Trunk for voice
204
+ # @param [String] friendly_name A human readable description of this resource, up
205
+ # to 64 characters.
206
+ # @return [TrunkInstance] Updated TrunkInstance
207
+ def update(voice_region: :unset, friendly_name: :unset)
208
+ context.update(voice_region: voice_region, friendly_name: friendly_name, )
209
+ end
210
+
211
+ ##
212
+ # Fetch the TrunkInstance
213
+ # @return [TrunkInstance] Fetched TrunkInstance
214
+ def fetch
215
+ context.fetch
216
+ end
217
+
218
+ ##
219
+ # Provide a user friendly representation
220
+ def to_s
221
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
222
+ "<Twilio.Routes.V2.TrunkInstance #{values}>"
223
+ end
224
+
225
+ ##
226
+ # Provide a detailed, user friendly representation
227
+ def inspect
228
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
229
+ "<Twilio.Routes.V2.TrunkInstance #{values}>"
230
+ end
231
+ end
232
+ end
233
+ end
234
+ end
235
+ end
@@ -0,0 +1,76 @@
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 Routes
12
+ class V2 < Version
13
+ ##
14
+ # Initialize the V2 version of Routes
15
+ def initialize(domain)
16
+ super
17
+ @version = 'v2'
18
+ @phone_numbers = nil
19
+ @sip_domains = nil
20
+ @trunks = nil
21
+ end
22
+
23
+ ##
24
+ # @param [String] phone_number The phone number in E.164 format
25
+ # @return [Twilio::REST::Routes::V2::PhoneNumberContext] if phone_number was passed.
26
+ # @return [Twilio::REST::Routes::V2::PhoneNumberList]
27
+ def phone_numbers(phone_number=:unset)
28
+ if phone_number.nil?
29
+ raise ArgumentError, 'phone_number cannot be nil'
30
+ end
31
+ if phone_number == :unset
32
+ @phone_numbers ||= PhoneNumberList.new self
33
+ else
34
+ PhoneNumberContext.new(self, phone_number)
35
+ end
36
+ end
37
+
38
+ ##
39
+ # @param [String] sip_domain The sip_domain
40
+ # @return [Twilio::REST::Routes::V2::SipDomainContext] if sip_domain was passed.
41
+ # @return [Twilio::REST::Routes::V2::SipDomainList]
42
+ def sip_domains(sip_domain=:unset)
43
+ if sip_domain.nil?
44
+ raise ArgumentError, 'sip_domain cannot be nil'
45
+ end
46
+ if sip_domain == :unset
47
+ @sip_domains ||= SipDomainList.new self
48
+ else
49
+ SipDomainContext.new(self, sip_domain)
50
+ end
51
+ end
52
+
53
+ ##
54
+ # @param [String] sip_trunk_domain The absolute URL of the SIP Trunk
55
+ # @return [Twilio::REST::Routes::V2::TrunkContext] if sip_trunk_domain was passed.
56
+ # @return [Twilio::REST::Routes::V2::TrunkList]
57
+ def trunks(sip_trunk_domain=:unset)
58
+ if sip_trunk_domain.nil?
59
+ raise ArgumentError, 'sip_trunk_domain cannot be nil'
60
+ end
61
+ if sip_trunk_domain == :unset
62
+ @trunks ||= TrunkList.new self
63
+ else
64
+ TrunkContext.new(self, sip_trunk_domain)
65
+ end
66
+ end
67
+
68
+ ##
69
+ # Provide a user friendly representation
70
+ def to_s
71
+ '<Twilio::REST::Routes::V2>'
72
+ end
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,62 @@
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 Routes < Domain
12
+ ##
13
+ # Initialize the Routes Domain
14
+ def initialize(twilio)
15
+ super
16
+
17
+ @base_url = 'https://routes.twilio.com'
18
+ @host = 'routes.twilio.com'
19
+ @port = 443
20
+
21
+ # Versions
22
+ @v2 = nil
23
+ end
24
+
25
+ ##
26
+ # Version v2 of routes
27
+ def v2
28
+ @v2 ||= V2.new self
29
+ end
30
+
31
+ ##
32
+ # @param [String] phone_number The phone number in E.164 format
33
+ # @return [Twilio::REST::Routes::V2::PhoneNumberInstance] if phone_number was passed.
34
+ # @return [Twilio::REST::Routes::V2::PhoneNumberList]
35
+ def phone_numbers(phone_number=:unset)
36
+ self.v2.phone_numbers(phone_number)
37
+ end
38
+
39
+ ##
40
+ # @param [String] sip_domain The sip_domain
41
+ # @return [Twilio::REST::Routes::V2::SipDomainInstance] if sip_domain was passed.
42
+ # @return [Twilio::REST::Routes::V2::SipDomainList]
43
+ def sip_domains(sip_domain=:unset)
44
+ self.v2.sip_domains(sip_domain)
45
+ end
46
+
47
+ ##
48
+ # @param [String] sip_trunk_domain The absolute URL of the SIP Trunk
49
+ # @return [Twilio::REST::Routes::V2::TrunkInstance] if sip_trunk_domain was passed.
50
+ # @return [Twilio::REST::Routes::V2::TrunkList]
51
+ def trunks(sip_trunk_domain=:unset)
52
+ self.v2.trunks(sip_trunk_domain)
53
+ end
54
+
55
+ ##
56
+ # Provide a user friendly representation
57
+ def to_s
58
+ '#<Twilio::REST::Routes>'
59
+ end
60
+ end
61
+ end
62
+ end
@@ -240,7 +240,7 @@ module Twilio
240
240
  'account_sid' => payload['account_sid'],
241
241
  'friendly_name' => payload['friendly_name'],
242
242
  'status' => payload['status'],
243
- 'version' => payload['version'].to_i,
243
+ 'version' => payload['version'] == nil ? payload['version'] : payload['version'].to_i,
244
244
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
245
245
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
246
246
  'url' => payload['url'],
@@ -202,7 +202,7 @@ module Twilio
202
202
  'friendly_name' => payload['friendly_name'],
203
203
  'definition' => payload['definition'],
204
204
  'status' => payload['status'],
205
- 'revision' => payload['revision'].to_i,
205
+ 'revision' => payload['revision'] == nil ? payload['revision'] : payload['revision'].to_i,
206
206
  'commit_message' => payload['commit_message'],
207
207
  'valid' => payload['valid'],
208
208
  'errors' => payload['errors'],
@@ -292,7 +292,7 @@ module Twilio
292
292
  'friendly_name' => payload['friendly_name'],
293
293
  'definition' => payload['definition'],
294
294
  'status' => payload['status'],
295
- 'revision' => payload['revision'].to_i,
295
+ 'revision' => payload['revision'] == nil ? payload['revision'] : payload['revision'].to_i,
296
296
  'commit_message' => payload['commit_message'],
297
297
  'valid' => payload['valid'],
298
298
  'errors' => payload['errors'],
@@ -33,12 +33,18 @@ module Twilio
33
33
  # resource changes from `reserving` to `available`.
34
34
  # @param [String] callback_method The HTTP method we should use to call
35
35
  # `callback_url`. Can be: `GET` or `POST` and the default is POST.
36
+ # @param [Boolean] generate_matching_id When set to `true`, a value for `Eid` does
37
+ # not need to be provided. Instead, when the eSIM profile is reserved, a matching
38
+ # ID will be generated and returned via the `matching_id` property. This
39
+ # identifies the specific eSIM profile that can be used by any capable device to
40
+ # claim and download the profile.
36
41
  # @param [String] eid Identifier of the eUICC that will claim the eSIM Profile.
37
42
  # @return [EsimProfileInstance] Created EsimProfileInstance
38
- def create(callback_url: :unset, callback_method: :unset, eid: :unset)
43
+ def create(callback_url: :unset, callback_method: :unset, generate_matching_id: :unset, eid: :unset)
39
44
  data = Twilio::Values.of({
40
45
  'CallbackUrl' => callback_url,
41
46
  'CallbackMethod' => callback_method,
47
+ 'GenerateMatchingId' => generate_matching_id,
42
48
  'Eid' => eid,
43
49
  })
44
50
 
@@ -250,6 +256,8 @@ module Twilio
250
256
  'status' => payload['status'],
251
257
  'eid' => payload['eid'],
252
258
  'smdp_plus_address' => payload['smdp_plus_address'],
259
+ 'matching_id' => payload['matching_id'],
260
+ 'activation_code' => payload['activation_code'],
253
261
  'error_code' => payload['error_code'],
254
262
  'error_message' => payload['error_message'],
255
263
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
@@ -315,6 +323,18 @@ module Twilio
315
323
  @properties['smdp_plus_address']
316
324
  end
317
325
 
326
+ ##
327
+ # @return [String] Unique identifier of the eSIM profile that be used to identify and download the eSIM profile
328
+ def matching_id
329
+ @properties['matching_id']
330
+ end
331
+
332
+ ##
333
+ # @return [String] Combined machine-readable activation code for acquiring an eSIM Profile with the Activation Code download method
334
+ def activation_code
335
+ @properties['activation_code']
336
+ end
337
+
318
338
  ##
319
339
  # @return [String] Code indicating the failure if the download of the SIM Profile failed and the eSIM Profile is in `failed` state
320
340
  def error_code
@@ -36,9 +36,9 @@ module Twilio
36
36
  # @param [Boolean] data_enabled Defines whether SIMs in the Fleet are capable of
37
37
  # using 2G/3G/4G/LTE/CAT-M data connectivity. Defaults to `true`.
38
38
  # @param [String] data_limit The total data usage (download and upload combined)
39
- # in Megabytes that each Sim resource assigned to the Fleet resource can consume
40
- # during a billing period (normally one month). Value must be between 1MB (1) and
41
- # 2TB (2,000,000). Defaults to 1GB (1,000).
39
+ # in Megabytes that each Super SIM assigned to the Fleet can consume during a
40
+ # billing period (normally one month). Value must be between 1MB (1) and 2TB
41
+ # (2,000,000). Defaults to 1GB (1,000).
42
42
  # @param [String] ip_commands_url The URL that will receive a webhook when a Super
43
43
  # SIM in the Fleet is used to send an IP Command from your device to a special IP
44
44
  # address. Your server should respond with an HTTP status code in the 200 range;
@@ -254,8 +254,12 @@ module Twilio
254
254
  # @param [String] sms_commands_method A string representing the HTTP method to use
255
255
  # when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
256
256
  # Defaults to `POST`.
257
+ # @param [String] data_limit The total data usage (download and upload combined)
258
+ # in Megabytes that each Super SIM assigned to the Fleet can consume during a
259
+ # billing period (normally one month). Value must be between 1MB (1) and 2TB
260
+ # (2,000,000). Defaults to 1GB (1,000).
257
261
  # @return [FleetInstance] Updated FleetInstance
258
- def update(unique_name: :unset, network_access_profile: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
262
+ def update(unique_name: :unset, network_access_profile: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset, data_limit: :unset)
259
263
  data = Twilio::Values.of({
260
264
  'UniqueName' => unique_name,
261
265
  'NetworkAccessProfile' => network_access_profile,
@@ -263,6 +267,7 @@ module Twilio
263
267
  'IpCommandsMethod' => ip_commands_method,
264
268
  'SmsCommandsUrl' => sms_commands_url,
265
269
  'SmsCommandsMethod' => sms_commands_method,
270
+ 'DataLimit' => data_limit,
266
271
  })
267
272
 
268
273
  payload = @version.update('POST', @uri, data: data)
@@ -306,7 +311,7 @@ module Twilio
306
311
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
307
312
  'url' => payload['url'],
308
313
  'data_enabled' => payload['data_enabled'],
309
- 'data_limit' => payload['data_limit'].to_i,
314
+ 'data_limit' => payload['data_limit'] == nil ? payload['data_limit'] : payload['data_limit'].to_i,
310
315
  'data_metering' => payload['data_metering'],
311
316
  'sms_commands_enabled' => payload['sms_commands_enabled'],
312
317
  'sms_commands_url' => payload['sms_commands_url'],
@@ -375,7 +380,7 @@ module Twilio
375
380
  end
376
381
 
377
382
  ##
378
- # @return [String] The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume
383
+ # @return [String] The total data usage (download and upload combined) in Megabytes that each Super SIM assigned to the Fleet can consume
379
384
  def data_limit
380
385
  @properties['data_limit']
381
386
  end
@@ -451,8 +456,12 @@ module Twilio
451
456
  # @param [String] sms_commands_method A string representing the HTTP method to use
452
457
  # when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
453
458
  # Defaults to `POST`.
459
+ # @param [String] data_limit The total data usage (download and upload combined)
460
+ # in Megabytes that each Super SIM assigned to the Fleet can consume during a
461
+ # billing period (normally one month). Value must be between 1MB (1) and 2TB
462
+ # (2,000,000). Defaults to 1GB (1,000).
454
463
  # @return [FleetInstance] Updated FleetInstance
455
- def update(unique_name: :unset, network_access_profile: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
464
+ def update(unique_name: :unset, network_access_profile: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset, data_limit: :unset)
456
465
  context.update(
457
466
  unique_name: unique_name,
458
467
  network_access_profile: network_access_profile,
@@ -460,6 +469,7 @@ module Twilio
460
469
  ip_commands_method: ip_commands_method,
461
470
  sms_commands_url: sms_commands_url,
462
471
  sms_commands_method: sms_commands_method,
472
+ data_limit: data_limit,
463
473
  )
464
474
  end
465
475
 
@@ -30,7 +30,10 @@ module Twilio
30
30
  # @param [String] sim The `sid` or `unique_name` of the {Super
31
31
  # SIM}[https://www.twilio.com/docs/iot/supersim/api/sim-resource] to send the IP
32
32
  # Command to.
33
- # @param [String] payload The payload to be delivered to the device.
33
+ # @param [String] payload The data that will be sent to the device. The payload
34
+ # cannot exceed 1300 bytes. If the PayloadType is set to text, the payload is
35
+ # encoded in UTF-8. If PayloadType is set to binary, the payload is encoded in
36
+ # Base64.
34
37
  # @param [String] device_port The device port to which the IP Command will be
35
38
  # sent.
36
39
  # @param [ip_command.PayloadType] payload_type Indicates how the payload is
@@ -287,7 +290,7 @@ module Twilio
287
290
  'status' => payload['status'],
288
291
  'direction' => payload['direction'],
289
292
  'device_ip' => payload['device_ip'],
290
- 'device_port' => payload['device_port'].to_i,
293
+ 'device_port' => payload['device_port'] == nil ? payload['device_port'] : payload['device_port'].to_i,
291
294
  'payload_type' => payload['payload_type'],
292
295
  'payload' => payload['payload'],
293
296
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),