twilio-ruby 5.39.2 → 5.40.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGES.md +107 -1
  4. data/CONTRIBUTING.md +2 -2
  5. data/ISSUE_TEMPLATE.md +5 -1
  6. data/PULL_REQUEST_TEMPLATE.md +1 -1
  7. data/README.md +4 -3
  8. data/lib/twilio-ruby/framework/version.rb +4 -8
  9. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +6 -4
  10. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +12 -3
  11. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +12 -3
  12. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +12 -3
  13. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +12 -3
  14. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +12 -3
  15. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +12 -3
  16. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +12 -3
  17. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +2 -1
  18. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +85 -60
  19. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +5 -2
  20. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +14 -0
  21. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +14 -0
  22. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +14 -0
  23. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +8 -1
  24. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +3 -1
  25. data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +2 -1
  26. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +8 -4
  27. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +11 -4
  28. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +13 -6
  29. data/lib/twilio-ruby/rest/client.rb +7 -0
  30. data/lib/twilio-ruby/rest/conversations.rb +39 -3
  31. data/lib/twilio-ruby/rest/conversations/v1.rb +68 -5
  32. data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +268 -0
  33. data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +262 -0
  34. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +21 -10
  35. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +13 -10
  36. data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +34 -19
  37. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +48 -32
  38. data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +14 -11
  39. data/lib/twilio-ruby/rest/conversations/v1/credential.rb +427 -0
  40. data/lib/twilio-ruby/rest/conversations/v1/role.rb +374 -0
  41. data/lib/twilio-ruby/rest/conversations/v1/service.rb +442 -0
  42. data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +388 -0
  43. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +271 -0
  44. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +315 -0
  45. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +586 -0
  46. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +549 -0
  47. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +394 -0
  48. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +519 -0
  49. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +457 -0
  50. data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +395 -0
  51. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +419 -0
  52. data/lib/twilio-ruby/rest/conversations/v1/user.rb +398 -0
  53. data/lib/twilio-ruby/rest/events.rb +72 -0
  54. data/lib/twilio-ruby/rest/events/v1.rb +90 -0
  55. data/lib/twilio-ruby/rest/events/v1/event_type.rb +291 -0
  56. data/lib/twilio-ruby/rest/events/v1/schema.rb +226 -0
  57. data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +290 -0
  58. data/lib/twilio-ruby/rest/events/v1/sink.rb +380 -0
  59. data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +115 -0
  60. data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +119 -0
  61. data/lib/twilio-ruby/rest/events/v1/subscription.rb +383 -0
  62. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +216 -0
  63. data/lib/twilio-ruby/rest/fax/v1/fax.rb +2 -1
  64. data/lib/twilio-ruby/rest/messaging.rb +6 -0
  65. data/lib/twilio-ruby/rest/messaging/v1.rb +7 -0
  66. data/lib/twilio-ruby/rest/messaging/v1/deactivation.rb +164 -0
  67. data/lib/twilio-ruby/rest/messaging/v1/service.rb +6 -3
  68. data/lib/twilio-ruby/rest/notify/v1/credential.rb +12 -6
  69. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +10 -2
  70. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +3 -3
  71. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +16 -2
  72. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +18 -4
  73. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +10 -5
  74. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +6 -3
  75. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +1 -4
  76. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +3 -1
  77. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +45 -4
  78. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +14 -1
  79. data/lib/twilio-ruby/rest/serverless/v1/service.rb +13 -13
  80. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +6 -6
  81. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +5 -5
  82. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +8 -8
  83. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +6 -8
  84. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +8 -8
  85. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +14 -14
  86. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
  87. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +7 -7
  88. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +1 -1
  89. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +12 -11
  90. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +17 -7
  91. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +75 -9
  92. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +2 -1
  93. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +6 -2
  94. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +1 -4
  95. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +6 -2
  96. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +38 -23
  97. data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +2 -1
  98. data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +2 -1
  99. data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +201 -0
  100. data/lib/twilio-ruby/rest/verify/v2/service.rb +21 -9
  101. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +10 -2
  102. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +7 -2
  103. data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -3
  104. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +18 -9
  105. data/lib/twilio-ruby/rest/video/v1/room.rb +2 -1
  106. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +0 -6
  107. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +1 -4
  108. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +2 -1
  109. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +5 -19
  110. data/lib/twilio-ruby/version.rb +1 -1
  111. data/spec/framework/version_spec.rb +53 -0
  112. data/spec/holodeck/holodeck.rb +3 -3
  113. data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +35 -36
  114. data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +39 -40
  115. data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +35 -36
  116. data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +25 -23
  117. data/spec/integration/api/v2010/account/message_spec.rb +37 -0
  118. data/spec/integration/bulkexports/v1/export/day_spec.rb +5 -5
  119. data/spec/integration/bulkexports/v1/export_configuration_spec.rb +4 -4
  120. data/spec/integration/bulkexports/v1/export_spec.rb +3 -3
  121. data/spec/integration/conversations/v1/{webhook_spec.rb → configuration/webhook_spec.rb} +12 -8
  122. data/spec/integration/conversations/v1/configuration_spec.rb +87 -0
  123. data/spec/integration/conversations/v1/conversation/message/delivery_receipt_spec.rb +4 -0
  124. data/spec/integration/conversations/v1/conversation/message_spec.rb +38 -0
  125. data/spec/integration/conversations/v1/conversation/participant_spec.rb +60 -4
  126. data/spec/integration/conversations/v1/conversation_spec.rb +35 -0
  127. data/spec/integration/conversations/v1/credential_spec.rb +219 -0
  128. data/spec/integration/conversations/v1/role_spec.rb +249 -0
  129. data/spec/integration/conversations/v1/service/binding_spec.rb +166 -0
  130. data/spec/integration/conversations/v1/service/configuration/notification_spec.rb +115 -0
  131. data/spec/integration/conversations/v1/service/configuration_spec.rb +87 -0
  132. data/spec/integration/conversations/v1/service/conversation/message/delivery_receipt_spec.rb +144 -0
  133. data/spec/integration/conversations/v1/service/conversation/message_spec.rb +429 -0
  134. data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +407 -0
  135. data/spec/integration/conversations/v1/service/conversation/webhook_spec.rb +299 -0
  136. data/spec/integration/conversations/v1/service/conversation_spec.rb +289 -0
  137. data/spec/integration/conversations/v1/service/role_spec.rb +260 -0
  138. data/spec/integration/conversations/v1/service/user_spec.rb +230 -0
  139. data/spec/integration/conversations/v1/service_spec.rb +174 -0
  140. data/spec/integration/conversations/v1/user_spec.rb +220 -0
  141. data/spec/integration/events/v1/event_type_spec.rb +133 -0
  142. data/spec/integration/events/v1/schema/schema_version_spec.rb +126 -0
  143. data/spec/integration/events/v1/schema_spec.rb +46 -0
  144. data/spec/integration/events/v1/sink/sink_test_spec.rb +42 -0
  145. data/spec/integration/events/v1/sink/sink_validate_spec.rb +44 -0
  146. data/spec/integration/events/v1/sink_spec.rb +217 -0
  147. data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +91 -0
  148. data/spec/integration/events/v1/subscription_spec.rb +243 -0
  149. data/spec/integration/messaging/v1/deactivation_spec.rb +40 -0
  150. data/spec/integration/numbers/v2/regulatory_compliance/end_user_spec.rb +27 -0
  151. data/spec/integration/numbers/v2/regulatory_compliance/supporting_document_spec.rb +27 -0
  152. data/spec/integration/studio/v1/flow/execution/execution_step_spec.rb +1 -0
  153. data/spec/integration/studio/v2/flow/execution/execution_step_spec.rb +1 -0
  154. data/spec/integration/supersim/v1/sim_spec.rb +23 -0
  155. data/spec/integration/supersim/v1/usage_record_spec.rb +463 -18
  156. data/spec/integration/trunking/v1/trunk/recording_spec.rb +79 -0
  157. data/spec/integration/trunking/v1/trunk_spec.rb +4 -0
  158. data/spec/integration/verify/v2/service/access_token_spec.rb +1 -1
  159. data/spec/integration/verify/v2/service/entity/challenge_spec.rb +8 -8
  160. data/spec/integration/video/v1/room_spec.rb +37 -0
  161. data/spec/integration/wireless/v1/sim/data_session_spec.rb +2 -2
  162. data/spec/spec_helper.rb +1 -1
  163. metadata +82 -5
  164. data/lib/twilio-ruby/rest/conversations/v1/webhook.rb +0 -262
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71776e4fa40a71f0bbf50c4a47df1ba6f61d4cc803ced22a977db622fd2d1414
4
- data.tar.gz: e9e0e1169bc3d9983393b937b6b1921aba4a64808c2350400df8070a2299a04c
3
+ metadata.gz: dae54a54d01043583ac7681515689c12b2f6debaf7771573ede8f5c07a4c34ef
4
+ data.tar.gz: 925938904f70cab1f93ba075fd117407bd71c269c7519bd263a32683603d5cef
5
5
  SHA512:
6
- metadata.gz: ae3e0865ab57e2b34268fbc5eccbd246c92515e3665d55512becfacb45e7bd509251ca43fba9d58ffd97a56535c6fcab0efb1c4d78cdff532b988ebe32b891ff
7
- data.tar.gz: d36bfcb14b0746e0d8e299f7dc6e2d788a2fc4f2e61d7b7311f97204649a861ec8ed839851a2486bfcce7ab241020138b2e7c7de6ec2ae8af26a861bf554a945
6
+ metadata.gz: 80f007c989fdc5df11ec8073732a684e05d5584cfe394202d619d12305acfb5aa3aef967d0181fa9ba45e7a20dcc794d9eda4ab99ed67cfde2390f778a1d42cd
7
+ data.tar.gz: fea5f05f5bd0a7d78c51665338f6bf835eed44e97bc2ba3646465aa935ed3843319aa91c890af002bafbb5ffacc623d3d43a679f5517b6f30057dca4f980e15e
@@ -36,7 +36,7 @@ deploy:
36
36
 
37
37
  notifications:
38
38
  slack:
39
- if: branch = master
39
+ if: branch = main
40
40
  on_pull_requests: false
41
41
  on_success: never
42
42
  on_failure: change
data/CHANGES.md CHANGED
@@ -1,6 +1,112 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2020-09-21] Version 5.40.3
5
+ ---------------------------
6
+ **Library - Fix**
7
+ - [PR #534](https://github.com/twilio/twilio-ruby/pull/534): allow API redirect responses. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
8
+
9
+ **Accounts**
10
+ - Add Auth Token rotation API
11
+
12
+ **Conversations**
13
+ - Change resource path for Webhook Configuration
14
+
15
+ **Events**
16
+ - Schemas API get all Schemas names and versions
17
+
18
+
19
+ [2020-09-16] Version 5.40.2
20
+ ---------------------------
21
+ **Library - Fix**
22
+ - [PR #530](https://github.com/twilio/twilio-ruby/pull/530): drop the page limit calculation. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
23
+
24
+ **Conversations**
25
+ - Expose Configuration and Service Configuration resources
26
+ - Add Unique Name support for Conversations
27
+ - Add Services Push Notification resource
28
+ - Add Service scoped Conversation resources
29
+ - Support Identity in Users resource endpoint
30
+
31
+ **Messaging**
32
+ - GA Deactivation List API
33
+ - Add domain cert API's(fetch, update, create) for link tracker
34
+
35
+ **Numbers**
36
+ - Add API endpoint for Supporting Document deletion
37
+
38
+ **Proxy**
39
+ - Updated usage of FailOnParticipantConflict param to apply only to accounts with ProxyAllowParticipantConflict account flag
40
+
41
+ **Supersim**
42
+ - Add `AccountSid` parameter to Sim resource update request
43
+ - Add `ready` status as an available status for a Sim resource
44
+
45
+
46
+ [2020-09-02] Version 5.40.1
47
+ ---------------------------
48
+ **Library - Chore**
49
+ - [PR #529](https://github.com/twilio/twilio-ruby/pull/529): sort files for deterministic require order. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
50
+
51
+ **Ai**
52
+ - Initial release
53
+
54
+ **Bulkexports**
55
+ - removing public beta feature flag from BulkExports Jobs API
56
+
57
+ **Messaging**
58
+ - Add Deactivation List API
59
+ - Added page token parameter for fetch in WhatsApp Templates API
60
+
61
+ **Numbers**
62
+ - Add API endpoint for End User deletion
63
+
64
+ **Routes**
65
+ - Add Resource Route Configurations API
66
+ - Add Route Configurations API
67
+ - Initial Release
68
+
69
+ **Trunking**
70
+ - Added `transfer_mode` property on Trunks.
71
+
72
+
73
+ [2020-08-19] Version 5.40.0
74
+ ---------------------------
75
+ **Library - Chore**
76
+ - [PR #526](https://github.com/twilio/twilio-ruby/pull/526): update GitHub branch references to use HEAD. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
77
+
78
+ **Conversations**
79
+ - Allow Identity addition to Participants
80
+
81
+ **Events**
82
+ - Sinks API Get all Sinks
83
+
84
+ **Proxy**
85
+ - Clarified usage of FailOnParticipantConflict param as experimental
86
+ - Add FailOnParticipantConflict param to Proxy Session create and Proxy Participant create
87
+
88
+ **Supersim**
89
+ - Add fleet, network, and isoCountryCode to the UsageRecords resource
90
+ - Change sort order of UsageRecords from ascending to descending with respect to start time field, records are now returned newest to oldest
91
+
92
+ **Wireless**
93
+ - Removed `Start` and `End` parameters from the Data Sessions list endpoint. **(breaking change)**
94
+
95
+
96
+ [2020-08-05] Version 5.39.3
97
+ ---------------------------
98
+ **Messaging**
99
+ - Add rejection reason support to WhatsApp API
100
+ - Removed status parameter for create and update in WhatsApp Templates API
101
+
102
+ **Proxy**
103
+ - Add FailOnParticipantConflict param to Proxy Session update
104
+
105
+ **Verify**
106
+ - Add `CustomFriendlyName` optional parameter on Verification creation.
107
+ - Changes in `Challenge` resource to update documentation of both `details` and `hidden_details` properties.
108
+
109
+
4
110
  [2020-07-22] Version 5.39.2
5
111
  ---------------------------
6
112
  **Api**
@@ -490,7 +596,7 @@ twilio-ruby changelog
490
596
  **Library**
491
597
  - [PR #481](https://github.com/twilio/twilio-ruby/pull/481): added request validation for urls with and without ports. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
492
598
  - [PR #480](https://github.com/twilio/twilio-ruby/pull/480): Update resources after sorting. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
493
- - [PR #479](https://github.com/twilio/twilio-ruby/pull/479): Auto-deploy via Travis CI upon tagged commit to master. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
599
+ - [PR #479](https://github.com/twilio/twilio-ruby/pull/479): Auto-deploy via Travis CI upon tagged commit to main. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
494
600
 
495
601
  **Api**
496
602
  - Add new usage categories to the public api `sms-messages-carrierfees` and `mms-messages-carrierfees`
@@ -105,7 +105,7 @@ Before you submit your pull request consider the following guidelines:
105
105
  * Make your changes in a new git branch:
106
106
 
107
107
  ```shell
108
- git checkout -b my-fix-branch master
108
+ git checkout -b my-fix-branch main
109
109
  ```
110
110
 
111
111
  * Create your patch, **including appropriate test cases**.
@@ -132,7 +132,7 @@ Before you submit your pull request consider the following guidelines:
132
132
  git push origin my-fix-branch
133
133
  ```
134
134
 
135
- In GitHub, send a pull request to `twilio-ruby:master`.
135
+ In GitHub, send a pull request to `twilio-ruby:main`.
136
136
  If we suggest changes, then:
137
137
 
138
138
  * Make the required updates.
@@ -1,5 +1,9 @@
1
1
  <!--
2
2
  If this is a feature request, make sure you search Issues for an existing request before creating a new one!
3
+
4
+ Please utilize the template below to help us resolve your issue.
5
+
6
+ Note that many issues can be resolved by updating to the latest version.
3
7
  -->
4
8
 
5
9
  ### Issue Summary
@@ -21,6 +25,6 @@ A summary of the issue and the environment in which it occurs. If suitable, incl
21
25
  ```
22
26
 
23
27
  ### Technical details:
24
- * twilio-ruby version:
28
+ * twilio-ruby version:
25
29
  * ruby version:
26
30
 
@@ -23,7 +23,7 @@ A short description of what this PR does.
23
23
  - [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
24
24
  - [ ] I have read the [Contribution Guidelines](CONTRIBUTING.md) and my PR follows them
25
25
  - [ ] I have titled the PR appropriately
26
- - [ ] I have updated my branch with the master branch
26
+ - [ ] I have updated my branch with the main branch
27
27
  - [ ] I have added tests that prove my fix is effective or that my feature works
28
28
  - [ ] I have added necessary documentation about the functionality in the appropriate .md file
29
29
  - [ ] I have added inline documentation to the code I modified
data/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
  [![Gem Version](https://img.shields.io/gem/v/twilio-ruby.svg)](https://rubygems.org/gems/twilio-ruby)
5
5
  [![Learn with TwilioQuest](https://img.shields.io/static/v1?label=TwilioQuest&message=Learn%20to%20contribute%21&color=F22F46&labelColor=1f243c&style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAASFBMVEUAAAAZGRkcHBwjIyMoKCgAAABgYGBoaGiAgICMjIyzs7PJycnMzMzNzc3UoBfd3d3m5ubqrhfrMEDu7u739/f4vSb/3AD///9tbdyEAAAABXRSTlMAAAAAAMJrBrEAAAKoSURBVHgB7ZrRcuI6EESdyxXGYoNFvMD//+l2bSszRgyUYpFAsXOeiJGmj4NkuWx1Qeh+Ekl9DgEXOBwOx+Px5xyQhDykfgq4wG63MxxaR4ddIkg6Ul3g84vCIcjPBA5gmUMeXESrlukuoK33+33uID8TWeLAdOWsKpJYzwVMB7bOzYSGOciyUlXSn0/ABXTosJ1M1SbypZ4O4MbZuIDMU02PMbauhhHMHXbmebmALIiEbbbbbUrpF1gwE9kFfRNAJaP+FQEXCCTGyJ4ngDrjOFo3jEL5JdqjF/pueR4cCeCGgAtwmuRS6gDwaRiGvu+DMFwSBLTE3+jF8JyuV1okPZ+AC4hDFhCHyHQjdjPHUKFDlHSJkHQXMB3KpSwXNGJPcwwTdZiXlRN0gSp0zpWxNtM0beYE0nRH6QIbO7rawwXaBYz0j78gxjokDuv12gVeUuBD0MDi0OQCLvDaAho4juP1Q/jkAncXqIcCfd+7gAu4QLMACCLxpRsSuQh0igu0C9Svhi7weAGZg50L3IE3cai4IfkNZAC8dfdhsUD3CgKBVC9JE5ABAFzg4QL/taYPAAWrHdYcgfLaIgAXWJ7OV38n1LEF8tt2TH29E+QAoDoO5Ve/LtCQDmKM9kPbvCEBApK+IXzbcSJ0cIGF6e8gpcRhUDogWZ8JnaWjPXc/fNnBBUKRngiHgTUSivSzDRDgHZQOLvBQgf8rRt+VdBUUhwkU6VpJ+xcOwQUqZr+mR0kvBUgv6cB4+37hQAkXqE8PwGisGhJtN4xAHMzrsgvI7rccXqSvKh6jltGlrOHA3Xk1At3LC4QiPdX9/0ndHpGVvTjR4bZA1ypAKgVcwE5vx74ulwIugDt8e/X7JgfkucBMIAr26ndnB4UCLnDOqvteQsHlgX9N4A+c4cW3DXSPbwAAAABJRU5ErkJggg==)](https://twil.io/learn-open-source)
6
6
 
7
+ **The default branch name for this repository has been changed to `main` as of 07/27/2020.**
8
+
7
9
  ## Documentation
8
10
 
9
11
  The documentation for the Twilio API can be found [here][apidocs].
@@ -32,13 +34,13 @@ This library supports the following Ruby implementations:
32
34
  To install using [Bundler][bundler] grab the latest stable version:
33
35
 
34
36
  ```ruby
35
- gem 'twilio-ruby', '~> 5.39.2'
37
+ gem 'twilio-ruby', '~> 5.40.3'
36
38
  ```
37
39
 
38
40
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
39
41
 
40
42
  ```bash
41
- gem install twilio-ruby -v 5.39.2
43
+ gem install twilio-ruby -v 5.40.3
42
44
  ```
43
45
 
44
46
  To build and install the development branch yourself from the latest source:
@@ -212,7 +214,6 @@ If you've instead found a bug in the library or would like new features added, g
212
214
  [libdocs]: https://www.twilio.com/docs/libraries/ruby
213
215
  [refdocs]: https://twilio.github.io/twilio-ruby
214
216
  [capability]: https://github.com/twilio/twilio-ruby/wiki/JWT-Tokens
215
- [examples]: https://github.com/twilio/twilio-ruby/blob/master/examples
216
217
  [wiki]: https://github.com/twilio/twilio-ruby/wiki
217
218
  [bundler]: https://bundler.io
218
219
  [rubygems]: https://rubygems.org
@@ -68,7 +68,8 @@ module Twilio
68
68
  timeout
69
69
  )
70
70
 
71
- if response.status_code < 200 || response.status_code >= 300
71
+ # Note that 3XX response codes are allowed for fetches.
72
+ if response.status_code < 200 || response.status_code >= 400
72
73
  raise exception(response, 'Unable to fetch record')
73
74
  end
74
75
 
@@ -112,18 +113,13 @@ module Twilio
112
113
  end
113
114
 
114
115
  def read_limits(limit = nil, page_size = nil)
115
- page_limit = nil
116
-
117
- unless limit.nil?
118
- # If there is no user-specified page_size, pick the most network efficient size
116
+ unless limit.nil? || page_size
119
117
  page_size = limit
120
- page_limit = (limit / page_size.to_f).ceil
121
118
  end
122
119
 
123
120
  {
124
121
  limit: limit || nil,
125
- page_size: page_size || nil,
126
- page_limit: page_limit
122
+ page_size: page_size || nil
127
123
  }
128
124
  end
129
125
 
@@ -278,8 +278,9 @@ module Twilio
278
278
  # occurs while retrieving or executing the TwiML from `sms_url`.
279
279
  # @param [String] sms_fallback_method The HTTP method we should use to call
280
280
  # `sms_fallback_url`. Can be: `GET` or `POST`.
281
- # @param [String] sms_status_callback The URL we should call using a POST method
282
- # to send status information about SMS messages sent by the application.
281
+ # @param [String] sms_status_callback Same as message_status_callback: The URL we
282
+ # should call using a POST method to send status information about SMS messages
283
+ # sent by the application. Deprecated, included for backwards compatibility.
283
284
  # @param [String] message_status_callback The URL we should call using a POST
284
285
  # method to send message status information to your application.
285
286
  # @return [ApplicationInstance] Updated ApplicationInstance
@@ -545,8 +546,9 @@ module Twilio
545
546
  # occurs while retrieving or executing the TwiML from `sms_url`.
546
547
  # @param [String] sms_fallback_method The HTTP method we should use to call
547
548
  # `sms_fallback_url`. Can be: `GET` or `POST`.
548
- # @param [String] sms_status_callback The URL we should call using a POST method
549
- # to send status information about SMS messages sent by the application.
549
+ # @param [String] sms_status_callback Same as message_status_callback: The URL we
550
+ # should call using a POST method to send status information about SMS messages
551
+ # sent by the application. Deprecated, included for backwards compatibility.
550
552
  # @param [String] message_status_callback The URL we should call using a POST
551
553
  # method to send message status information to your application.
552
554
  # @return [ApplicationInstance] Updated ApplicationInstance
@@ -38,7 +38,10 @@ module Twilio
38
38
  # @param [String] contains The pattern on which to match phone numbers. Valid
39
39
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
40
40
  # single digit. For examples, see [Example
41
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
41
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern)
42
+ # and [Example
43
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern).
44
+ # If specified, this value must have at least two characters.
42
45
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
43
46
  # messages. Can be: `true` or `false`.
44
47
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -125,7 +128,10 @@ module Twilio
125
128
  # @param [String] contains The pattern on which to match phone numbers. Valid
126
129
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
127
130
  # single digit. For examples, see [Example
128
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
131
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern)
132
+ # and [Example
133
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern).
134
+ # If specified, this value must have at least two characters.
129
135
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
130
136
  # messages. Can be: `true` or `false`.
131
137
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -228,7 +234,10 @@ module Twilio
228
234
  # @param [String] contains The pattern on which to match phone numbers. Valid
229
235
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
230
236
  # single digit. For examples, see [Example
231
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
237
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern)
238
+ # and [Example
239
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern).
240
+ # If specified, this value must have at least two characters.
232
241
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
233
242
  # messages. Can be: `true` or `false`.
234
243
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -38,7 +38,10 @@ module Twilio
38
38
  # @param [String] contains The pattern on which to match phone numbers. Valid
39
39
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
40
40
  # single digit. For examples, see [Example
41
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
41
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2)
42
+ # and [Example
43
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3).
44
+ # If specified, this value must have at least two characters.
42
45
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
43
46
  # messages. Can be: `true` or `false`.
44
47
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -125,7 +128,10 @@ module Twilio
125
128
  # @param [String] contains The pattern on which to match phone numbers. Valid
126
129
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
127
130
  # single digit. For examples, see [Example
128
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
131
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2)
132
+ # and [Example
133
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3).
134
+ # If specified, this value must have at least two characters.
129
135
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
130
136
  # messages. Can be: `true` or `false`.
131
137
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -228,7 +234,10 @@ module Twilio
228
234
  # @param [String] contains The pattern on which to match phone numbers. Valid
229
235
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
230
236
  # single digit. For examples, see [Example
231
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
237
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2)
238
+ # and [Example
239
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3).
240
+ # If specified, this value must have at least two characters.
232
241
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
233
242
  # messages. Can be: `true` or `false`.
234
243
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -38,7 +38,10 @@ module Twilio
38
38
  # @param [String] contains The pattern on which to match phone numbers. Valid
39
39
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
40
40
  # single digit. For examples, see [Example
41
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
41
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2)
42
+ # and [Example
43
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3).
44
+ # If specified, this value must have at least two characters.
42
45
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
43
46
  # messages. Can be: `true` or `false`.
44
47
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -125,7 +128,10 @@ module Twilio
125
128
  # @param [String] contains The pattern on which to match phone numbers. Valid
126
129
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
127
130
  # single digit. For examples, see [Example
128
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
131
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2)
132
+ # and [Example
133
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3).
134
+ # If specified, this value must have at least two characters.
129
135
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
130
136
  # messages. Can be: `true` or `false`.
131
137
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -228,7 +234,10 @@ module Twilio
228
234
  # @param [String] contains The pattern on which to match phone numbers. Valid
229
235
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
230
236
  # single digit. For examples, see [Example
231
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
237
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2)
238
+ # and [Example
239
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3).
240
+ # If specified, this value must have at least two characters.
232
241
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
233
242
  # messages. Can be: `true` or `false`.
234
243
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -38,7 +38,10 @@ module Twilio
38
38
  # @param [String] contains The pattern on which to match phone numbers. Valid
39
39
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
40
40
  # single digit. For examples, see [Example
41
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
41
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2)
42
+ # and [Example
43
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3).
44
+ # If specified, this value must have at least two characters.
42
45
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
43
46
  # messages. Can be: `true` or `false`.
44
47
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -125,7 +128,10 @@ module Twilio
125
128
  # @param [String] contains The pattern on which to match phone numbers. Valid
126
129
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
127
130
  # single digit. For examples, see [Example
128
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
131
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2)
132
+ # and [Example
133
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3).
134
+ # If specified, this value must have at least two characters.
129
135
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
130
136
  # messages. Can be: `true` or `false`.
131
137
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -228,7 +234,10 @@ module Twilio
228
234
  # @param [String] contains The pattern on which to match phone numbers. Valid
229
235
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
230
236
  # single digit. For examples, see [Example
231
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
237
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2)
238
+ # and [Example
239
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3).
240
+ # If specified, this value must have at least two characters.
232
241
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
233
242
  # messages. Can be: `true` or `false`.
234
243
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -38,7 +38,10 @@ module Twilio
38
38
  # @param [String] contains The pattern on which to match phone numbers. Valid
39
39
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
40
40
  # single digit. For examples, see [Example
41
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
41
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2)
42
+ # and [Example
43
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3).
44
+ # If specified, this value must have at least two characters.
42
45
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
43
46
  # messages. Can be: `true` or `false`.
44
47
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -125,7 +128,10 @@ module Twilio
125
128
  # @param [String] contains The pattern on which to match phone numbers. Valid
126
129
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
127
130
  # single digit. For examples, see [Example
128
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
131
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2)
132
+ # and [Example
133
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3).
134
+ # If specified, this value must have at least two characters.
129
135
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
130
136
  # messages. Can be: `true` or `false`.
131
137
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -228,7 +234,10 @@ module Twilio
228
234
  # @param [String] contains The pattern on which to match phone numbers. Valid
229
235
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
230
236
  # single digit. For examples, see [Example
231
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
237
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2)
238
+ # and [Example
239
+ # 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3).
240
+ # If specified, this value must have at least two characters.
232
241
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
233
242
  # messages. Can be: `true` or `false`.
234
243
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.