twilio-ruby 5.72.0 → 5.77.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) 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 +234 -0
  5. data/CONTRIBUTING.md +1 -7
  6. data/LICENSE +1 -1
  7. data/README.md +132 -45
  8. data/advanced-examples/custom-http-client.md +170 -0
  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 +6 -6
  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 +1 -1
  33. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
  34. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
  35. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
  36. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
  37. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
  38. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
  39. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
  40. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
  41. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
  42. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
  43. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +2 -2
  44. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
  45. data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
  46. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
  47. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
  48. data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
  49. data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
  50. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +2 -2
  51. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
  52. data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -4
  53. data/lib/twilio-ruby/rest/chat/v3/channel.rb +2 -2
  54. data/lib/twilio-ruby/rest/client.rb +14 -0
  55. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
  56. data/lib/twilio-ruby/rest/content/v1/content.rb +346 -0
  57. data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +240 -0
  58. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
  59. data/lib/twilio-ruby/rest/content/v1.rb +59 -0
  60. data/lib/twilio-ruby/rest/content.rb +59 -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/conversation.rb +43 -5
  64. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +1 -1
  65. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +17 -2
  66. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +43 -5
  67. data/lib/twilio-ruby/rest/events/v1/schema/version.rb +1 -1
  68. data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -1
  69. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +1 -1
  70. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +397 -0
  71. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +314 -0
  72. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +216 -0
  73. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +394 -0
  74. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +313 -0
  75. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +390 -0
  76. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +413 -0
  77. data/lib/twilio-ruby/rest/{preview/trusted_comms/brands_information.rb → flex_api/v1/insights_session.rb} +58 -55
  78. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +144 -0
  79. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +130 -0
  80. data/lib/twilio-ruby/rest/{preview/trusted_comms/cps.rb → flex_api/v1/insights_user_roles.rb} +42 -54
  81. data/lib/twilio-ruby/rest/flex_api/v1.rb +122 -0
  82. data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +133 -0
  83. data/lib/twilio-ruby/rest/flex_api/v2.rb +35 -0
  84. data/lib/twilio-ruby/rest/flex_api.rb +89 -0
  85. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
  86. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +16 -3
  87. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
  88. data/lib/twilio-ruby/rest/insights/v1/room.rb +3 -3
  89. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
  90. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
  91. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
  92. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
  93. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
  94. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +2 -2
  95. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
  96. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -4
  97. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +88 -6
  98. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
  99. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -2
  100. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +1 -1
  101. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +134 -0
  102. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +26 -3
  103. data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
  104. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +242 -0
  105. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +226 -0
  106. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +218 -0
  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 +165 -1
  110. data/lib/twilio-ruby/rest/messaging/v1.rb +75 -0
  111. data/lib/twilio-ruby/rest/messaging.rb +36 -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 +25 -0
  116. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +342 -0
  117. data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +335 -0
  118. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +61 -0
  119. data/lib/twilio-ruby/rest/microvisor/v1.rb +32 -0
  120. data/lib/twilio-ruby/rest/microvisor.rb +16 -0
  121. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
  122. data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +111 -0
  123. data/lib/twilio-ruby/rest/numbers/v1.rb +35 -0
  124. data/lib/twilio-ruby/rest/numbers.rb +13 -0
  125. data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +153 -0
  126. data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +162 -0
  127. data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +242 -0
  128. data/lib/twilio-ruby/rest/oauth/v1/token.rb +157 -0
  129. data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +193 -0
  130. data/lib/twilio-ruby/rest/oauth/v1.rb +63 -0
  131. data/lib/twilio-ruby/rest/oauth.rb +68 -0
  132. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
  133. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
  134. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
  135. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +2 -2
  136. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
  137. data/lib/twilio-ruby/rest/preview.rb +0 -33
  138. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
  139. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
  140. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -46
  141. data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
  142. data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
  143. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
  144. data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
  145. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +21 -1
  146. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +1 -1
  147. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +5 -2
  148. data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +247 -0
  149. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +3 -3
  150. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +4 -4
  151. data/lib/twilio-ruby/rest/supersim/v1.rb +7 -0
  152. data/lib/twilio-ruby/rest/supersim.rb +6 -0
  153. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
  154. data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
  155. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
  156. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
  157. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
  158. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +12 -12
  159. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -5
  160. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -4
  161. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +3 -3
  162. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
  163. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
  164. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
  165. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +13 -13
  166. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +2 -2
  167. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
  168. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +13 -13
  169. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -3
  170. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
  171. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +1 -9
  172. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +1 -7
  173. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +0 -8
  174. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -8
  175. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -6
  176. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +0 -8
  177. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
  178. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +12 -6
  179. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
  180. data/lib/twilio-ruby/rest/verify/v2/service.rb +4 -4
  181. data/lib/twilio-ruby/rest/verify/v2/template.rb +10 -3
  182. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
  183. data/lib/twilio-ruby/rest/video/v1/composition.rb +3 -3
  184. data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
  185. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
  186. data/lib/twilio-ruby/rest/video/v1/room.rb +4 -4
  187. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +2 -2
  188. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +1 -1
  189. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
  190. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
  191. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
  192. data/lib/twilio-ruby/twiml/voice_response.rb +132 -33
  193. data/lib/twilio-ruby/version.rb +1 -1
  194. data/twilio-ruby.gemspec +1 -1
  195. metadata +48 -12
  196. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
  197. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
  198. data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
  199. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f39c64decfb1c150e5fd70c820f4355efb4517ec
4
- data.tar.gz: cf1c9cd3f5c7b5974f05db919c3e03b155037e81
3
+ metadata.gz: 9a318c2179298abd4418a2ce946ffa89d3d14a1a
4
+ data.tar.gz: 95898f51182dca1ab44a774ae83108cb494f010c
5
5
  SHA512:
6
- metadata.gz: a451b15d66f86d78688b38fe8de87d9a6783a0dbdf6fe2e7aa98952193d90035b87401cb61ae099be49af3d476eb2c4395681e49300f7bfc33cc949c23540c27
7
- data.tar.gz: 17cb4efb42d41d2a5ffc741c508037d574c3a98a3761d45f5e58f3b4f8e1db954398815edbc8b680fd059e5567c9c8ac5c18994f5b387e8f7c06a70e5401a09a
6
+ metadata.gz: 22146fa2f467d8f02f2100c1358ced77ec7cbe8b0d9078a9748bd5baae30f25e1f47c0b20f4412cec3d95ac07375adfa2846f66036085c4b0ca6905c853fb80d
7
+ data.tar.gz: fc56f4af9f61277c749d4f6df039493ed6dfdd821f3b3eed01e63201b00501243c22556388128d386924e3ab7c9131f81476cbcba4ac1af773374ced104d37e4
@@ -8,8 +8,14 @@ jobs:
8
8
  name: Validate title
9
9
  runs-on: ubuntu-latest
10
10
  steps:
11
- - uses: amannn/action-semantic-pull-request@v4
11
+ - uses: amannn/action-semantic-pull-request@v5
12
12
  with:
13
- types: chore docs fix feat test misc
13
+ types: |
14
+ chore
15
+ docs
16
+ fix
17
+ feat
18
+ misc
19
+ test
14
20
  env:
15
21
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -20,7 +20,7 @@ jobs:
20
20
  ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', 'ruby-head', 'jruby-9.2' ]
21
21
  steps:
22
22
  - name: Checkout twilio-ruby
23
- uses: actions/checkout@v2
23
+ uses: actions/checkout@v3
24
24
  with:
25
25
  fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
26
26
 
@@ -65,7 +65,7 @@ jobs:
65
65
  runs-on: ubuntu-latest
66
66
  steps:
67
67
  - name: Checkout twilio-ruby
68
- uses: actions/checkout@v2
68
+ uses: actions/checkout@v3
69
69
  with:
70
70
  fetch-depth: 0
71
71
 
@@ -78,7 +78,7 @@ jobs:
78
78
  - run: bundle install
79
79
 
80
80
  - name: Login to Docker Hub
81
- uses: docker/login-action@v1
81
+ uses: docker/login-action@v2
82
82
  with:
83
83
  username: ${{ secrets.DOCKER_USERNAME }}
84
84
  password: ${{ secrets.DOCKER_AUTH_TOKEN }}
data/CHANGES.md CHANGED
@@ -1,6 +1,240 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2023-04-19] Version 5.77.0
5
+ ---------------------------
6
+ **Library - Docs**
7
+ - [PR #645](https://github.com/twilio/twilio-ruby/pull/645): consolidate. Thanks to [@stern-shawn](https://github.com/stern-shawn)!
8
+
9
+ **Messaging**
10
+ - Remove `messaging_service_sids` and `messaging_service_sid_action` from domain config endpoint **(breaking change)**
11
+ - Add error_code and rejection_reason properties to tollfree verification API response
12
+
13
+ **Numbers**
14
+ - Added the new Eligibility API under version `/v1`.
15
+
16
+
17
+ [2023-04-05] Version 5.76.0
18
+ ---------------------------
19
+ **Conversations**
20
+ - Expose query parameters `start_date`, `end_date` and `state` in list operation on Conversations resource for sorting and filtering
21
+
22
+ **Insights**
23
+ - Added answered by filter in Call Summaries
24
+
25
+ **Lookups**
26
+ - Remove `disposable_phone_number_risk` package **(breaking change)**
27
+
28
+ **Messaging**
29
+ - Add support for `SOLE_PROPRIETOR` brand type and `SOLE_PROPRIETOR` campaign use case.
30
+ - New Sole Proprietor Brands should be created with `SOLE_PROPRIETOR` brand type. Brand registration requests with `STARTER` brand type will be rejected.
31
+ - New Sole Proprietor Campaigns should be created with `SOLE_PROPRIETOR` campaign use case. Campaign registration requests with `STARTER` campaign use case will be rejected.
32
+ - Add Brand Registrations OTP API
33
+
34
+
35
+ [2023-03-22] Version 5.75.0
36
+ ---------------------------
37
+ **Library - Chore**
38
+ - [PR #630](https://github.com/twilio/twilio-ruby/pull/630): Accommodate jwt's minor and patch updates. Thanks to [@sato11](https://github.com/sato11)!
39
+
40
+ **Api**
41
+ - Revert Corrected the data type for `friendly_name` in Available Phone Number Local, Mobile and TollFree resources
42
+ - Corrected the data type for `friendly_name` in Available Phone Number Local, Mobile and TollFree resources **(breaking change)**
43
+
44
+ **Messaging**
45
+ - Add `linkshortening_messaging_service` resource
46
+ - Add new endpoint for GetDomainConfigByMessagingServiceSid
47
+ - Remove `validated` parameter and add `cert_in_validation` parameter to Link Shortening API **(breaking change)**
48
+
49
+
50
+ [2023-03-09] Version 5.74.5
51
+ ---------------------------
52
+ **Api**
53
+ - Add new categories for whatsapp template
54
+
55
+ **Lookups**
56
+ - Remove `validation_results` from the `default_output_properties`
57
+
58
+ **Supersim**
59
+ - Add ESimProfile's `matching_id` and `activation_code` parameters to libraries
60
+
61
+
62
+ [2023-02-22] Version 5.74.4
63
+ ---------------------------
64
+ **Api**
65
+ - Remove `scheduled_for` property from message resource
66
+ - Add `scheduled_for` property to message resource
67
+
68
+
69
+ [2023-02-08] Version 5.74.3
70
+ ---------------------------
71
+ **Lookups**
72
+ - Add `disposable_phone_number_risk` package to the lookup response
73
+ - Add `sms_pumping_risk` package to the lookup response
74
+
75
+
76
+ [2023-01-25] Version 5.74.2
77
+ ---------------------------
78
+ **Api**
79
+ - Add `public_application_connect_enabled` param to Application resource
80
+
81
+ **Messaging**
82
+ - Add new tollfree verification API property (ExternalReferenceId)]
83
+
84
+ **Verify**
85
+ - Add `device_ip` parameter and channel `auto` for sna/sms orchestration
86
+
87
+ **Twiml**
88
+ - Add support for `<Application>` noun and `<ApplicationSid>` noun, nested `<Parameter>` to `<Hangup>` and `<Leave>` verb
89
+
90
+
91
+ [2023-01-11] Version 5.74.1
92
+ ---------------------------
93
+ **Library - Chore**
94
+ - [PR #626](https://github.com/twilio/twilio-ruby/pull/626): Bump jwt version max version to 2.6. Thanks to [@MarcPer](https://github.com/MarcPer)!
95
+
96
+ **Conversations**
97
+ - Add support for creating Multi-Channel Rich Content Messages
98
+
99
+ **Lookups**
100
+ - Changed the no data message for match postal code from `no_data` to `data_not_available` in identity match package
101
+
102
+ **Messaging**
103
+ - Add update/edit tollfree verification API
104
+
105
+
106
+ [2022-12-14] Version 5.74.0
107
+ ---------------------------
108
+ **Api**
109
+ - Add `street_secondary` param to address create and update
110
+ - Make `method` optional for user defined message subscription **(breaking change)**
111
+
112
+ **Flex**
113
+ - Flex Conversations is now Generally Available
114
+ - Adding the ie1 mapping for authorization api, updating service base uri and base url response attribute **(breaking change)**
115
+ - Change web channels to GA and library visibility to public
116
+ - Changing the uri for authorization api from using Accounts to Insights **(breaking change)**
117
+
118
+ **Media**
119
+ - Gate Twilio Live endpoints behind beta_feature for EOS
120
+
121
+ **Messaging**
122
+ - Mark `MessageFlow` as a required field for Campaign Creation **(breaking change)**
123
+
124
+ **Oauth**
125
+ - updated openid discovery endpoint uri **(breaking change)**
126
+ - Added device code authorization endpoint
127
+
128
+ **Supersim**
129
+ - Allow filtering the SettingsUpdates resource by `status`
130
+
131
+ **Twiml**
132
+ - Add new Polly Neural voices
133
+ - Add tr-TR, ar-AE, yue-CN, fi-FI languages to SSML `<lang>` element.
134
+ - Add x-amazon-jyutping, x-amazon-pinyin, x-amazon-pron-kana, x-amazon-yomigana alphabets to SSML `<phoneme>` element.
135
+ - Rename `character` value for SSML `<say-as>` `interpret-as` attribute to `characters`. **(breaking change)**
136
+ - Rename `role` attribute to `format` in SSML `<say-as>` element. **(breaking change)**
137
+
138
+
139
+ [2022-11-30] Version 5.73.4
140
+ ---------------------------
141
+ **Flex**
142
+ - Adding new `assessments` api in version `v1`
143
+
144
+ **Lookups**
145
+ - Add `identity_match` package to the lookup response
146
+
147
+ **Messaging**
148
+ - Added `validated` parameter to Link Shortening API
149
+
150
+ **Serverless**
151
+ - Add node16 as a valid Build runtime
152
+ - Add ie1 and au1 as supported regions for all endpoints.
153
+
154
+
155
+ [2022-11-16] Version 5.73.3
156
+ ---------------------------
157
+ **Library - Chore**
158
+ - [PR #621](https://github.com/twilio/twilio-ruby/pull/621): upgrade GitHub Actions dependencies. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
159
+
160
+ **Api**
161
+ - Set the Content resource to have public visibility as Preview
162
+
163
+ **Flex**
164
+ - Adding new parameter `base_url` to 'gooddata' response in version `v1`
165
+
166
+ **Insights**
167
+ - Added `answered_by` field in List Call Summary
168
+ - Added `answered_by` field in call summary
169
+
170
+
171
+ [2022-11-10] Version 5.73.2
172
+ ---------------------------
173
+ **Flex**
174
+ - Adding two new authorization API 'user_roles' and 'gooddata' in version `v1`
175
+
176
+ **Messaging**
177
+ - Add new Campaign properties (MessageFlow, OptInMessage, OptInKeywords, OptOutMessage, OptOutKeywords, HelpMessage, HelpKeywords)
178
+
179
+ **Twiml**
180
+ - Add new speech models to `Gather`.
181
+
182
+
183
+ [2022-10-31] Version 5.73.1
184
+ ---------------------------
185
+ **Api**
186
+ - Added `contentSid` and `contentVariables` to Message resource with public visibility as Beta
187
+ - Add `UserDefinedMessageSubscription` and `UserDefinedMessage` resource
188
+
189
+ **Proxy**
190
+ - Remove FailOnParticipantConflict param from Proxy Session create and update and Proxy Participant create
191
+
192
+ **Supersim**
193
+ - Update SettingsUpdates resource to remove PackageSid
194
+
195
+ **Taskrouter**
196
+ - Add `Ordering` query parameter to Workers and TaskQueues for sorting by
197
+ - Add `worker_sid` query param for list reservations endpoint
198
+
199
+ **Twiml**
200
+ - Add `url` and `method` attributes to `<Conversation>`
201
+
202
+
203
+ [2022-10-19] Version 5.73.0
204
+ ---------------------------
205
+ **Library - Feature**
206
+ - [PR #619](https://github.com/twilio/twilio-ruby/pull/619): check numeric properties for nil before converting. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
207
+
208
+ **Api**
209
+ - Make link shortening parameters public **(breaking change)**
210
+
211
+ **Oauth**
212
+ - added oauth JWKS endpoint
213
+ - Get userinfo resource
214
+ - OpenID discovery resource
215
+ - Add new API for token endpoint
216
+
217
+ **Supersim**
218
+ - Add SettingsUpdates resource
219
+
220
+ **Verify**
221
+ - Update Verify Push endpoints to `ga` maturity
222
+ - Verify BYOT add Channels property to the Get Templates response
223
+
224
+ **Twiml**
225
+ - Add `requireMatchingInputs` attribute and `input-matching-failed` errorType to `<Prompt>`
226
+
227
+
228
+ [2022-10-05] Version 5.72.1
229
+ ---------------------------
230
+ **Api**
231
+ - Added `virtual-agent` to `usage_record` API.
232
+ - Add AMD attributes to participant create request
233
+
234
+ **Twiml**
235
+ - Add AMD attributes to `Number` and `Sip`
236
+
237
+
4
238
  [2022-09-07] Version 5.72.0
5
239
  ---------------------------
6
240
  **Flex**
data/CONTRIBUTING.md CHANGED
@@ -21,7 +21,7 @@ it can be.
21
21
  ## <a name="question"></a> Got an API/Product Question or Problem?
22
22
 
23
23
  If you have questions about how to use `twilio-ruby`, please see our
24
- [docs][docs-link], and if you don't find the answer there, please contact
24
+ [docs](./README.md), and if you don't find the answer there, please contact
25
25
  [help@twilio.com](mailto:help@twilio.com) with any issues you have.
26
26
 
27
27
  ## <a name="issue"></a> Found an Issue?
@@ -68,10 +68,6 @@ you're working on.
68
68
  For large fixes, please build and test the documentation before submitting the
69
69
  PR to be sure you haven't accidentally introduced layout or formatting issues.
70
70
 
71
- If you want to help improve the docs at
72
- [https://www.twilio.com/docs/libraries/ruby][docs-link], please contact
73
- [help@twilio.com](mailto:help@twilio.com).
74
-
75
71
  ## <a name="submit"></a> Submission Guidelines
76
72
 
77
73
  ### Submitting an Issue
@@ -155,7 +151,5 @@ you are working:
155
151
  * All features or bug fixes **must be tested** by one or more tests.
156
152
  * All classes and methods **must be documented**.
157
153
 
158
-
159
- [docs-link]: https://www.twilio.com/docs/libraries/ruby
160
154
  [issue-link]: https://github.com/twilio/twilio-ruby/issues/new
161
155
  [github]: https://github.com/twilio/twilio-ruby
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (C) 2021, Twilio, Inc. <help@twilio.com>
3
+ Copyright (C) 2023, Twilio, Inc. <help@twilio.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
data/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  The documentation for the Twilio API can be found [here][apidocs].
10
10
 
11
- The Ruby library documentation can be found [here][libdocs] and individual releases [here][refdocs].
11
+ The individual releases [here][refdocs].
12
12
 
13
13
  ## Versions
14
14
 
@@ -18,12 +18,12 @@ The Ruby library documentation can be found [here][libdocs] and individual relea
18
18
 
19
19
  This library supports the following Ruby implementations:
20
20
 
21
- * Ruby 2.4
22
- * Ruby 2.5
23
- * Ruby 2.6
24
- * Ruby 2.7
25
- * Ruby 3.0
26
- * Ruby 3.1
21
+ - Ruby 2.4
22
+ - Ruby 2.5
23
+ - Ruby 2.6
24
+ - Ruby 2.7
25
+ - Ruby 3.0
26
+ - Ruby 3.1
27
27
 
28
28
  ### Migrating from 4.x
29
29
 
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
34
34
  To install using [Bundler][bundler] grab the latest stable version:
35
35
 
36
36
  ```ruby
37
- gem 'twilio-ruby', '~> 5.72.0'
37
+ gem 'twilio-ruby', '~> 5.77.0'
38
38
  ```
39
39
 
40
40
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
41
41
 
42
42
  ```bash
43
- gem install twilio-ruby -v 5.72.0
43
+ gem install twilio-ruby -v 5.77.0
44
44
  ```
45
45
 
46
46
  To build and install the development branch yourself from the latest source:
@@ -51,18 +51,47 @@ cd twilio-ruby
51
51
  make install
52
52
  ```
53
53
 
54
- ## Getting Started
54
+ > **Info**
55
+ > If the command line gives you an error message that says Permission Denied, try running the above commands with sudo.
56
+ >
57
+ > For example: `sudo gem install twilio-ruby`
55
58
 
56
- ### Setup Work
59
+ ### Test your installation
60
+
61
+ To make sure the installation was successful, try sending yourself an SMS message, like this:
62
+
63
+ ```rb
64
+ require "twilio-ruby"
65
+
66
+ # Your Account SID and Auth Token from console.twilio.com
67
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
68
+ auth_token = "your_auth_token"
69
+
70
+ @client = Twilio::REST::Client.new account_sid, auth_token
71
+ message = @client.messages.create(
72
+ body: "Hello from Ruby",
73
+ to: "+12345678901", # Text this number
74
+ from: "+15005550006", # From a valid Twilio number
75
+ )
76
+
77
+ puts message.sid
78
+ ```
79
+
80
+ > **Warning**
81
+ > It's okay to hardcode your credentials when testing locally, but you should use environment variables to keep them secret before committing any code or deploying to production. Check out [How to Set Environment Variables](https://www.twilio.com/blog/2017/01/how-to-set-environment-variables.html) for more information.
82
+
83
+ ## Usage
84
+
85
+ ### Authenticate the Client
57
86
 
58
87
  ```ruby
59
88
  require 'twilio-ruby'
60
89
 
61
- # put your own credentials here
90
+ # Your Account SID and Auth Token from console.twilio.com
62
91
  account_sid = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
63
92
  auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'
64
93
 
65
- # set up a client to talk to the Twilio REST API
94
+ # Initialize the Twilio Client with your credentials
66
95
  @client = Twilio::REST::Client.new account_sid, auth_token
67
96
  ```
68
97
 
@@ -71,8 +100,9 @@ auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'
71
100
  ```ruby
72
101
  require 'twilio-ruby'
73
102
 
74
- # put your own credentials here
103
+ # Your Account SID from console.twilio.com
75
104
  account_sid = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
105
+ # API Key from twilio.com/console/project/api-keys
76
106
  api_key_sid = 'zzzzzzzzzzzzzzzzzzzzzz'
77
107
  api_key_secret = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'
78
108
 
@@ -97,22 +127,6 @@ To take advantage of Twilio's [Global Infrastructure](https://www.twilio.com/doc
97
127
 
98
128
  This will result in the `hostname` transforming from `api.twilio.com` to `api.sydney.au1.twilio.com`.
99
129
 
100
- ### Enable Debug logging
101
-
102
- In order to enable debug logging, pass in a 'logger' instance to the client with the level set to at least 'DEBUG'
103
-
104
- ```ruby
105
- @client = Twilio::REST::Client.new account_sid, auth_token
106
- myLogger = Logger.new(STDOUT)
107
- myLogger.level = Logger::DEBUG
108
- @client.logger = myLogger
109
-
110
- @client = Twilio::REST::Client.new account_sid, auth_token
111
- myLogger = Logger.new('my_log.log')
112
- myLogger.level = Logger::DEBUG
113
- @client.logger = myLogger
114
- ```
115
-
116
130
  ### Make a Call
117
131
 
118
132
  ```ruby
@@ -147,27 +161,59 @@ message_sid = 'SMxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
147
161
  @client.messages(message_sid).fetch
148
162
  ```
149
163
 
150
- ### Customizing your HTTP Client
164
+ ### Iterate through records
151
165
 
152
- `twilio-ruby` uses [Faraday][faraday] to make HTTP requests. You can tell `Twilio::REST::Client` to use any of the Faraday adapters like so:
166
+ The library automatically handles paging for you. Collections, such as `calls` and `messages`, have `list` and stream methods that page under the hood. With both `list` and `stream`, you can specify the number of records you want to receive (`limit`) and the maximum size you want each page fetch to be (`page_size`). The library will then handle the task for you.
153
167
 
154
- ```ruby
155
- @client.http_client.adapter = :typhoeus
168
+ `list` eagerly fetches all records and returns them as a list, whereas `stream` returns an enumerator and lazily retrieves pages of records as you iterate over the collection. You can also page manually using the `page` method.
169
+
170
+ For more information about these methods, view the [auto-generated library docs](https://www.twilio.com/docs/libraries/reference/twilio-ruby).
171
+
172
+ ```rb
173
+ require 'twilio-ruby'
174
+
175
+ account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
176
+ auth_token = 'your_auth_token'
177
+
178
+ @client = Twilio::REST::Client.new(account_sid, auth_token)
179
+
180
+ @client.calls.list
181
+ .each do |call|
182
+ puts call.direction
183
+ end
156
184
  ```
157
185
 
158
- To use a custom HTTP client with this helper library, please see the [Twilio documentation](https://www.twilio.com/docs/libraries/ruby/custom-http-clients).
186
+ ### Enable Debug logging
159
187
 
160
- To apply customizations such as middleware, you can use the `configure_connection` method like so:
188
+ In order to enable debug logging, pass in a 'logger' instance to the client with the level set to at least 'DEBUG'
161
189
 
162
190
  ```ruby
163
- @client.http_client.configure_connection do |faraday|
164
- faraday.use SomeMiddleware
165
- end
191
+ @client = Twilio::REST::Client.new account_sid, auth_token
192
+ myLogger = Logger.new(STDOUT)
193
+ myLogger.level = Logger::DEBUG
194
+ @client.logger = myLogger
195
+
196
+ @client = Twilio::REST::Client.new account_sid, auth_token
197
+ myLogger = Logger.new('my_log.log')
198
+ myLogger.level = Logger::DEBUG
199
+ @client.logger = myLogger
166
200
  ```
167
201
 
168
- ### Handling Errors
202
+ ### Handle Exceptions {#exceptions}
203
+
204
+ If the Twilio API returns a 400 or a 500 level HTTP response, the `twilio-ruby`
205
+ library will throw a `Twilio::REST::RestError`. 400-level errors are normal
206
+ during API operation (`“Invalid number”`, `“Cannot deliver SMS to that number”`,
207
+ for example) and should be handled appropriately.
208
+
209
+ ```rb
210
+ require 'twilio-ruby'
211
+
212
+ account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
213
+ auth_token = 'your_auth_token'
214
+
215
+ @client = Twilio::REST::Client.new account_sid, auth_token
169
216
 
170
- ```ruby
171
217
  begin
172
218
  messages = @client.messages.list(limit: 20)
173
219
  rescue Twilio::REST::RestError => e
@@ -175,9 +221,51 @@ rescue Twilio::REST::RestError => e
175
221
  end
176
222
  ```
177
223
 
178
- For more descriptive exception types, please see the [Twilio documentation](https://www.twilio.com/docs/libraries/ruby/usage-guide#error-handling).
224
+ ### Debug API requests
225
+
226
+ To assist with debugging, the library allows you to access the underlying request and response objects. This capability is built into the default HTTP client that ships with the library.
227
+
228
+ For example, you can retrieve the status code of the last response like so:
229
+
230
+ ```ruby
231
+ require 'rubygems' # Not necessary with ruby 1.9 but included for completeness
232
+ require 'twilio-ruby'
233
+
234
+ # Your Account SID and Auth Token from console.twilio.com
235
+ account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
236
+ auth_token = 'your_auth_token'
237
+
238
+ @client = Twilio::REST::Client.new(account_sid, auth_token)
239
+
240
+ @message = @client.messages.create(
241
+ to: '+14158675309',
242
+ from: '+14258675310',
243
+ body: 'Ahoy!'
244
+ )
245
+
246
+ # Retrieve the status code of the last response from the HTTP client
247
+ puts @client.http_client.last_response.status_code
248
+ ```
249
+
250
+ ### Customize your HTTP Client
251
+
252
+ `twilio-ruby` uses [Faraday][faraday] to make HTTP requests. You can tell `Twilio::REST::Client` to use any of the Faraday adapters like so:
253
+
254
+ ```ruby
255
+ @client.http_client.adapter = :typhoeus
256
+ ```
257
+
258
+ To use a custom HTTP client with this helper library, please see the [advanced example of how to do so](./advanced-examples/custom-http-client.md).
259
+
260
+ To apply customizations such as middleware, you can use the `configure_connection` method like so:
261
+
262
+ ```ruby
263
+ @client.http_client.configure_connection do |faraday|
264
+ faraday.use SomeMiddleware
265
+ end
266
+ ```
179
267
 
180
- ### Getting Started With Client Capability Tokens
268
+ ### Get started With Client Capability Tokens
181
269
 
182
270
  If you just need to generate a Capability Token for use with Twilio Client, you can do this:
183
271
 
@@ -205,7 +293,7 @@ capability.add_scope(incoming_scope)
205
293
 
206
294
  There is a slightly more detailed document in the [Capability][capability] section of the wiki.
207
295
 
208
- ### Generating TwiML
296
+ ### Generate TwiML
209
297
 
210
298
  To control phone calls, your application needs to output [TwiML][twiml].
211
299
 
@@ -249,7 +337,6 @@ If you've instead found a bug in the library or would like new features added, g
249
337
 
250
338
  [apidocs]: https://www.twilio.com/docs/api
251
339
  [twiml]: https://www.twilio.com/docs/api/twiml
252
- [libdocs]: https://www.twilio.com/docs/libraries/ruby
253
340
  [refdocs]: https://twilio.github.io/twilio-ruby
254
341
  [capability]: https://github.com/twilio/twilio-ruby/wiki/JWT-Tokens
255
342
  [wiki]: https://github.com/twilio/twilio-ruby/wiki