twilio-ruby 5.57.1 → 5.58.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.travis.yml +24 -7
  4. data/CHANGES.md +83 -0
  5. data/Gemfile +1 -0
  6. data/README.md +2 -2
  7. data/examples/examples.rb +1 -1
  8. data/lib/twilio-ruby/http/http_client.rb +1 -1
  9. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +12 -3
  10. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +4 -1
  11. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
  12. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -11
  13. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -11
  14. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +12 -5
  15. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +12 -5
  16. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +434 -0
  17. data/lib/twilio-ruby/rest/insights/v1.rb +7 -0
  18. data/lib/twilio-ruby/rest/insights.rb +6 -0
  19. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +54 -1
  20. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +9 -2
  21. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +6 -2
  22. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +19 -14
  23. data/lib/twilio-ruby/rest/pricing/v2/country.rb +280 -0
  24. data/lib/twilio-ruby/rest/pricing/v2/number.rb +225 -0
  25. data/lib/twilio-ruby/rest/pricing/v2.rb +37 -0
  26. data/lib/twilio-ruby/rest/pricing.rb +19 -0
  27. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +30 -20
  28. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +6 -2
  29. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +36 -11
  30. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +11 -9
  31. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +8 -8
  32. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +7 -3
  33. data/lib/twilio-ruby/rest/verify/v2/verification_template.rb +206 -0
  34. data/lib/twilio-ruby/rest/verify/v2.rb +7 -0
  35. data/lib/twilio-ruby/rest/verify.rb +6 -0
  36. data/lib/twilio-ruby/version.rb +1 -1
  37. data/sonar-project.properties +13 -0
  38. metadata +7 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56ba46ce32ceced608bcb6b1ab335f0aa103da6d3a40dba1e0a59b97734fe4f7
4
- data.tar.gz: 4104e0a452f0760f38a5ef1429553ad9a5f92c33a314e57d8f6e25c1689ada84
3
+ metadata.gz: e167e2f47babb9e5652b385ede76e80463adea6014e4f9792128e33404760e5c
4
+ data.tar.gz: 957a9a74c168c72927875320f8217d7c596b0d90a65dab5ed5ce5c2dd65862b9
5
5
  SHA512:
6
- metadata.gz: 0d3edfca4bae4bad789f6ef2e5f15a161c115bb625e6a0912049c8f6054b05c40d4e41dd19544072be75a0e4f6d69f1b23fa41f3e8b3bee2453843f370c8c658
7
- data.tar.gz: 294073c071626bd889f211b66d16f0f896c6e127d524385b9d8989684eced0d63cdd1b6d456537f9ccc78e8b2a71b45dfdb1b14ec4a86c1f3b90413a0f4c588b
6
+ metadata.gz: 43aef4541bc88db9f74877d012a55fc052891051ccbdc9360357af66c876cd11d2e48398fbf6ea617513a40f6f2f9bc721da6345c01971007b6484a06346046c
7
+ data.tar.gz: a099337f9ae57f2954bab11add9d43a29773ac77f3429f693a6f7845fdf5099147f1d2c1423dccc7d01e302f66e7ea2c86bb2f17c0fd35400fdb70533da1f66d
data/.gitignore CHANGED
@@ -12,3 +12,5 @@ bin
12
12
  docs/_build
13
13
  *.bak
14
14
  *.iml
15
+
16
+ coverage
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: make test
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: echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin && make docker-build && make docker-push
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,89 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2021-09-22] Version 5.58.3
5
+ ---------------------------
6
+ **Events**
7
+ - Add segment sink
8
+
9
+ **Messaging**
10
+ - Add post_approval_required attribute in GET us_app_to_person_usecase api response
11
+ - Add Identity Status, Russell 3000, Tax Exempt Status and Should Skip SecVet fields for Brand Registrations
12
+ - Add Should Skip Secondary Vetting optional flag parameter to create Brand API
13
+
14
+
15
+ [2021-09-08] Version 5.58.2
16
+ ---------------------------
17
+ **Library - Fix**
18
+ - [PR #568](https://github.com/twilio/twilio-ruby/pull/568): deprecation warning on Faraday. Thanks to [@ngouy](https://github.com/ngouy)!
19
+
20
+ **Api**
21
+ - Revert adding `siprec` resource
22
+ - Add `siprec` resource
23
+
24
+ **Messaging**
25
+ - Add 'mock' as an optional field to brand_registration api
26
+ - Add 'mock' as an optional field to us_app_to_person api
27
+ - Adds more Use Cases in us_app_to_person_usecase api transaction and updates us_app_to_person_usecase docs
28
+
29
+ **Verify**
30
+ - Verify List Templates API endpoint added.
31
+
32
+
33
+ [2021-08-25] Version 5.58.1
34
+ ---------------------------
35
+ **Api**
36
+ - Add Programmabled Voice SIP Refer call transfers (`calls-transfers`) to usage records
37
+ - Add Flex Voice Usage category (`flex-usage`) to usage records
38
+
39
+ **Conversations**
40
+ - Add `Order` query parameter to Message resource read operation
41
+
42
+ **Insights**
43
+ - Added `partial` to enum processing_state_request
44
+ - Added abnormal session filter in Call Summaries
45
+
46
+ **Messaging**
47
+ - Add brand_registration_sid as an optional query param for us_app_to_person_usecase api
48
+
49
+ **Pricing**
50
+ - add trunking_numbers resource (v2)
51
+ - add trunking_country resource (v2)
52
+
53
+ **Verify**
54
+ - Changed to private beta the `TemplateSid` optional parameter on Verification creation.
55
+ - Added the optional parameter `Order` to the list Challenges endpoint to define the list order.
56
+
57
+
58
+ [2021-08-11] Version 5.58.0
59
+ ---------------------------
60
+ **Library - Chore**
61
+ - [PR #566](https://github.com/twilio/twilio-ruby/pull/566): integrate sonarcloud. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!
62
+
63
+ **Library - Docs**
64
+ - [PR #565](https://github.com/twilio/twilio-ruby/pull/565): update mms example to use media_url. Thanks to [@cnorm35](https://github.com/cnorm35)!
65
+
66
+ **Api**
67
+ - Corrected the `price`, `call_sid_to_coach`, and `uri` data types for Conference, Participant, and Recording **(breaking change)**
68
+ - Made documentation for property `time_limit` in the call api public. **(breaking change)**
69
+ - Added `domain_sid` in sip_credential_list_mapping and sip_ip_access_control_list_mapping APIs **(breaking change)**
70
+
71
+ **Insights**
72
+ - Added new endpoint to fetch Call Summaries
73
+
74
+ **Messaging**
75
+ - Add brand_type field to a2p brand_registration api
76
+ - Revert brand registration api update to add brand_type field
77
+ - Add brand_type field to a2p brand_registration api
78
+
79
+ **Taskrouter**
80
+ - Add `X-Rate-Limit-Limit`, `X-Rate-Limit-Remaining`, and `X-Rate-Limit-Config` as Response Headers to all TaskRouter endpoints
81
+
82
+ **Verify**
83
+ - Add `TemplateSid` optional parameter on Verification creation.
84
+ - Include `whatsapp` as a channel type in the verifications API.
85
+
86
+
4
87
  [2021-07-28] Version 5.57.1
5
88
  ---------------------------
6
89
  **Conversations**
data/Gemfile CHANGED
@@ -1,2 +1,3 @@
1
1
  source 'https://rubygems.org'
2
+ gem 'simplecov', require: false, group: :test
2
3
  gemspec
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.57.1'
38
+ gem 'twilio-ruby', '~> 5.58.3'
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.57.1
44
+ gem install twilio-ruby -v 5.58.3
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
- media_urls: 'http://example.com/media.png'
72
+ media_url: 'http://example.com/media.png'
73
73
  )
74
74
 
75
75
  ################ PHONE NUMBERS ################
@@ -31,7 +31,7 @@ module Twilio
31
31
  f.options.params_encoder = Faraday::FlatParamsEncoder
32
32
  f.request :url_encoded
33
33
  f.headers = request.headers
34
- f.basic_auth(request.auth[0], request.auth[1])
34
+ f.request(:basic_auth, request.auth[0], request.auth[1])
35
35
  f.proxy = "#{@proxy_prot}://#{@proxy_auth}#{@proxy_path}" if @proxy_prot && @proxy_path
36
36
  f.options.open_timeout = request.timeout || @timeout
37
37
  f.options.timeout = request.timeout || @timeout
@@ -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'].to_f,
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 that we created to identify
23
- # the SipDomain resource.
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 that we created to identify
237
- # the SipDomain resource.
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 that we created to identify
23
- # the SipDomain resource.
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 that we created to identify
236
- # the SipDomain resource.
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,
@@ -72,6 +72,8 @@ module Twilio
72
72
  # Lists MessageInstance records from the API as a list.
73
73
  # Unlike stream(), this operation is eager and will load `limit` records into
74
74
  # memory before returning.
75
+ # @param [message.OrderType] order The sort order of the returned messages. Can
76
+ # be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
75
77
  # @param [Integer] limit Upper limit for the number of records to return. stream()
76
78
  # guarantees to never return more than limit. Default is no limit
77
79
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -79,14 +81,16 @@ module Twilio
79
81
  # but a limit is defined, stream() will attempt to read the limit with the most
80
82
  # efficient page size, i.e. min(limit, 1000)
81
83
  # @return [Array] Array of up to limit results
82
- def list(limit: nil, page_size: nil)
83
- self.stream(limit: limit, page_size: page_size).entries
84
+ def list(order: :unset, limit: nil, page_size: nil)
85
+ self.stream(order: order, limit: limit, page_size: page_size).entries
84
86
  end
85
87
 
86
88
  ##
87
89
  # Streams MessageInstance records from the API as an Enumerable.
88
90
  # This operation lazily loads records as efficiently as possible until the limit
89
91
  # is reached.
92
+ # @param [message.OrderType] order The sort order of the returned messages. Can
93
+ # be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
90
94
  # @param [Integer] limit Upper limit for the number of records to return. stream()
91
95
  # guarantees to never return more than limit. Default is no limit.
92
96
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -94,10 +98,10 @@ module Twilio
94
98
  # but a limit is defined, stream() will attempt to read the limit with the most
95
99
  # efficient page size, i.e. min(limit, 1000)
96
100
  # @return [Enumerable] Enumerable that will yield up to limit results
97
- def stream(limit: nil, page_size: nil)
101
+ def stream(order: :unset, limit: nil, page_size: nil)
98
102
  limits = @version.read_limits(limit, page_size)
99
103
 
100
- page = self.page(page_size: limits[:page_size], )
104
+ page = self.page(order: order, page_size: limits[:page_size], )
101
105
 
102
106
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
103
107
  end
@@ -119,12 +123,15 @@ module Twilio
119
123
  ##
120
124
  # Retrieve a single page of MessageInstance records from the API.
121
125
  # Request is executed immediately.
126
+ # @param [message.OrderType] order The sort order of the returned messages. Can
127
+ # be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
122
128
  # @param [String] page_token PageToken provided by the API
123
129
  # @param [Integer] page_number Page Number, this value is simply for client state
124
130
  # @param [Integer] page_size Number of records to return, defaults to 50
125
131
  # @return [Page] Page of MessageInstance
126
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
132
+ def page(order: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
127
133
  params = Twilio::Values.of({
134
+ 'Order' => order,
128
135
  'PageToken' => page_token,
129
136
  'Page' => page_number,
130
137
  'PageSize' => page_size,