twilio-ruby 5.41.0 → 5.45.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +99 -0
  3. data/{LICENSE.md → LICENSE} +0 -0
  4. data/PULL_REQUEST_TEMPLATE.md +3 -3
  5. data/README.md +18 -2
  6. data/lib/twilio-ruby.rb +1 -1
  7. data/lib/twilio-ruby/jwt/access_token.rb +7 -2
  8. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -1
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +201 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +13 -1
  11. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +6 -1
  12. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +5 -22
  13. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +25 -40
  14. data/lib/twilio-ruby/rest/client.rb +29 -3
  15. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +32 -2
  16. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +17 -2
  17. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +32 -2
  18. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +8 -1
  19. data/lib/twilio-ruby/rest/conversations/v1/user.rb +8 -1
  20. data/lib/twilio-ruby/rest/events/v1/subscription.rb +12 -5
  21. data/lib/twilio-ruby/rest/flex_api.rb +1 -1
  22. data/lib/twilio-ruby/rest/flex_api/v1.rb +1 -1
  23. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +5 -5
  24. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +88 -76
  25. data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +2 -2
  26. data/lib/twilio-ruby/rest/insights.rb +8 -0
  27. data/lib/twilio-ruby/rest/insights/v1.rb +15 -0
  28. data/lib/twilio-ruby/rest/insights/v1/room.rb +487 -0
  29. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +378 -0
  30. data/lib/twilio-ruby/rest/ip_messaging.rb +8 -10
  31. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +6 -8
  32. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +29 -68
  33. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +198 -313
  34. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +32 -59
  35. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +23 -55
  36. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +28 -71
  37. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +31 -59
  38. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +19 -39
  39. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +29 -51
  40. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +12 -18
  41. data/lib/twilio-ruby/rest/ip_messaging/v2.rb +6 -6
  42. data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +29 -66
  43. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +116 -205
  44. data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +23 -50
  45. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +41 -91
  46. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +23 -50
  47. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +42 -118
  48. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +46 -100
  49. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +36 -89
  50. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +19 -41
  51. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +29 -53
  52. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +23 -53
  53. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +27 -56
  54. data/lib/twilio-ruby/rest/preview.rb +0 -21
  55. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +5 -22
  56. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +21 -39
  57. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -30
  58. data/lib/twilio-ruby/rest/serverless/v1/service.rb +5 -5
  59. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +4 -4
  60. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +4 -4
  61. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +4 -4
  62. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +4 -4
  63. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +4 -4
  64. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -4
  65. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +4 -4
  66. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +4 -4
  67. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
  68. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +4 -4
  69. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +4 -4
  70. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +15 -5
  71. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +15 -5
  72. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +28 -5
  73. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +15 -5
  74. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +28 -5
  75. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +15 -5
  76. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +12 -9
  77. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +16 -16
  78. data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +21 -24
  79. data/lib/twilio-ruby/rest/verify/v2/form.rb +4 -4
  80. data/lib/twilio-ruby/rest/verify/v2/service.rb +3 -3
  81. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +3 -3
  82. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +23 -35
  83. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +27 -49
  84. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +24 -42
  85. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +4 -4
  86. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +6 -6
  87. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +6 -6
  88. data/lib/twilio-ruby/rest/video/v1/room.rb +20 -0
  89. data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +150 -0
  90. data/lib/twilio-ruby/twiml/voice_response.rb +8 -4
  91. data/lib/twilio-ruby/util/configuration.rb +5 -1
  92. data/lib/twilio-ruby/version.rb +1 -1
  93. data/spec/integration/api/v2010/account/call/event_spec.rb +102 -0
  94. data/spec/integration/api/v2010/account/call/recording_spec.rb +4 -0
  95. data/spec/integration/api/v2010/account/call_spec.rb +20 -10
  96. data/spec/integration/api/v2010/account/conference/participant_spec.rb +30 -0
  97. data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +4 -2
  98. data/spec/integration/conversations/v1/conversation/participant_spec.rb +30 -10
  99. data/spec/integration/conversations/v1/service/configuration_spec.rb +2 -0
  100. data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +30 -10
  101. data/spec/integration/conversations/v1/service/user_spec.rb +9 -4
  102. data/spec/integration/conversations/v1/user_spec.rb +9 -4
  103. data/spec/integration/events/v1/sink/sink_test_spec.rb +1 -1
  104. data/spec/integration/events/v1/subscription_spec.rb +49 -0
  105. data/spec/integration/insights/v1/room/participant_spec.rb +147 -0
  106. data/spec/integration/insights/v1/room_spec.rb +164 -0
  107. data/spec/integration/ip_messaging/v1/credential_spec.rb +13 -13
  108. data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +11 -11
  109. data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +14 -14
  110. data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +14 -14
  111. data/spec/integration/ip_messaging/v1/service/channel_spec.rb +25 -25
  112. data/spec/integration/ip_messaging/v1/service/role_spec.rb +13 -13
  113. data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +7 -7
  114. data/spec/integration/ip_messaging/v1/service/user_spec.rb +17 -17
  115. data/spec/integration/ip_messaging/v1/service_spec.rb +9 -9
  116. data/spec/integration/ip_messaging/v2/credential_spec.rb +13 -13
  117. data/spec/integration/ip_messaging/v2/service/binding_spec.rb +11 -11
  118. data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +11 -11
  119. data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +13 -13
  120. data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +17 -17
  121. data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +15 -15
  122. data/spec/integration/ip_messaging/v2/service/channel_spec.rb +29 -29
  123. data/spec/integration/ip_messaging/v2/service/role_spec.rb +13 -13
  124. data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +9 -9
  125. data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +20 -20
  126. data/spec/integration/ip_messaging/v2/service/user_spec.rb +21 -21
  127. data/spec/integration/ip_messaging/v2/service_spec.rb +29 -29
  128. data/spec/integration/lookups/v1/phone_number_spec.rb +7 -7
  129. data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +4 -2
  130. data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +1 -1
  131. data/spec/integration/trunking/v1/trunk/recording_spec.rb +2 -6
  132. data/spec/integration/verify/v2/service/entity/challenge_spec.rb +4 -12
  133. data/spec/integration/verify/v2/service/entity/factor_spec.rb +5 -15
  134. data/spec/integration/verify/v2/service/entity_spec.rb +4 -12
  135. data/spec/integration/video/v1/room/room_recording_rule_spec.rb +89 -0
  136. data/spec/integration/video/v1/room_spec.rb +10 -5
  137. data/spec/jwt/access_token_spec.rb +9 -1
  138. data/spec/rest/client_spec.rb +24 -2
  139. data/twilio-ruby.gemspec +2 -1
  140. metadata +30 -19
  141. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +0 -243
  142. data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +0 -213
  143. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +0 -108
  144. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +0 -260
  145. data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +0 -342
  146. data/spec/integration/preview/trusted_comms/branded_call_spec.rb +0 -59
  147. data/spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb +0 -56
  148. data/spec/integration/preview/trusted_comms/business/insights_spec.rb +0 -12
  149. data/spec/integration/preview/trusted_comms/business_spec.rb +0 -45
  150. data/spec/integration/preview/trusted_comms/phone_call_spec.rb +0 -59
@@ -479,6 +479,36 @@ describe 'Participant' do
479
479
  expect(actual).to_not eq(nil)
480
480
  end
481
481
 
482
+ it "receives create_with_friendly_name_recording_track responses" do
483
+ @holodeck.mock(Twilio::Response.new(
484
+ 201,
485
+ %q[
486
+ {
487
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
488
+ "call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
489
+ "label": null,
490
+ "conference_sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
491
+ "date_created": "Fri, 18 Feb 2011 21:07:19 +0000",
492
+ "date_updated": "Fri, 18 Feb 2011 21:07:19 +0000",
493
+ "end_conference_on_exit": false,
494
+ "muted": false,
495
+ "hold": false,
496
+ "status": "complete",
497
+ "start_conference_on_enter": true,
498
+ "coaching": false,
499
+ "call_sid_to_coach": null,
500
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
501
+ }
502
+ ]
503
+ ))
504
+
505
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
506
+ .conferences('CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
507
+ .participants.create(from: '+15017122661', to: '+15558675310')
508
+
509
+ expect(actual).to_not eq(nil)
510
+ end
511
+
482
512
  it "can delete" do
483
513
  @holodeck.mock(Twilio::Response.new(500, ''))
484
514
 
@@ -91,13 +91,15 @@ describe 'ExportCustomJob' do
91
91
 
92
92
  expect {
93
93
  @client.bulkexports.v1.exports('resource_type') \
94
- .export_custom_jobs.create()
94
+ .export_custom_jobs.create(start_day: 'start_day', end_day: 'end_day', friendly_name: 'friendly_name')
95
95
  }.to raise_exception(Twilio::REST::TwilioError)
96
96
 
97
+ values = {'StartDay' => 'start_day', 'EndDay' => 'end_day', 'FriendlyName' => 'friendly_name', }
97
98
  expect(
98
99
  @holodeck.has_request?(Holodeck::Request.new(
99
100
  method: 'post',
100
101
  url: 'https://bulkexports.twilio.com/v1/Exports/resource_type/Jobs',
102
+ data: values,
101
103
  ))).to eq(true)
102
104
  end
103
105
 
@@ -120,7 +122,7 @@ describe 'ExportCustomJob' do
120
122
  ))
121
123
 
122
124
  actual = @client.bulkexports.v1.exports('resource_type') \
123
- .export_custom_jobs.create()
125
+ .export_custom_jobs.create(start_day: 'start_day', end_day: 'end_day', friendly_name: 'friendly_name')
124
126
 
125
127
  expect(actual).to_not eq(nil)
126
128
  end
@@ -44,7 +44,9 @@ describe 'Participant' do
44
44
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
45
45
  "date_created": "2015-12-16T22:18:37Z",
46
46
  "date_updated": "2015-12-16T22:18:38Z",
47
- "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
47
+ "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
48
+ "last_read_message_index": null,
49
+ "last_read_timestamp": null
48
50
  }
49
51
  ]
50
52
  ))
@@ -69,7 +71,9 @@ describe 'Participant' do
69
71
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
70
72
  "date_created": "2015-12-16T22:18:37Z",
71
73
  "date_updated": "2015-12-16T22:18:38Z",
72
- "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
74
+ "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
75
+ "last_read_message_index": null,
76
+ "last_read_timestamp": null
73
77
  }
74
78
  ]
75
79
  ))
@@ -97,7 +101,9 @@ describe 'Participant' do
97
101
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
98
102
  "date_created": "2015-12-16T22:18:37Z",
99
103
  "date_updated": "2015-12-16T22:18:38Z",
100
- "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
104
+ "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
105
+ "last_read_message_index": null,
106
+ "last_read_timestamp": null
101
107
  }
102
108
  ]
103
109
  ))
@@ -125,7 +131,9 @@ describe 'Participant' do
125
131
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
126
132
  "date_created": "2020-07-01T22:18:37Z",
127
133
  "date_updated": "2020-07-01T22:18:37Z",
128
- "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
134
+ "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
135
+ "last_read_message_index": null,
136
+ "last_read_timestamp": null
129
137
  }
130
138
  ]
131
139
  ))
@@ -153,7 +161,9 @@ describe 'Participant' do
153
161
  "role_sid": null,
154
162
  "date_created": "2020-07-01T22:18:37Z",
155
163
  "date_updated": "2020-07-01T22:18:37Z",
156
- "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
164
+ "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
165
+ "last_read_message_index": null,
166
+ "last_read_timestamp": null
157
167
  }
158
168
  ]
159
169
  ))
@@ -199,7 +209,9 @@ describe 'Participant' do
199
209
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
200
210
  "date_created": "2015-12-16T22:18:37Z",
201
211
  "date_updated": "2015-12-16T22:18:38Z",
202
- "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
212
+ "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
213
+ "last_read_message_index": null,
214
+ "last_read_timestamp": null
203
215
  }
204
216
  ]
205
217
  ))
@@ -227,7 +239,9 @@ describe 'Participant' do
227
239
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
228
240
  "date_created": "2015-12-16T22:18:37Z",
229
241
  "date_updated": "2015-12-16T22:18:38Z",
230
- "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
242
+ "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
243
+ "last_read_message_index": null,
244
+ "last_read_timestamp": null
231
245
  }
232
246
  ]
233
247
  ))
@@ -300,7 +314,9 @@ describe 'Participant' do
300
314
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
301
315
  "date_created": "2016-03-24T21:05:50Z",
302
316
  "date_updated": "2016-03-24T21:05:50Z",
303
- "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
317
+ "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
318
+ "last_read_message_index": null,
319
+ "last_read_timestamp": null
304
320
  }
305
321
  ]
306
322
  ))
@@ -355,7 +371,9 @@ describe 'Participant' do
355
371
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
356
372
  "date_created": "2016-03-24T21:05:50Z",
357
373
  "date_updated": "2016-03-24T21:05:50Z",
358
- "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
374
+ "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
375
+ "last_read_message_index": null,
376
+ "last_read_timestamp": null
359
377
  },
360
378
  {
361
379
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -367,7 +385,9 @@ describe 'Participant' do
367
385
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
368
386
  "date_created": "2016-03-24T21:05:50Z",
369
387
  "date_updated": "2016-03-24T21:05:50Z",
370
- "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
388
+ "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
389
+ "last_read_message_index": null,
390
+ "last_read_timestamp": null
371
391
  }
372
392
  ]
373
393
  }
@@ -33,6 +33,7 @@ describe 'Configuration' do
33
33
  "default_conversation_creator_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34
34
  "default_conversation_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35
35
  "default_chat_service_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
+ "reachability_enabled": false,
36
37
  "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration",
37
38
  "links": {
38
39
  "notifications": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Notifications"
@@ -71,6 +72,7 @@ describe 'Configuration' do
71
72
  "default_conversation_creator_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
72
73
  "default_conversation_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
73
74
  "default_chat_service_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
75
+ "reachability_enabled": false,
74
76
  "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration",
75
77
  "links": {
76
78
  "notifications": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Notifications"
@@ -46,7 +46,9 @@ describe 'Participant' do
46
46
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
47
47
  "date_created": "2015-12-16T22:18:37Z",
48
48
  "date_updated": "2015-12-16T22:18:38Z",
49
- "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
49
+ "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
50
+ "last_read_message_index": null,
51
+ "last_read_timestamp": null
50
52
  }
51
53
  ]
52
54
  ))
@@ -73,7 +75,9 @@ describe 'Participant' do
73
75
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
74
76
  "date_created": "2015-12-16T22:18:37Z",
75
77
  "date_updated": "2015-12-16T22:18:38Z",
76
- "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
78
+ "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
79
+ "last_read_message_index": null,
80
+ "last_read_timestamp": null
77
81
  }
78
82
  ]
79
83
  ))
@@ -103,7 +107,9 @@ describe 'Participant' do
103
107
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
104
108
  "date_created": "2015-12-16T22:18:37Z",
105
109
  "date_updated": "2015-12-16T22:18:38Z",
106
- "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
110
+ "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
111
+ "last_read_message_index": null,
112
+ "last_read_timestamp": null
107
113
  }
108
114
  ]
109
115
  ))
@@ -133,7 +139,9 @@ describe 'Participant' do
133
139
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
134
140
  "date_created": "2020-07-01T22:18:37Z",
135
141
  "date_updated": "2020-07-01T22:18:37Z",
136
- "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
142
+ "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
143
+ "last_read_message_index": null,
144
+ "last_read_timestamp": null
137
145
  }
138
146
  ]
139
147
  ))
@@ -163,7 +171,9 @@ describe 'Participant' do
163
171
  "role_sid": null,
164
172
  "date_created": "2020-07-01T22:18:37Z",
165
173
  "date_updated": "2020-07-01T22:18:37Z",
166
- "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
174
+ "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
175
+ "last_read_message_index": null,
176
+ "last_read_timestamp": null
167
177
  }
168
178
  ]
169
179
  ))
@@ -212,7 +222,9 @@ describe 'Participant' do
212
222
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
213
223
  "date_created": "2015-12-16T22:18:37Z",
214
224
  "date_updated": "2015-12-16T22:18:38Z",
215
- "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
225
+ "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
226
+ "last_read_message_index": null,
227
+ "last_read_timestamp": null
216
228
  }
217
229
  ]
218
230
  ))
@@ -242,7 +254,9 @@ describe 'Participant' do
242
254
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
243
255
  "date_created": "2015-12-16T22:18:37Z",
244
256
  "date_updated": "2015-12-16T22:18:38Z",
245
- "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
257
+ "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
258
+ "last_read_message_index": null,
259
+ "last_read_timestamp": null
246
260
  }
247
261
  ]
248
262
  ))
@@ -320,7 +334,9 @@ describe 'Participant' do
320
334
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
321
335
  "date_created": "2016-03-24T21:05:50Z",
322
336
  "date_updated": "2016-03-24T21:05:50Z",
323
- "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
337
+ "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
338
+ "last_read_message_index": null,
339
+ "last_read_timestamp": null
324
340
  }
325
341
  ]
326
342
  ))
@@ -378,7 +394,9 @@ describe 'Participant' do
378
394
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
379
395
  "date_created": "2016-03-24T21:05:50Z",
380
396
  "date_updated": "2016-03-24T21:05:50Z",
381
- "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
397
+ "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
398
+ "last_read_message_index": null,
399
+ "last_read_timestamp": null
382
400
  },
383
401
  {
384
402
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -391,7 +409,9 @@ describe 'Participant' do
391
409
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
392
410
  "date_created": "2016-03-24T21:05:50Z",
393
411
  "date_updated": "2016-03-24T21:05:50Z",
394
- "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
412
+ "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
413
+ "last_read_message_index": null,
414
+ "last_read_timestamp": null
395
415
  }
396
416
  ]
397
417
  }
@@ -40,7 +40,8 @@ describe 'User' do
40
40
  "identity": "admin",
41
41
  "friendly_name": "name",
42
42
  "attributes": "{ \\"duty\\": \\"tech\\" }",
43
- "is_online": null,
43
+ "is_online": true,
44
+ "is_notifiable": null,
44
45
  "date_created": "2019-12-16T22:18:37Z",
45
46
  "date_updated": "2019-12-16T22:18:38Z",
46
47
  "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -83,7 +84,8 @@ describe 'User' do
83
84
  "identity": "admin",
84
85
  "friendly_name": "new name",
85
86
  "attributes": "{ \\"duty\\": \\"tech\\", \\"team\\": \\"internals\\" }",
86
- "is_online": null,
87
+ "is_online": true,
88
+ "is_notifiable": null,
87
89
  "date_created": "2019-12-16T22:18:37Z",
88
90
  "date_updated": "2019-12-16T22:18:38Z",
89
91
  "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -153,7 +155,8 @@ describe 'User' do
153
155
  "identity": "admin",
154
156
  "friendly_name": "name",
155
157
  "attributes": "{ \\"duty\\": \\"tech\\" }",
156
- "is_online": null,
158
+ "is_online": true,
159
+ "is_notifiable": null,
157
160
  "date_created": "2019-12-16T22:18:37Z",
158
161
  "date_updated": "2019-12-16T22:18:38Z",
159
162
  "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -205,7 +208,8 @@ describe 'User' do
205
208
  "identity": "admin",
206
209
  "friendly_name": "name",
207
210
  "attributes": "{ \\"duty\\": \\"tech\\" }",
208
- "is_online": null,
211
+ "is_online": true,
212
+ "is_notifiable": null,
209
213
  "date_created": "2019-12-16T22:18:37Z",
210
214
  "date_updated": "2019-12-16T22:18:38Z",
211
215
  "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -219,6 +223,7 @@ describe 'User' do
219
223
  "friendly_name": "John from customs",
220
224
  "attributes": "{ \\"duty\\": \\"agent\\" }",
221
225
  "is_online": false,
226
+ "is_notifiable": null,
222
227
  "date_created": "2020-03-24T20:38:21Z",
223
228
  "date_updated": "2020-03-24T20:38:21Z",
224
229
  "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -39,7 +39,8 @@ describe 'User' do
39
39
  "identity": "admin",
40
40
  "friendly_name": "name",
41
41
  "attributes": "{ \\"duty\\": \\"tech\\" }",
42
- "is_online": null,
42
+ "is_online": true,
43
+ "is_notifiable": null,
43
44
  "date_created": "2019-12-16T22:18:37Z",
44
45
  "date_updated": "2019-12-16T22:18:38Z",
45
46
  "url": "https://conversations.twilio.com/v1/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -80,7 +81,8 @@ describe 'User' do
80
81
  "identity": "admin",
81
82
  "friendly_name": "new name",
82
83
  "attributes": "{ \\"duty\\": \\"tech\\", \\"team\\": \\"internals\\" }",
83
- "is_online": null,
84
+ "is_online": true,
85
+ "is_notifiable": null,
84
86
  "date_created": "2019-12-16T22:18:37Z",
85
87
  "date_updated": "2019-12-16T22:18:38Z",
86
88
  "url": "https://conversations.twilio.com/v1/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -146,7 +148,8 @@ describe 'User' do
146
148
  "identity": "admin",
147
149
  "friendly_name": "name",
148
150
  "attributes": "{ \\"duty\\": \\"tech\\" }",
149
- "is_online": null,
151
+ "is_online": true,
152
+ "is_notifiable": null,
150
153
  "date_created": "2019-12-16T22:18:37Z",
151
154
  "date_updated": "2019-12-16T22:18:38Z",
152
155
  "url": "https://conversations.twilio.com/v1/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -196,7 +199,8 @@ describe 'User' do
196
199
  "identity": "admin",
197
200
  "friendly_name": "name",
198
201
  "attributes": "{ \\"duty\\": \\"tech\\" }",
199
- "is_online": null,
202
+ "is_online": true,
203
+ "is_notifiable": null,
200
204
  "date_created": "2019-12-16T22:18:37Z",
201
205
  "date_updated": "2019-12-16T22:18:38Z",
202
206
  "url": "https://conversations.twilio.com/v1/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -210,6 +214,7 @@ describe 'User' do
210
214
  "friendly_name": "John from customs",
211
215
  "attributes": "{ \\"duty\\": \\"agent\\" }",
212
216
  "is_online": false,
217
+ "is_notifiable": null,
213
218
  "date_created": "2020-03-24T20:38:21Z",
214
219
  "date_updated": "2020-03-24T20:38:21Z",
215
220
  "url": "https://conversations.twilio.com/v1/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -29,7 +29,7 @@ describe 'SinkTest' do
29
29
  201,
30
30
  %q[
31
31
  {
32
- "result": "valid"
32
+ "result": "submitted"
33
33
  }
34
34
  ]
35
35
  ))
@@ -96,6 +96,55 @@ describe 'Subscription' do
96
96
  expect(actual).to_not eq(nil)
97
97
  end
98
98
 
99
+ it "receives read_results_filtered_by_sink_sid responses" do
100
+ @holodeck.mock(Twilio::Response.new(
101
+ 200,
102
+ %q[
103
+ {
104
+ "subscriptions": [
105
+ {
106
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
107
+ "date_created": "2015-07-30T20:00:00Z",
108
+ "date_updated": "2015-07-30T20:01:33Z",
109
+ "sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
110
+ "sink_sid": "DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
111
+ "description": "A subscription",
112
+ "url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
113
+ "links": {
114
+ "subscribed_events": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents"
115
+ }
116
+ },
117
+ {
118
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
119
+ "date_created": "2015-07-30T20:00:00Z",
120
+ "date_updated": "2015-07-30T20:01:33Z",
121
+ "sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
122
+ "sink_sid": "DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
123
+ "description": "Another subscription",
124
+ "url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
125
+ "links": {
126
+ "subscribed_events": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab/SubscribedEvents"
127
+ }
128
+ }
129
+ ],
130
+ "meta": {
131
+ "page": 0,
132
+ "page_size": 10,
133
+ "first_page_url": "https://events.twilio.com/v1/Subscriptions?SinkSid=DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=10&Page=0",
134
+ "previous_page_url": null,
135
+ "url": "https://events.twilio.com/v1/Subscriptions?SinkSid=DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=10&Page=0",
136
+ "next_page_url": null,
137
+ "key": "subscriptions"
138
+ }
139
+ }
140
+ ]
141
+ ))
142
+
143
+ actual = @client.events.v1.subscriptions.list()
144
+
145
+ expect(actual).to_not eq(nil)
146
+ end
147
+
99
148
  it "can fetch" do
100
149
  @holodeck.mock(Twilio::Response.new(500, ''))
101
150