twilio-ruby 5.18.0 → 5.19.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -15,14 +15,29 @@ module Twilio
15
15
  def initialize(domain)
16
16
  super
17
17
  @version = 'v1'
18
+ @compositions = nil
18
19
  @composition_hooks = nil
19
20
  @composition_settings = nil
20
21
  @recordings = nil
21
22
  @recording_settings = nil
22
- @compositions = nil
23
23
  @rooms = nil
24
24
  end
25
25
 
26
+ ##
27
+ # @param [String] sid The Composition Sid that uniquely identifies the Composition
28
+ # to fetch.
29
+ # @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed.
30
+ # @return [Twilio::REST::Video::V1::CompositionList]
31
+ def compositions(sid=:unset)
32
+ if sid.nil?
33
+ raise ArgumentError, 'sid cannot be nil'
34
+ elsif sid == :unset
35
+ @compositions ||= CompositionList.new self
36
+ else
37
+ CompositionContext.new(self, sid)
38
+ end
39
+ end
40
+
26
41
  ##
27
42
  # @param [String] sid The Composition Hook Sid that uniquely identifies the
28
43
  # Composition Hook to fetch.
@@ -65,21 +80,6 @@ module Twilio
65
80
  @recording_settings ||= RecordingSettingsContext.new self
66
81
  end
67
82
 
68
- ##
69
- # @param [String] sid The Composition Sid that uniquely identifies the Composition
70
- # to fetch.
71
- # @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed.
72
- # @return [Twilio::REST::Video::V1::CompositionList]
73
- def compositions(sid=:unset)
74
- if sid.nil?
75
- raise ArgumentError, 'sid cannot be nil'
76
- elsif sid == :unset
77
- @compositions ||= CompositionList.new self
78
- else
79
- CompositionContext.new(self, sid)
80
- end
81
- end
82
-
83
83
  ##
84
84
  # @param [String] sid The Room Sid or name that uniquely identifies this resource.
85
85
  # @return [Twilio::REST::Video::V1::RoomContext] if sid was passed.
@@ -28,6 +28,15 @@ module Twilio
28
28
  @v1 ||= V1.new self
29
29
  end
30
30
 
31
+ ##
32
+ # @param [String] sid `CJxx…xx` A system-generated 34-character string that
33
+ # uniquely identifies this Composition.
34
+ # @return [Twilio::REST::Video::V1::CompositionInstance] if sid was passed.
35
+ # @return [Twilio::REST::Video::V1::CompositionList]
36
+ def compositions(sid=:unset)
37
+ self.v1.compositions(sid)
38
+ end
39
+
31
40
  ##
32
41
  # @param [String] sid `HKxx…xx` A system-generated 34-character string that
33
42
  # uniquely identifies this Composition Hook.
@@ -58,15 +67,6 @@ module Twilio
58
67
  self.v1.recording_settings()
59
68
  end
60
69
 
61
- ##
62
- # @param [String] sid `CJxx…xx` A system-generated 34-character string that
63
- # uniquely identifies this Composition.
64
- # @return [Twilio::REST::Video::V1::CompositionInstance] if sid was passed.
65
- # @return [Twilio::REST::Video::V1::CompositionList]
66
- def compositions(sid=:unset)
67
- self.v1.compositions(sid)
68
- end
69
-
70
70
  ##
71
71
  # @param [String] sid A system-generated 34-character string that uniquely
72
72
  # identifies this resource.
@@ -30,9 +30,9 @@ module Twilio
30
30
  # Retrieve a single page of BulkCountryUpdateInstance records from the API.
31
31
  # Request is executed immediately.
32
32
  # @param [String] update_request URL encoded JSON array of update objects. example
33
- # : [ { "iso_code": "GB", "low_risk_numbers_enabled": "true",
33
+ # : `[ { "iso_code": "GB", "low_risk_numbers_enabled": "true",
34
34
  # "high_risk_special_numbers_enabled":"true",
35
- # "high_risk_tollfraud_numbers_enabled": "false" } ]
35
+ # "high_risk_tollfraud_numbers_enabled": "false" } ]`
36
36
  # @return [BulkCountryUpdateInstance] Newly created BulkCountryUpdateInstance
37
37
  def create(update_request: nil)
38
38
  data = Twilio::Values.of({'UpdateRequest' => update_request, })
@@ -109,7 +109,7 @@ module Twilio
109
109
  end
110
110
 
111
111
  ##
112
- # @return [String] The update_request
112
+ # @return [String] A URL encoded JSON array of update objects
113
113
  def update_request
114
114
  @properties['update_request']
115
115
  end
@@ -19,7 +19,7 @@ module Twilio
19
19
  # Initialize the HighriskSpecialPrefixList
20
20
  # @param [Version] version Version that contains the resource
21
21
  # @param [String] iso_code The [ISO country
22
- # code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
22
+ # code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
23
23
  # @return [HighriskSpecialPrefixList] HighriskSpecialPrefixList
24
24
  def initialize(version, iso_code: nil)
25
25
  super(version)
@@ -157,7 +157,7 @@ module Twilio
157
157
  # @param [Version] version Version that contains the resource
158
158
  # @param [Hash] payload payload that contains response from Twilio
159
159
  # @param [String] iso_code The [ISO country
160
- # code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
160
+ # code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
161
161
  # @return [HighriskSpecialPrefixInstance] HighriskSpecialPrefixInstance
162
162
  def initialize(version, payload, iso_code: nil)
163
163
  super(version)
@@ -38,14 +38,14 @@ module Twilio
38
38
  # @param [String] country_code Filter the results by specified [country
39
39
  # codes](https://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html)
40
40
  # @param [Boolean] low_risk_numbers_enabled Filter to retrieve the country
41
- # permissions with dialing to low-risk numbers enabled set to true / false
41
+ # permissions with dialing to low-risk numbers enabled. Can be: `true` or `false`.
42
42
  # @param [Boolean] high_risk_special_numbers_enabled Filter to retrieve the
43
- # country permissions with dialing to high-risk special service numbers enabled
44
- # set to true / false
43
+ # country permissions with dialing to high-risk special service numbers enabled.
44
+ # Can be: `true` or `false`
45
45
  # @param [Boolean] high_risk_tollfraud_numbers_enabled Filter to retrieve the
46
46
  # country permissions with dialing to high-risk [toll
47
- # fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled
48
- # set to true / false
47
+ # fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled.
48
+ # Can be: `true` or `false`.
49
49
  # @param [Integer] limit Upper limit for the number of records to return. stream()
50
50
  # guarantees to never return more than limit. Default is no limit
51
51
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -78,14 +78,14 @@ module Twilio
78
78
  # @param [String] country_code Filter the results by specified [country
79
79
  # codes](https://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html)
80
80
  # @param [Boolean] low_risk_numbers_enabled Filter to retrieve the country
81
- # permissions with dialing to low-risk numbers enabled set to true / false
81
+ # permissions with dialing to low-risk numbers enabled. Can be: `true` or `false`.
82
82
  # @param [Boolean] high_risk_special_numbers_enabled Filter to retrieve the
83
- # country permissions with dialing to high-risk special service numbers enabled
84
- # set to true / false
83
+ # country permissions with dialing to high-risk special service numbers enabled.
84
+ # Can be: `true` or `false`
85
85
  # @param [Boolean] high_risk_tollfraud_numbers_enabled Filter to retrieve the
86
86
  # country permissions with dialing to high-risk [toll
87
- # fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled
88
- # set to true / false
87
+ # fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled.
88
+ # Can be: `true` or `false`.
89
89
  # @param [Integer] limit Upper limit for the number of records to return. stream()
90
90
  # guarantees to never return more than limit. Default is no limit.
91
91
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -134,14 +134,14 @@ module Twilio
134
134
  # @param [String] country_code Filter the results by specified [country
135
135
  # codes](https://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html)
136
136
  # @param [Boolean] low_risk_numbers_enabled Filter to retrieve the country
137
- # permissions with dialing to low-risk numbers enabled set to true / false
137
+ # permissions with dialing to low-risk numbers enabled. Can be: `true` or `false`.
138
138
  # @param [Boolean] high_risk_special_numbers_enabled Filter to retrieve the
139
- # country permissions with dialing to high-risk special service numbers enabled
140
- # set to true / false
139
+ # country permissions with dialing to high-risk special service numbers enabled.
140
+ # Can be: `true` or `false`
141
141
  # @param [Boolean] high_risk_tollfraud_numbers_enabled Filter to retrieve the
142
142
  # country permissions with dialing to high-risk [toll
143
- # fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled
144
- # set to true / false
143
+ # fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled.
144
+ # Can be: `true` or `false`.
145
145
  # @param [String] page_token PageToken provided by the API
146
146
  # @param [Integer] page_number Page Number, this value is simply for client state
147
147
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -339,31 +339,31 @@ module Twilio
339
339
  end
340
340
 
341
341
  ##
342
- # @return [Boolean] true, if dialing to low-risk numbers is enabled, else false
342
+ # @return [Boolean] `true`, if dialing to low-risk numbers is enabled, else `false`
343
343
  def low_risk_numbers_enabled
344
344
  @properties['low_risk_numbers_enabled']
345
345
  end
346
346
 
347
347
  ##
348
- # @return [Boolean] true, if dialing to high-risk special services numbers is enabled, else false. This group of prefixes, are number ranges allocated by the corresponding country. They consist of number types such as premium numbers, special services, shared cost and others
348
+ # @return [Boolean] `true`, if dialing to high-risk special services numbers is enabled, else `false`
349
349
  def high_risk_special_numbers_enabled
350
350
  @properties['high_risk_special_numbers_enabled']
351
351
  end
352
352
 
353
353
  ##
354
- # @return [Boolean] true, if dialing to high-risk toll fraud numbers is enabled, else false. This group of prefixes are narrow number ranges that have a high-risk of international revenue sharing fraud (IRSF) attacks also called toll fraud. The group of prefixes is formed through integration with anti-fraud databases and verified by analyzing calls on the Twilio Super Network. This group of prefixes are not available for download and are updated frequently
354
+ # @return [Boolean] `true`, if dialing to high-risk toll fraud numbers is enabled, else `false`
355
355
  def high_risk_tollfraud_numbers_enabled
356
356
  @properties['high_risk_tollfraud_numbers_enabled']
357
357
  end
358
358
 
359
359
  ##
360
- # @return [String] The URL for this resource
360
+ # @return [String] The absolute URL of this resource
361
361
  def url
362
362
  @properties['url']
363
363
  end
364
364
 
365
365
  ##
366
- # @return [String] The links
366
+ # @return [String] A list of URLs related to this resource
367
367
  def links
368
368
  @properties['links']
369
369
  end
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.18.0'
2
+ VERSION = '5.19.0'
3
3
  end
@@ -52,7 +52,8 @@ describe 'Domain' do
52
52
  "voice_method": "POST",
53
53
  "voice_status_callback_method": "POST",
54
54
  "voice_status_callback_url": null,
55
- "voice_url": "https://dundermifflin.example.com/twilio/app.php"
55
+ "voice_url": "https://dundermifflin.example.com/twilio/app.php",
56
+ "trunk_sid": "TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
56
57
  }
57
58
  ],
58
59
  "start": 0,
@@ -141,7 +142,8 @@ describe 'Domain' do
141
142
  "voice_method": "POST",
142
143
  "voice_status_callback_method": "POST",
143
144
  "voice_status_callback_url": null,
144
- "voice_url": "https://dundermifflin.example.com/twilio/app.php"
145
+ "voice_url": "https://dundermifflin.example.com/twilio/app.php",
146
+ "trunk_sid": null
145
147
  }
146
148
  ]
147
149
  ))
@@ -194,7 +196,8 @@ describe 'Domain' do
194
196
  "voice_method": "POST",
195
197
  "voice_status_callback_method": "POST",
196
198
  "voice_status_callback_url": null,
197
- "voice_url": "https://dundermifflin.example.com/twilio/app.php"
199
+ "voice_url": "https://dundermifflin.example.com/twilio/app.php",
200
+ "trunk_sid": "TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
198
201
  }
199
202
  ]
200
203
  ))
@@ -247,7 +250,8 @@ describe 'Domain' do
247
250
  "voice_method": "POST",
248
251
  "voice_status_callback_method": "POST",
249
252
  "voice_status_callback_url": null,
250
- "voice_url": "https://dundermifflin.example.com/twilio/app.php"
253
+ "voice_url": "https://dundermifflin.example.com/twilio/app.php",
254
+ "trunk_sid": "TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
251
255
  }
252
256
  ]
253
257
  ))
@@ -0,0 +1,60 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ require 'spec_helper.rb'
10
+
11
+ describe 'CallSummary' do
12
+ it "can fetch" do
13
+ @holodeck.mock(Twilio::Response.new(500, ''))
14
+
15
+ expect {
16
+ @client.insights.v1.summary('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
17
+ }.to raise_exception(Twilio::REST::TwilioError)
18
+
19
+ values = {}
20
+ expect(
21
+ @holodeck.has_request?(Holodeck::Request.new(
22
+ method: 'get',
23
+ url: 'https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Summary',
24
+ ))).to eq(true)
25
+ end
26
+
27
+ it "receives fetch responses" do
28
+ @holodeck.mock(Twilio::Response.new(
29
+ 200,
30
+ %q[
31
+ {
32
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
33
+ "call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34
+ "call_type": "carrier",
35
+ "call_state": "ringing",
36
+ "processing_state": "complete",
37
+ "direction": "inbound",
38
+ "disconnected_by": "callee",
39
+ "start_time": "2015-07-30T20:00:00Z",
40
+ "end_time": "2015-07-30T20:00:00Z",
41
+ "duration": 100,
42
+ "connect_duration": 99,
43
+ "from": {},
44
+ "to": {},
45
+ "carrier_edge": {},
46
+ "client_edge": {},
47
+ "sip_edge": {},
48
+ "tags": [
49
+ "tags"
50
+ ],
51
+ "url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Summary"
52
+ }
53
+ ]
54
+ ))
55
+
56
+ actual = @client.insights.v1.summary('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
57
+
58
+ expect(actual).to_not eq(nil)
59
+ end
60
+ end
@@ -35,7 +35,7 @@ describe 'PhoneNumber' do
35
35
  "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
36
  "date_created": "2015-07-30T20:00:00Z",
37
37
  "date_updated": "2015-07-30T20:00:00Z",
38
- "phone_number": "+987654321",
38
+ "phone_number": "+1987654321",
39
39
  "friendly_name": "Friendly Name",
40
40
  "iso_country": "US",
41
41
  "capabilities": {
@@ -119,7 +119,7 @@ describe 'PhoneNumber' do
119
119
  "sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
120
120
  "date_created": "2015-07-30T20:00:00Z",
121
121
  "date_updated": "2015-07-30T20:00:00Z",
122
- "phone_number": "+987654321",
122
+ "phone_number": "+1987654321",
123
123
  "friendly_name": "Friendly Name",
124
124
  "iso_country": "US",
125
125
  "capabilities": {
@@ -32,7 +32,7 @@ describe 'Interaction' do
32
32
  %q[
33
33
  {
34
34
  "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35
- "data": "data",
35
+ "data": "{\\"body\\":\\"some message\\"}",
36
36
  "date_created": "2015-07-30T20:00:00Z",
37
37
  "date_updated": "2015-07-30T20:00:00Z",
38
38
  "inbound_participant_sid": "KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -33,7 +33,7 @@ describe 'MessageInteraction' do
33
33
  %q[
34
34
  {
35
35
  "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
- "data": "body",
36
+ "data": "{\\"body\\":\\"some message\\"}",
37
37
  "date_created": "2015-07-30T20:00:00Z",
38
38
  "date_updated": "2015-07-30T20:00:00Z",
39
39
  "participant_sid": "KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -88,7 +88,7 @@ describe 'MessageInteraction' do
88
88
  %q[
89
89
  {
90
90
  "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
91
- "data": "data",
91
+ "data": "{\\"body\\":\\"some message\\"}",
92
92
  "date_created": "2015-07-30T20:00:00Z",
93
93
  "date_updated": "2015-07-30T20:00:00Z",
94
94
  "participant_sid": "KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -35,8 +35,8 @@ describe 'Participant' do
35
35
  "session_sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
36
  "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37
37
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
38
- "identifier": "identifier",
39
- "proxy_identifier": "proxy_identifier",
38
+ "identifier": "+14155551212",
39
+ "proxy_identifier": "+14155559999",
40
40
  "proxy_identifier_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
41
41
  "friendly_name": "friendly_name",
42
42
  "date_deleted": "2015-07-30T20:00:00Z",
@@ -57,6 +57,37 @@ describe 'Participant' do
57
57
  expect(actual).to_not eq(nil)
58
58
  end
59
59
 
60
+ it "receives fetch_channel responses" do
61
+ @holodeck.mock(Twilio::Response.new(
62
+ 200,
63
+ %q[
64
+ {
65
+ "sid": "KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
66
+ "session_sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
67
+ "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
68
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
69
+ "identifier": "messenger:14155551212",
70
+ "proxy_identifier": "messenger:14155559999",
71
+ "proxy_identifier_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
72
+ "friendly_name": "a facebook user",
73
+ "date_deleted": "2015-07-30T20:00:00Z",
74
+ "date_updated": "2015-07-30T20:00:00Z",
75
+ "date_created": "2015-07-30T20:00:00Z",
76
+ "url": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sessions/KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
77
+ "links": {
78
+ "message_interactions": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sessions/KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessageInteractions"
79
+ }
80
+ }
81
+ ]
82
+ ))
83
+
84
+ actual = @client.proxy.v1.services('KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
85
+ .sessions('KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
86
+ .participants('KPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
87
+
88
+ expect(actual).to_not eq(nil)
89
+ end
90
+
60
91
  it "can read" do
61
92
  @holodeck.mock(Twilio::Response.new(500, ''))
62
93
 
@@ -127,8 +158,8 @@ describe 'Participant' do
127
158
  "session_sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
128
159
  "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
129
160
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
130
- "identifier": "identifier",
131
- "proxy_identifier": "proxy_identifier",
161
+ "identifier": "+14155551212",
162
+ "proxy_identifier": "+14155559999",
132
163
  "proxy_identifier_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
133
164
  "friendly_name": "friendly_name",
134
165
  "date_deleted": "2015-07-30T20:00:00Z",
@@ -149,6 +180,37 @@ describe 'Participant' do
149
180
  expect(actual).to_not eq(nil)
150
181
  end
151
182
 
183
+ it "receives create_channel responses" do
184
+ @holodeck.mock(Twilio::Response.new(
185
+ 201,
186
+ %q[
187
+ {
188
+ "sid": "KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
189
+ "session_sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
190
+ "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
191
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
192
+ "identifier": "messenger:123456",
193
+ "proxy_identifier": "messenger:987654532",
194
+ "proxy_identifier_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
195
+ "friendly_name": "a facebook user",
196
+ "date_deleted": "2015-07-30T20:00:00Z",
197
+ "date_updated": "2015-07-30T20:00:00Z",
198
+ "date_created": "2015-07-30T20:00:00Z",
199
+ "url": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sessions/KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
200
+ "links": {
201
+ "message_interactions": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sessions/KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessageInteractions"
202
+ }
203
+ }
204
+ ]
205
+ ))
206
+
207
+ actual = @client.proxy.v1.services('KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
208
+ .sessions('KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
209
+ .participants.create(identifier: 'identifier')
210
+
211
+ expect(actual).to_not eq(nil)
212
+ end
213
+
152
214
  it "can delete" do
153
215
  @holodeck.mock(Twilio::Response.new(500, ''))
154
216