twilio-ruby 5.18.0 → 5.19.0

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.
Files changed (57) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +0 -4
  3. data/CHANGES.md +20 -0
  4. data/LICENSE.md +1 -1
  5. data/README.md +2 -2
  6. data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +21 -13
  7. data/lib/twilio-ruby/rest/accounts/v1/credential.rb +2 -1
  8. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +4 -4
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +6 -6
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +80 -70
  11. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +204 -196
  12. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +59 -53
  13. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +69 -61
  14. data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +30 -25
  15. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +28 -16
  16. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +31 -20
  17. data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +54 -50
  18. data/lib/twilio-ruby/rest/api.rb +7 -6
  19. data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
  20. data/lib/twilio-ruby/rest/authy.rb +8 -8
  21. data/lib/twilio-ruby/rest/client.rb +14 -6
  22. data/lib/twilio-ruby/rest/insights/v1/summary.rb +286 -0
  23. data/lib/twilio-ruby/rest/insights/v1.rb +43 -0
  24. data/lib/twilio-ruby/rest/insights.rb +46 -0
  25. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +22 -14
  26. data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
  27. data/lib/twilio-ruby/rest/preview.rb +8 -8
  28. data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +5 -28
  29. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +5 -9
  30. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -13
  31. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +1 -1
  32. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -1
  33. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +4 -2
  34. data/lib/twilio-ruby/rest/trunking/v1.rb +2 -1
  35. data/lib/twilio-ruby/rest/verify/v1/service/verification.rb +7 -0
  36. data/lib/twilio-ruby/rest/verify/v1/service/verification_check.rb +7 -4
  37. data/lib/twilio-ruby/rest/video/v1/composition.rb +25 -13
  38. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +69 -74
  39. data/lib/twilio-ruby/rest/video/v1/recording.rb +13 -7
  40. data/lib/twilio-ruby/rest/video/v1.rb +16 -16
  41. data/lib/twilio-ruby/rest/video.rb +9 -9
  42. data/lib/twilio-ruby/rest/voice/v1/voice_permission/bulk_country_update.rb +3 -3
  43. data/lib/twilio-ruby/rest/voice/v1/voice_permission/country/highrisk_special_prefix.rb +2 -2
  44. data/lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb +20 -20
  45. data/lib/twilio-ruby/version.rb +1 -1
  46. data/spec/integration/api/v2010/account/sip/domain_spec.rb +8 -4
  47. data/spec/integration/insights/v1/summary_spec.rb +60 -0
  48. data/spec/integration/proxy/v1/service/phone_number_spec.rb +2 -2
  49. data/spec/integration/proxy/v1/service/session/interaction_spec.rb +1 -1
  50. data/spec/integration/proxy/v1/service/session/participant/message_interaction_spec.rb +2 -2
  51. data/spec/integration/proxy/v1/service/session/participant_spec.rb +66 -4
  52. data/spec/integration/proxy/v1/service/session_spec.rb +8 -8
  53. data/spec/integration/proxy/v1/service_spec.rb +3 -3
  54. data/spec/integration/trunking/v1/trunk_spec.rb +80 -0
  55. data/spec/integration/verify/v1/service/verification_spec.rb +10 -1
  56. data/twilio-ruby.gemspec +1 -2
  57. metadata +16 -6
@@ -31,14 +31,14 @@ describe 'Session' do
31
31
  %q[
32
32
  {
33
33
  "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34
- "status": "in-progress",
35
- "unique_name": "unique_name",
34
+ "status": "open",
35
+ "unique_name": "Order #1234",
36
36
  "date_started": "2015-07-30T20:00:00Z",
37
37
  "date_ended": "2015-07-30T20:00:00Z",
38
38
  "date_last_interaction": "2015-07-30T20:00:00Z",
39
39
  "date_expiry": "2015-07-30T20:00:00Z",
40
40
  "ttl": 3600,
41
- "mode": "message-only",
41
+ "mode": "voice-and-message",
42
42
  "closed_reason": "",
43
43
  "sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
44
44
  "date_updated": "2015-07-30T20:00:00Z",
@@ -122,14 +122,14 @@ describe 'Session' do
122
122
  %q[
123
123
  {
124
124
  "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
125
- "status": "in-progress",
126
- "unique_name": "unique_name",
125
+ "status": "open",
126
+ "unique_name": "Order #1234",
127
127
  "date_started": "2015-07-30T20:00:00Z",
128
128
  "date_ended": "2015-07-30T20:00:00Z",
129
129
  "date_last_interaction": "2015-07-30T20:00:00Z",
130
130
  "date_expiry": "2015-07-30T20:00:00Z",
131
131
  "ttl": 3600,
132
- "mode": "message-only",
132
+ "mode": "voice-and-message",
133
133
  "closed_reason": "",
134
134
  "sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
135
135
  "date_updated": "2015-07-30T20:00:00Z",
@@ -201,13 +201,13 @@ describe 'Session' do
201
201
  {
202
202
  "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
203
203
  "status": "in-progress",
204
- "unique_name": "unique_name",
204
+ "unique_name": "Order #1234",
205
205
  "date_started": "2015-07-30T20:00:00Z",
206
206
  "date_ended": "2015-07-30T20:00:00Z",
207
207
  "date_last_interaction": "2015-07-30T20:00:00Z",
208
208
  "date_expiry": "2015-07-30T20:00:00Z",
209
209
  "ttl": 3600,
210
- "mode": "message-only",
210
+ "mode": "voice-and-message",
211
211
  "closed_reason": "",
212
212
  "sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
213
213
  "date_updated": "2015-07-30T20:00:00Z",
@@ -32,7 +32,7 @@ describe 'Service' do
32
32
  "sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
33
33
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34
34
  "chat_instance_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35
- "unique_name": "unique_name",
35
+ "unique_name": "My Service",
36
36
  "default_ttl": 3600,
37
37
  "callback_url": "http://www.example.com",
38
38
  "geo_match_level": "country",
@@ -119,7 +119,7 @@ describe 'Service' do
119
119
  "sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
120
120
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
121
121
  "chat_instance_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
122
- "unique_name": "unique_name",
122
+ "unique_name": "My Service",
123
123
  "default_ttl": 3600,
124
124
  "callback_url": "http://www.example.com",
125
125
  "geo_match_level": "country",
@@ -192,7 +192,7 @@ describe 'Service' do
192
192
  "sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
193
193
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
194
194
  "chat_instance_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
195
- "unique_name": "unique_name",
195
+ "unique_name": "My Service",
196
196
  "default_ttl": 3600,
197
197
  "callback_url": "http://www.example.com",
198
198
  "geo_match_level": "country",
@@ -43,6 +43,7 @@ describe 'Trunk' do
43
43
  },
44
44
  "auth_type": "",
45
45
  "auth_type_set": [],
46
+ "origination_from_domain_sid": "SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
46
47
  "date_created": "2015-01-02T11:23:45Z",
47
48
  "date_updated": "2015-01-02T11:23:45Z",
48
49
  "url": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -121,6 +122,7 @@ describe 'Trunk' do
121
122
  },
122
123
  "auth_type": "",
123
124
  "auth_type_set": [],
125
+ "origination_from_domain_sid": "SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
124
126
  "date_created": "2015-01-02T11:23:45Z",
125
127
  "date_updated": "2015-01-02T11:23:45Z",
126
128
  "url": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -184,6 +186,7 @@ describe 'Trunk' do
184
186
  },
185
187
  "auth_type": "",
186
188
  "auth_type_set": [],
189
+ "origination_from_domain_sid": "SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
187
190
  "date_created": "2015-01-02T11:23:45Z",
188
191
  "date_updated": "2015-01-02T11:23:45Z",
189
192
  "url": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -262,6 +265,83 @@ describe 'Trunk' do
262
265
  },
263
266
  "auth_type": "",
264
267
  "auth_type_set": [],
268
+ "origination_from_domain_sid": null,
269
+ "date_created": "2015-01-02T11:23:45Z",
270
+ "date_updated": "2015-01-02T11:23:45Z",
271
+ "url": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
272
+ "links": {
273
+ "origination_urls": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls",
274
+ "credential_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists",
275
+ "ip_access_control_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists",
276
+ "phone_numbers": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers"
277
+ }
278
+ }
279
+ ]
280
+ ))
281
+
282
+ actual = @client.trunking.v1.trunks('TRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
283
+
284
+ expect(actual).to_not eq(nil)
285
+ end
286
+
287
+ it "receives update_set_from_domain responses" do
288
+ @holodeck.mock(Twilio::Response.new(
289
+ 200,
290
+ %q[
291
+ {
292
+ "sid": "TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
293
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
294
+ "domain_name": "test.pstn.twilio.com",
295
+ "disaster_recovery_method": "GET",
296
+ "disaster_recovery_url": "http://updated-recovery.com",
297
+ "friendly_name": "updated_name",
298
+ "secure": true,
299
+ "cnam_lookup_enabled": true,
300
+ "recording": {
301
+ "mode": "do-not-record",
302
+ "trim": "do-not-trim"
303
+ },
304
+ "auth_type": "",
305
+ "auth_type_set": [],
306
+ "origination_from_domain_sid": "SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
307
+ "date_created": "2015-01-02T11:23:45Z",
308
+ "date_updated": "2015-01-02T11:23:45Z",
309
+ "url": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
310
+ "links": {
311
+ "origination_urls": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls",
312
+ "credential_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists",
313
+ "ip_access_control_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists",
314
+ "phone_numbers": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers"
315
+ }
316
+ }
317
+ ]
318
+ ))
319
+
320
+ actual = @client.trunking.v1.trunks('TRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
321
+
322
+ expect(actual).to_not eq(nil)
323
+ end
324
+
325
+ it "receives update_clear_from_domain responses" do
326
+ @holodeck.mock(Twilio::Response.new(
327
+ 200,
328
+ %q[
329
+ {
330
+ "sid": "TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
331
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
332
+ "domain_name": "test.pstn.twilio.com",
333
+ "disaster_recovery_method": "GET",
334
+ "disaster_recovery_url": "http://updated-recovery.com",
335
+ "friendly_name": "updated_name",
336
+ "secure": true,
337
+ "cnam_lookup_enabled": true,
338
+ "recording": {
339
+ "mode": "do-not-record",
340
+ "trim": "do-not-trim"
341
+ },
342
+ "auth_type": "",
343
+ "auth_type_set": [],
344
+ "origination_from_domain_sid": null,
265
345
  "date_created": "2015-01-02T11:23:45Z",
266
346
  "date_updated": "2015-01-02T11:23:45Z",
267
347
  "url": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -39,7 +39,16 @@ describe 'Verification' do
39
39
  "status": "pending",
40
40
  "valid": null,
41
41
  "date_created": "2015-07-30T20:00:00Z",
42
- "date_updated": "2015-07-30T20:00:00Z"
42
+ "date_updated": "2015-07-30T20:00:00Z",
43
+ "lookup": {
44
+ "carrier": {
45
+ "error_code": null,
46
+ "name": "Carrier Name",
47
+ "mobile_country_code": "310",
48
+ "mobile_network_code": "150",
49
+ "type": "mobile"
50
+ }
51
+ }
43
52
  }
44
53
  ]
45
54
  ))
data/twilio-ruby.gemspec CHANGED
@@ -27,11 +27,10 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency('jwt', '>= 1.5', '<= 2.5')
28
28
  spec.add_dependency('nokogiri', '>= 1.6', '< 2.0')
29
29
  spec.add_dependency('faraday', '~>0.9')
30
- spec.add_dependency('jruby-openssl', '>= 0.9.6') if RUBY_PLATFORM == 'java'
31
30
  # Workaround for RBX <= 2.2.1, should be fixed in next version
32
31
  spec.add_dependency('rubysl') if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
33
32
 
34
- spec.add_development_dependency 'bundler', '~> 1.5'
33
+ spec.add_development_dependency 'bundler', '>= 1.5', '< 3.0'
35
34
  spec.add_development_dependency 'rubocop', '~> 0.49.1'
36
35
  spec.add_development_dependency 'yard', '~> 0.9.9'
37
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.18.0
4
+ version: 5.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twilio API Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-17 00:00:00.000000000 Z
11
+ date: 2019-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -68,16 +68,22 @@ dependencies:
68
68
  name: bundler
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - "~>"
71
+ - - ">="
72
72
  - !ruby/object:Gem::Version
73
73
  version: '1.5'
74
+ - - "<"
75
+ - !ruby/object:Gem::Version
76
+ version: '3.0'
74
77
  type: :development
75
78
  prerelease: false
76
79
  version_requirements: !ruby/object:Gem::Requirement
77
80
  requirements:
78
- - - "~>"
81
+ - - ">="
79
82
  - !ruby/object:Gem::Version
80
83
  version: '1.5'
84
+ - - "<"
85
+ - !ruby/object:Gem::Version
86
+ version: '3.0'
81
87
  - !ruby/object:Gem::Dependency
82
88
  name: rubocop
83
89
  requirement: !ruby/object:Gem::Requirement
@@ -286,6 +292,9 @@ files:
286
292
  - lib/twilio-ruby/rest/fax/v1.rb
287
293
  - lib/twilio-ruby/rest/fax/v1/fax.rb
288
294
  - lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb
295
+ - lib/twilio-ruby/rest/insights.rb
296
+ - lib/twilio-ruby/rest/insights/v1.rb
297
+ - lib/twilio-ruby/rest/insights/v1/summary.rb
289
298
  - lib/twilio-ruby/rest/ip_messaging.rb
290
299
  - lib/twilio-ruby/rest/ip_messaging/v1.rb
291
300
  - lib/twilio-ruby/rest/ip_messaging/v1/credential.rb
@@ -623,6 +632,7 @@ files:
623
632
  - spec/integration/chat/v2/service_spec.rb
624
633
  - spec/integration/fax/v1/fax/fax_media_spec.rb
625
634
  - spec/integration/fax/v1/fax_spec.rb
635
+ - spec/integration/insights/v1/summary_spec.rb
626
636
  - spec/integration/ip_messaging/v1/credential_spec.rb
627
637
  - spec/integration/ip_messaging/v1/service/channel/invite_spec.rb
628
638
  - spec/integration/ip_messaging/v1/service/channel/member_spec.rb
@@ -829,8 +839,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
829
839
  - !ruby/object:Gem::Version
830
840
  version: '0'
831
841
  requirements: []
832
- rubyforge_project:
833
- rubygems_version: 2.5.2.3
842
+ rubygems_version: 3.0.1
834
843
  signing_key:
835
844
  specification_version: 4
836
845
  summary: The official library for communicating with the Twilio REST API, building
@@ -958,6 +967,7 @@ test_files:
958
967
  - spec/integration/chat/v2/service_spec.rb
959
968
  - spec/integration/fax/v1/fax/fax_media_spec.rb
960
969
  - spec/integration/fax/v1/fax_spec.rb
970
+ - spec/integration/insights/v1/summary_spec.rb
961
971
  - spec/integration/ip_messaging/v1/credential_spec.rb
962
972
  - spec/integration/ip_messaging/v1/service/channel/invite_spec.rb
963
973
  - spec/integration/ip_messaging/v1/service/channel/member_spec.rb