twilio-ruby 5.56.0 → 5.58.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.travis.yml +24 -7
- data/CHANGES.md +76 -0
- data/Gemfile +1 -0
- data/README.md +2 -2
- data/examples/examples.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +4 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -11
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +12 -5
- data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +312 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +12 -5
- data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +324 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +466 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +44 -0
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +23 -0
- data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +442 -0
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +35 -0
- data/lib/twilio-ruby/rest/conversations/v1.rb +7 -0
- data/lib/twilio-ruby/rest/conversations.rb +6 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +434 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +7 -0
- data/lib/twilio-ruby/rest/insights.rb +6 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +19 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +6 -2
- data/lib/twilio-ruby/rest/pricing/v2/country.rb +280 -0
- data/lib/twilio-ruby/rest/pricing/v2/number.rb +225 -0
- data/lib/twilio-ruby/rest/pricing/v2.rb +37 -0
- data/lib/twilio-ruby/rest/pricing.rb +19 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +26 -5
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +24 -5
- data/lib/twilio-ruby/version.rb +1 -1
- data/sonar-project.properties +13 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22891108a10e24af4975960e154bc78ba330d7094eef18a7850db14d1b19f55c
|
4
|
+
data.tar.gz: 84157f208866fec1713f624928ac607f29d69e69efb60fbe7778bddce4b0e768
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c93a2f24c7a14a6f594fca8c3425510763a5ddf3d47edcda7bf24dc7d2a3bd8b39c8e8d5ca07fae9ef92194d44d36f93060f56022c83ecca6dbd91ef2d7688e8
|
7
|
+
data.tar.gz: d3547e481e40e1802f78377797f44ff38401b0e4026c049590dfc9e94a611af79def1bdd5c1b130197e1057a78bccee386dc211f00af3f73bb7ce058bb7cfdfc
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -3,23 +3,35 @@ cache: bundler
|
|
3
3
|
bundler_args: "--without development"
|
4
4
|
rvm:
|
5
5
|
- ruby-head
|
6
|
-
- 3.0
|
7
|
-
- 2.7
|
8
|
-
- 2.6
|
9
|
-
- 2.5
|
10
|
-
- 2.4
|
11
6
|
- jruby-9.2
|
7
|
+
- 2.4
|
8
|
+
- 2.5
|
9
|
+
- 2.6
|
10
|
+
- 2.7
|
11
|
+
- 3.0
|
12
12
|
services:
|
13
13
|
- docker
|
14
14
|
install: make install
|
15
|
-
script:
|
15
|
+
script:
|
16
|
+
- make test
|
17
|
+
- if [[ "$TRAVIS_BRANCH" == "main" || "$TRAVIS_BRANCH" == "travis" ]] && [ "$TRAVIS_PULL_REQUEST"
|
18
|
+
== "false" ]; then echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}"
|
19
|
+
--password-stdin; fi
|
16
20
|
matrix:
|
21
|
+
include:
|
22
|
+
- language: ruby
|
23
|
+
rvm: '3.0'
|
24
|
+
# The below workaround is necessary because of the branch coverage inclusion in simplecov 0.18+
|
25
|
+
# more discussion here - https://community.sonarsource.com/t/ruby-coverage-simplecov-json-file-does-not-work/20909/7
|
26
|
+
after_success:
|
27
|
+
- ruby -rjson -e 'sqube = JSON.load(File.read("coverage/.resultset.json"))["RSpec"]["coverage"].transform_values {|lines| lines["lines"]}; total = { "RSpec" => { "coverage" => sqube, "timestamp" => Time.now.to_i }}; puts JSON.dump(total)' > coverage/.resultset.sonarqube.json
|
28
|
+
- sonar-scanner
|
17
29
|
allow_failures:
|
18
30
|
- rvm: ruby-head
|
19
31
|
fast_finish: true
|
20
32
|
deploy:
|
21
33
|
- provider: script
|
22
|
-
script:
|
34
|
+
script: make docker-build && make docker-push
|
23
35
|
skip_cleanup: true
|
24
36
|
on:
|
25
37
|
tags: true
|
@@ -37,3 +49,8 @@ notifications:
|
|
37
49
|
on_failure: change
|
38
50
|
rooms:
|
39
51
|
secure: HG7rC5VSDOZiLCkpTsC4ZImh1k59OPi6YEjYKhdGXItybLHa6Yh5C42WvSx3kVW3SeyLOm1CiaMv+pbBZUXStXYsl8eH69MbEZimhDWsPs/m+bh+gEISov22WNUs3ZfUqIXMIb6v18oXPp2Qa1gX5LUEAGoSxHWNmCAcHayWl7M=
|
52
|
+
addons:
|
53
|
+
sonarcloud:
|
54
|
+
organization: twilio
|
55
|
+
token:
|
56
|
+
secure: OSEahx/yO/r9PdjXbASwJt+ogphxkDDpnlajWNCBTc+hoiEurGP/12CN0oQi7+iishIgIowqo5J9/+m1BQfsAv4fKST+t6mSazx27udiiM9am03lhviW8QSG6STADvtq6uJRqTXMk3WehoSidNRYXamVdCoBbqxCSaMX8MbMsN8=
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,82 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2021-08-25] Version 5.58.1
|
5
|
+
---------------------------
|
6
|
+
**Api**
|
7
|
+
- Add Programmabled Voice SIP Refer call transfers (`calls-transfers`) to usage records
|
8
|
+
- Add Flex Voice Usage category (`flex-usage`) to usage records
|
9
|
+
|
10
|
+
**Conversations**
|
11
|
+
- Add `Order` query parameter to Message resource read operation
|
12
|
+
|
13
|
+
**Insights**
|
14
|
+
- Added `partial` to enum processing_state_request
|
15
|
+
- Added abnormal session filter in Call Summaries
|
16
|
+
|
17
|
+
**Messaging**
|
18
|
+
- Add brand_registration_sid as an optional query param for us_app_to_person_usecase api
|
19
|
+
|
20
|
+
**Pricing**
|
21
|
+
- add trunking_numbers resource (v2)
|
22
|
+
- add trunking_country resource (v2)
|
23
|
+
|
24
|
+
**Verify**
|
25
|
+
- Changed to private beta the `TemplateSid` optional parameter on Verification creation.
|
26
|
+
- Added the optional parameter `Order` to the list Challenges endpoint to define the list order.
|
27
|
+
|
28
|
+
|
29
|
+
[2021-08-11] Version 5.58.0
|
30
|
+
---------------------------
|
31
|
+
**Library - Chore**
|
32
|
+
- [PR #566](https://github.com/twilio/twilio-ruby/pull/566): integrate sonarcloud. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!
|
33
|
+
|
34
|
+
**Library - Docs**
|
35
|
+
- [PR #565](https://github.com/twilio/twilio-ruby/pull/565): update mms example to use media_url. Thanks to [@cnorm35](https://github.com/cnorm35)!
|
36
|
+
|
37
|
+
**Api**
|
38
|
+
- Corrected the `price`, `call_sid_to_coach`, and `uri` data types for Conference, Participant, and Recording **(breaking change)**
|
39
|
+
- Made documentation for property `time_limit` in the call api public. **(breaking change)**
|
40
|
+
- Added `domain_sid` in sip_credential_list_mapping and sip_ip_access_control_list_mapping APIs **(breaking change)**
|
41
|
+
|
42
|
+
**Insights**
|
43
|
+
- Added new endpoint to fetch Call Summaries
|
44
|
+
|
45
|
+
**Messaging**
|
46
|
+
- Add brand_type field to a2p brand_registration api
|
47
|
+
- Revert brand registration api update to add brand_type field
|
48
|
+
- Add brand_type field to a2p brand_registration api
|
49
|
+
|
50
|
+
**Taskrouter**
|
51
|
+
- Add `X-Rate-Limit-Limit`, `X-Rate-Limit-Remaining`, and `X-Rate-Limit-Config` as Response Headers to all TaskRouter endpoints
|
52
|
+
|
53
|
+
**Verify**
|
54
|
+
- Add `TemplateSid` optional parameter on Verification creation.
|
55
|
+
- Include `whatsapp` as a channel type in the verifications API.
|
56
|
+
|
57
|
+
|
58
|
+
[2021-07-28] Version 5.57.1
|
59
|
+
---------------------------
|
60
|
+
**Conversations**
|
61
|
+
- Expose ParticipantConversations resource
|
62
|
+
|
63
|
+
**Taskrouter**
|
64
|
+
- Adding `links` to the activity resource
|
65
|
+
|
66
|
+
**Verify**
|
67
|
+
- Added a `Version` to Verify Factors `Webhooks` to add new fields without breaking old Webhooks.
|
68
|
+
|
69
|
+
|
70
|
+
[2021-07-14] Version 5.57.0
|
71
|
+
---------------------------
|
72
|
+
**Conversations**
|
73
|
+
- Changed `last_read_message_index` and `unread_messages_count` type in User Conversation's resource **(breaking change)**
|
74
|
+
- Expose UserConversations resource
|
75
|
+
|
76
|
+
**Messaging**
|
77
|
+
- Add brand_score field to brand registration responses
|
78
|
+
|
79
|
+
|
4
80
|
[2021-06-30] Version 5.56.0
|
5
81
|
---------------------------
|
6
82
|
**Library - Feature**
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -35,13 +35,13 @@ This library supports the following Ruby implementations:
|
|
35
35
|
To install using [Bundler][bundler] grab the latest stable version:
|
36
36
|
|
37
37
|
```ruby
|
38
|
-
gem 'twilio-ruby', '~> 5.
|
38
|
+
gem 'twilio-ruby', '~> 5.58.1'
|
39
39
|
```
|
40
40
|
|
41
41
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
42
42
|
|
43
43
|
```bash
|
44
|
-
gem install twilio-ruby -v 5.
|
44
|
+
gem install twilio-ruby -v 5.58.1
|
45
45
|
```
|
46
46
|
|
47
47
|
To build and install the development branch yourself from the latest source:
|
data/examples/examples.rb
CHANGED
@@ -69,7 +69,7 @@ puts @client.messages('SMXXXXXXXX').fetch.body
|
|
69
69
|
@client.messages.create(
|
70
70
|
from: '+14159341234',
|
71
71
|
to: '+16105557069',
|
72
|
-
|
72
|
+
media_url: 'http://example.com/media.png'
|
73
73
|
)
|
74
74
|
|
75
75
|
################ PHONE NUMBERS ################
|
@@ -151,6 +151,8 @@ module Twilio
|
|
151
151
|
# `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the
|
152
152
|
# audio that is received by Twilio. `outbound` records the audio that is generated
|
153
153
|
# from Twilio. `both` records the audio that is received and generated by Twilio.
|
154
|
+
# @param [String] time_limit The maximum duration of the call in seconds.
|
155
|
+
# Constraints depend on account and configuration.
|
154
156
|
# @param [String] url The absolute URL that returns the TwiML instructions for the
|
155
157
|
# call. We will call this URL using the `method` when the call connects. For more
|
156
158
|
# information, see the {Url
|
@@ -162,7 +164,7 @@ module Twilio
|
|
162
164
|
# @param [String] application_sid The SID of the Application resource that will
|
163
165
|
# handle the call, if the call will be handled by an application.
|
164
166
|
# @return [CallInstance] Created CallInstance
|
165
|
-
def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, call_token: :unset, recording_track: :unset, url: :unset, twiml: :unset, application_sid: :unset)
|
167
|
+
def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, call_token: :unset, recording_track: :unset, time_limit: :unset, url: :unset, twiml: :unset, application_sid: :unset)
|
166
168
|
data = Twilio::Values.of({
|
167
169
|
'To' => to,
|
168
170
|
'From' => from,
|
@@ -198,6 +200,7 @@ module Twilio
|
|
198
200
|
'CallReason' => call_reason,
|
199
201
|
'CallToken' => call_token,
|
200
202
|
'RecordingTrack' => recording_track,
|
203
|
+
'TimeLimit' => time_limit,
|
201
204
|
})
|
202
205
|
|
203
206
|
payload = @version.create('POST', @uri, data: data)
|
@@ -488,8 +491,10 @@ module Twilio
|
|
488
491
|
# `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
489
492
|
# @param [String] twiml TwiML instructions for the call Twilio will use without
|
490
493
|
# fetching Twiml from url. Twiml and url parameters are mutually exclusive
|
494
|
+
# @param [String] time_limit The maximum duration of the call in seconds.
|
495
|
+
# Constraints depend on account and configuration.
|
491
496
|
# @return [CallInstance] Updated CallInstance
|
492
|
-
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset)
|
497
|
+
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset, time_limit: :unset)
|
493
498
|
data = Twilio::Values.of({
|
494
499
|
'Url' => url,
|
495
500
|
'Method' => method,
|
@@ -499,6 +504,7 @@ module Twilio
|
|
499
504
|
'StatusCallback' => status_callback,
|
500
505
|
'StatusCallbackMethod' => status_callback_method,
|
501
506
|
'Twiml' => twiml,
|
507
|
+
'TimeLimit' => time_limit,
|
502
508
|
})
|
503
509
|
|
504
510
|
payload = @version.update('POST', @uri, data: data)
|
@@ -874,8 +880,10 @@ module Twilio
|
|
874
880
|
# `POST`. If an `application_sid` parameter is present, this parameter is ignored.
|
875
881
|
# @param [String] twiml TwiML instructions for the call Twilio will use without
|
876
882
|
# fetching Twiml from url. Twiml and url parameters are mutually exclusive
|
883
|
+
# @param [String] time_limit The maximum duration of the call in seconds.
|
884
|
+
# Constraints depend on account and configuration.
|
877
885
|
# @return [CallInstance] Updated CallInstance
|
878
|
-
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset)
|
886
|
+
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset, time_limit: :unset)
|
879
887
|
context.update(
|
880
888
|
url: url,
|
881
889
|
method: method,
|
@@ -885,6 +893,7 @@ module Twilio
|
|
885
893
|
status_callback: status_callback,
|
886
894
|
status_callback_method: status_callback_method,
|
887
895
|
twiml: twiml,
|
896
|
+
time_limit: time_limit,
|
888
897
|
)
|
889
898
|
end
|
890
899
|
|
@@ -167,8 +167,10 @@ module Twilio
|
|
167
167
|
# `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the
|
168
168
|
# audio that is received by Twilio. `outbound` records the audio that is sent from
|
169
169
|
# Twilio. `both` records the audio that is received and sent by Twilio.
|
170
|
+
# @param [String] time_limit The maximum duration of the call in seconds.
|
171
|
+
# Constraints depend on account and configuration.
|
170
172
|
# @return [ParticipantInstance] Created ParticipantInstance
|
171
|
-
def create(from: nil, to: nil, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, label: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_record: :unset, conference_trim: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, region: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, recording_status_callback_event: :unset, conference_recording_status_callback_event: :unset, coaching: :unset, call_sid_to_coach: :unset, jitter_buffer_size: :unset, byoc: :unset, caller_id: :unset, call_reason: :unset, recording_track: :unset)
|
173
|
+
def create(from: nil, to: nil, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, label: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_record: :unset, conference_trim: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, region: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, recording_status_callback_event: :unset, conference_recording_status_callback_event: :unset, coaching: :unset, call_sid_to_coach: :unset, jitter_buffer_size: :unset, byoc: :unset, caller_id: :unset, call_reason: :unset, recording_track: :unset, time_limit: :unset)
|
172
174
|
data = Twilio::Values.of({
|
173
175
|
'From' => from,
|
174
176
|
'To' => to,
|
@@ -208,6 +210,7 @@ module Twilio
|
|
208
210
|
'CallerId' => caller_id,
|
209
211
|
'CallReason' => call_reason,
|
210
212
|
'RecordingTrack' => recording_track,
|
213
|
+
'TimeLimit' => time_limit,
|
211
214
|
})
|
212
215
|
|
213
216
|
payload = @version.create('POST', @uri, data: data)
|
@@ -282,7 +282,7 @@ module Twilio
|
|
282
282
|
'start_time' => Twilio.deserialize_rfc2822(payload['start_time']),
|
283
283
|
'duration' => payload['duration'],
|
284
284
|
'sid' => payload['sid'],
|
285
|
-
'price' => payload['price']
|
285
|
+
'price' => payload['price'],
|
286
286
|
'price_unit' => payload['price_unit'],
|
287
287
|
'status' => payload['status'],
|
288
288
|
'channels' => payload['channels'].to_i,
|
@@ -19,8 +19,8 @@ module Twilio
|
|
19
19
|
# @param [Version] version Version that contains the resource
|
20
20
|
# @param [String] account_sid The unique id of the Account that is responsible for
|
21
21
|
# this resource.
|
22
|
-
# @param [String] domain_sid The unique string that
|
23
|
-
#
|
22
|
+
# @param [String] domain_sid The unique string that is created to identify the
|
23
|
+
# SipDomain resource.
|
24
24
|
# @return [CredentialListMappingList] CredentialListMappingList
|
25
25
|
def initialize(version, account_sid: nil, domain_sid: nil)
|
26
26
|
super(version)
|
@@ -233,8 +233,8 @@ module Twilio
|
|
233
233
|
# @param [Hash] payload payload that contains response from Twilio
|
234
234
|
# @param [String] account_sid The unique id of the Account that is responsible for
|
235
235
|
# this resource.
|
236
|
-
# @param [String] domain_sid The unique string that
|
237
|
-
#
|
236
|
+
# @param [String] domain_sid The unique string that is created to identify the
|
237
|
+
# SipDomain resource.
|
238
238
|
# @param [String] sid A 34 character string that uniquely identifies the resource
|
239
239
|
# to fetch.
|
240
240
|
# @return [CredentialListMappingInstance] CredentialListMappingInstance
|
@@ -246,10 +246,10 @@ module Twilio
|
|
246
246
|
'account_sid' => payload['account_sid'],
|
247
247
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
248
248
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
249
|
+
'domain_sid' => payload['domain_sid'],
|
249
250
|
'friendly_name' => payload['friendly_name'],
|
250
251
|
'sid' => payload['sid'],
|
251
252
|
'uri' => payload['uri'],
|
252
|
-
'subresource_uris' => payload['subresource_uris'],
|
253
253
|
}
|
254
254
|
|
255
255
|
# Context
|
@@ -295,6 +295,12 @@ module Twilio
|
|
295
295
|
@properties['date_updated']
|
296
296
|
end
|
297
297
|
|
298
|
+
##
|
299
|
+
# @return [String] The unique string that identifies the SipDomain resource.
|
300
|
+
def domain_sid
|
301
|
+
@properties['domain_sid']
|
302
|
+
end
|
303
|
+
|
298
304
|
##
|
299
305
|
# @return [String] A human readable descriptive text for this resource, up to 64 characters long.
|
300
306
|
def friendly_name
|
@@ -313,12 +319,6 @@ module Twilio
|
|
313
319
|
@properties['uri']
|
314
320
|
end
|
315
321
|
|
316
|
-
##
|
317
|
-
# @return [String] The credentials associated with this resource.
|
318
|
-
def subresource_uris
|
319
|
-
@properties['subresource_uris']
|
320
|
-
end
|
321
|
-
|
322
322
|
##
|
323
323
|
# Fetch the CredentialListMappingInstance
|
324
324
|
# @return [CredentialListMappingInstance] Fetched CredentialListMappingInstance
|
@@ -19,8 +19,8 @@ module Twilio
|
|
19
19
|
# @param [Version] version Version that contains the resource
|
20
20
|
# @param [String] account_sid The unique id of the Account that is responsible for
|
21
21
|
# this resource.
|
22
|
-
# @param [String] domain_sid The unique string that
|
23
|
-
#
|
22
|
+
# @param [String] domain_sid The unique string that is created to identify the
|
23
|
+
# SipDomain resource.
|
24
24
|
# @return [IpAccessControlListMappingList] IpAccessControlListMappingList
|
25
25
|
def initialize(version, account_sid: nil, domain_sid: nil)
|
26
26
|
super(version)
|
@@ -232,8 +232,8 @@ module Twilio
|
|
232
232
|
# @param [Hash] payload payload that contains response from Twilio
|
233
233
|
# @param [String] account_sid The unique id of the Account that is responsible for
|
234
234
|
# this resource.
|
235
|
-
# @param [String] domain_sid The unique string that
|
236
|
-
#
|
235
|
+
# @param [String] domain_sid The unique string that is created to identify the
|
236
|
+
# SipDomain resource.
|
237
237
|
# @param [String] sid A 34 character string that uniquely identifies the resource
|
238
238
|
# to fetch.
|
239
239
|
# @return [IpAccessControlListMappingInstance] IpAccessControlListMappingInstance
|
@@ -245,10 +245,10 @@ module Twilio
|
|
245
245
|
'account_sid' => payload['account_sid'],
|
246
246
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
247
247
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
248
|
+
'domain_sid' => payload['domain_sid'],
|
248
249
|
'friendly_name' => payload['friendly_name'],
|
249
250
|
'sid' => payload['sid'],
|
250
251
|
'uri' => payload['uri'],
|
251
|
-
'subresource_uris' => payload['subresource_uris'],
|
252
252
|
}
|
253
253
|
|
254
254
|
# Context
|
@@ -294,6 +294,12 @@ module Twilio
|
|
294
294
|
@properties['date_updated']
|
295
295
|
end
|
296
296
|
|
297
|
+
##
|
298
|
+
# @return [String] The unique string that identifies the SipDomain resource.
|
299
|
+
def domain_sid
|
300
|
+
@properties['domain_sid']
|
301
|
+
end
|
302
|
+
|
297
303
|
##
|
298
304
|
# @return [String] A human readable descriptive text for this resource, up to 64 characters long.
|
299
305
|
def friendly_name
|
@@ -312,12 +318,6 @@ module Twilio
|
|
312
318
|
@properties['uri']
|
313
319
|
end
|
314
320
|
|
315
|
-
##
|
316
|
-
# @return [String] The list of IP addresses associated with this domain.
|
317
|
-
def subresource_uris
|
318
|
-
@properties['subresource_uris']
|
319
|
-
end
|
320
|
-
|
321
321
|
##
|
322
322
|
# Fetch the IpAccessControlListMappingInstance
|
323
323
|
# @return [IpAccessControlListMappingInstance] Fetched IpAccessControlListMappingInstance
|
@@ -63,6 +63,8 @@ module Twilio
|
|
63
63
|
# Lists MessageInstance records from the API as a list.
|
64
64
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
65
65
|
# memory before returning.
|
66
|
+
# @param [message.OrderType] order The sort order of the returned messages. Can
|
67
|
+
# be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
|
66
68
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
67
69
|
# guarantees to never return more than limit. Default is no limit
|
68
70
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -70,14 +72,16 @@ module Twilio
|
|
70
72
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
71
73
|
# efficient page size, i.e. min(limit, 1000)
|
72
74
|
# @return [Array] Array of up to limit results
|
73
|
-
def list(limit: nil, page_size: nil)
|
74
|
-
self.stream(limit: limit, page_size: page_size).entries
|
75
|
+
def list(order: :unset, limit: nil, page_size: nil)
|
76
|
+
self.stream(order: order, limit: limit, page_size: page_size).entries
|
75
77
|
end
|
76
78
|
|
77
79
|
##
|
78
80
|
# Streams MessageInstance records from the API as an Enumerable.
|
79
81
|
# This operation lazily loads records as efficiently as possible until the limit
|
80
82
|
# is reached.
|
83
|
+
# @param [message.OrderType] order The sort order of the returned messages. Can
|
84
|
+
# be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
|
81
85
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
82
86
|
# guarantees to never return more than limit. Default is no limit.
|
83
87
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -85,10 +89,10 @@ module Twilio
|
|
85
89
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
86
90
|
# efficient page size, i.e. min(limit, 1000)
|
87
91
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
88
|
-
def stream(limit: nil, page_size: nil)
|
92
|
+
def stream(order: :unset, limit: nil, page_size: nil)
|
89
93
|
limits = @version.read_limits(limit, page_size)
|
90
94
|
|
91
|
-
page = self.page(page_size: limits[:page_size], )
|
95
|
+
page = self.page(order: order, page_size: limits[:page_size], )
|
92
96
|
|
93
97
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
94
98
|
end
|
@@ -110,12 +114,15 @@ module Twilio
|
|
110
114
|
##
|
111
115
|
# Retrieve a single page of MessageInstance records from the API.
|
112
116
|
# Request is executed immediately.
|
117
|
+
# @param [message.OrderType] order The sort order of the returned messages. Can
|
118
|
+
# be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
|
113
119
|
# @param [String] page_token PageToken provided by the API
|
114
120
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
115
121
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
116
122
|
# @return [Page] Page of MessageInstance
|
117
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
123
|
+
def page(order: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
118
124
|
params = Twilio::Values.of({
|
125
|
+
'Order' => order,
|
119
126
|
'PageToken' => page_token,
|
120
127
|
'Page' => page_number,
|
121
128
|
'PageSize' => page_size,
|