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.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGES.md +107 -1
- data/CONTRIBUTING.md +2 -2
- data/ISSUE_TEMPLATE.md +5 -1
- data/PULL_REQUEST_TEMPLATE.md +1 -1
- data/README.md +4 -3
- data/lib/twilio-ruby/framework/version.rb +4 -8
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +6 -4
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +85 -60
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +5 -2
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +8 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +3 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +2 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +8 -4
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +11 -4
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +13 -6
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/conversations.rb +39 -3
- data/lib/twilio-ruby/rest/conversations/v1.rb +68 -5
- data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +268 -0
- data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +262 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +21 -10
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +13 -10
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +34 -19
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +48 -32
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +14 -11
- data/lib/twilio-ruby/rest/conversations/v1/credential.rb +427 -0
- data/lib/twilio-ruby/rest/conversations/v1/role.rb +374 -0
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +442 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +388 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +271 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +315 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +586 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +549 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +394 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +519 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +457 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +395 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +419 -0
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +398 -0
- data/lib/twilio-ruby/rest/events.rb +72 -0
- data/lib/twilio-ruby/rest/events/v1.rb +90 -0
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +291 -0
- data/lib/twilio-ruby/rest/events/v1/schema.rb +226 -0
- data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +290 -0
- data/lib/twilio-ruby/rest/events/v1/sink.rb +380 -0
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +115 -0
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +119 -0
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +383 -0
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +216 -0
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +2 -1
- data/lib/twilio-ruby/rest/messaging.rb +6 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v1/deactivation.rb +164 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +6 -3
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +12 -6
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +10 -2
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +16 -2
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +18 -4
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +10 -5
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +6 -3
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +1 -4
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +3 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +45 -4
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +14 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +13 -13
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +6 -6
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +5 -5
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +8 -8
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +6 -8
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +8 -8
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +14 -14
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +7 -7
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +12 -11
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +17 -7
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +75 -9
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +2 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +6 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +1 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +6 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +38 -23
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +2 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +2 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +201 -0
- data/lib/twilio-ruby/rest/verify/v2/service.rb +21 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +10 -2
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +7 -2
- data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -3
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +18 -9
- data/lib/twilio-ruby/rest/video/v1/room.rb +2 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +0 -6
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +1 -4
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +2 -1
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +5 -19
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/framework/version_spec.rb +53 -0
- data/spec/holodeck/holodeck.rb +3 -3
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +35 -36
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +39 -40
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +35 -36
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +25 -23
- data/spec/integration/api/v2010/account/message_spec.rb +37 -0
- data/spec/integration/bulkexports/v1/export/day_spec.rb +5 -5
- data/spec/integration/bulkexports/v1/export_configuration_spec.rb +4 -4
- data/spec/integration/bulkexports/v1/export_spec.rb +3 -3
- data/spec/integration/conversations/v1/{webhook_spec.rb → configuration/webhook_spec.rb} +12 -8
- data/spec/integration/conversations/v1/configuration_spec.rb +87 -0
- data/spec/integration/conversations/v1/conversation/message/delivery_receipt_spec.rb +4 -0
- data/spec/integration/conversations/v1/conversation/message_spec.rb +38 -0
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +60 -4
- data/spec/integration/conversations/v1/conversation_spec.rb +35 -0
- data/spec/integration/conversations/v1/credential_spec.rb +219 -0
- data/spec/integration/conversations/v1/role_spec.rb +249 -0
- data/spec/integration/conversations/v1/service/binding_spec.rb +166 -0
- data/spec/integration/conversations/v1/service/configuration/notification_spec.rb +115 -0
- data/spec/integration/conversations/v1/service/configuration_spec.rb +87 -0
- data/spec/integration/conversations/v1/service/conversation/message/delivery_receipt_spec.rb +144 -0
- data/spec/integration/conversations/v1/service/conversation/message_spec.rb +429 -0
- data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +407 -0
- data/spec/integration/conversations/v1/service/conversation/webhook_spec.rb +299 -0
- data/spec/integration/conversations/v1/service/conversation_spec.rb +289 -0
- data/spec/integration/conversations/v1/service/role_spec.rb +260 -0
- data/spec/integration/conversations/v1/service/user_spec.rb +230 -0
- data/spec/integration/conversations/v1/service_spec.rb +174 -0
- data/spec/integration/conversations/v1/user_spec.rb +220 -0
- data/spec/integration/events/v1/event_type_spec.rb +133 -0
- data/spec/integration/events/v1/schema/schema_version_spec.rb +126 -0
- data/spec/integration/events/v1/schema_spec.rb +46 -0
- data/spec/integration/events/v1/sink/sink_test_spec.rb +42 -0
- data/spec/integration/events/v1/sink/sink_validate_spec.rb +44 -0
- data/spec/integration/events/v1/sink_spec.rb +217 -0
- data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +91 -0
- data/spec/integration/events/v1/subscription_spec.rb +243 -0
- data/spec/integration/messaging/v1/deactivation_spec.rb +40 -0
- data/spec/integration/numbers/v2/regulatory_compliance/end_user_spec.rb +27 -0
- data/spec/integration/numbers/v2/regulatory_compliance/supporting_document_spec.rb +27 -0
- data/spec/integration/studio/v1/flow/execution/execution_step_spec.rb +1 -0
- data/spec/integration/studio/v2/flow/execution/execution_step_spec.rb +1 -0
- data/spec/integration/supersim/v1/sim_spec.rb +23 -0
- data/spec/integration/supersim/v1/usage_record_spec.rb +463 -18
- data/spec/integration/trunking/v1/trunk/recording_spec.rb +79 -0
- data/spec/integration/trunking/v1/trunk_spec.rb +4 -0
- data/spec/integration/verify/v2/service/access_token_spec.rb +1 -1
- data/spec/integration/verify/v2/service/entity/challenge_spec.rb +8 -8
- data/spec/integration/video/v1/room_spec.rb +37 -0
- data/spec/integration/wireless/v1/sim/data_session_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +82 -5
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dae54a54d01043583ac7681515689c12b2f6debaf7771573ede8f5c07a4c34ef
|
4
|
+
data.tar.gz: 925938904f70cab1f93ba075fd117407bd71c269c7519bd263a32683603d5cef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80f007c989fdc5df11ec8073732a684e05d5584cfe394202d619d12305acfb5aa3aef967d0181fa9ba45e7a20dcc794d9eda4ab99ed67cfde2390f778a1d42cd
|
7
|
+
data.tar.gz: fea5f05f5bd0a7d78c51665338f6bf835eed44e97bc2ba3646465aa935ed3843319aa91c890af002bafbb5ffacc623d3d43a679f5517b6f30057dca4f980e15e
|
data/.travis.yml
CHANGED
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
|
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`
|
data/CONTRIBUTING.md
CHANGED
@@ -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
|
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:
|
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.
|
data/ISSUE_TEMPLATE.md
CHANGED
@@ -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
|
|
data/PULL_REQUEST_TEMPLATE.md
CHANGED
@@ -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
|
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.
|
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.
|
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
|
-
|
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
|
-
|
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
|
282
|
-
# to send status information about SMS messages
|
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
|
549
|
-
# to send status information about SMS messages
|
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/
|
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/
|
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/
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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.
|