twilio-ruby 5.0.0.rc3 → 5.0.0.rc4

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 (26) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +9 -0
  3. data/lib/twilio-ruby/rest/client.rb +7 -4
  4. data/lib/twilio-ruby/rest/conversations/v1/conversation/completed.rb +0 -7
  5. data/lib/twilio-ruby/rest/conversations/v1/conversation/in_progress.rb +0 -7
  6. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +1 -1
  7. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +1 -1
  8. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
  9. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +1 -1
  10. data/lib/twilio-ruby/rest/notifications/v1/service/binding.rb +440 -0
  11. data/lib/twilio-ruby/rest/notifications/v1/service/notification.rb +217 -0
  12. data/lib/twilio-ruby/rest/notifications/v1/service.rb +478 -0
  13. data/lib/twilio-ruby/rest/notifications/v1.rb +35 -0
  14. data/lib/twilio-ruby/rest/notifications.rb +40 -0
  15. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +96 -5
  16. data/lib/twilio-ruby/version.rb +1 -1
  17. data/spec/integration/ip_messaging/v1/credential_spec.rb +136 -0
  18. data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +133 -0
  19. data/spec/integration/ip_messaging/v1/service/channel_spec.rb +171 -1
  20. data/spec/integration/ip_messaging/v1/service/role_spec.rb +167 -1
  21. data/spec/integration/ip_messaging/v1/service/user_spec.rb +151 -1
  22. data/spec/integration/ip_messaging/v1/service_spec.rb +177 -1
  23. data/spec/integration/notifications/v1/service/binding_spec.rb +210 -0
  24. data/spec/integration/notifications/v1/service/notification_spec.rb +57 -0
  25. data/spec/integration/notifications/v1/service_spec.rb +244 -0
  26. metadata +14 -3
@@ -0,0 +1,35 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+
7
+ module Twilio
8
+ module REST
9
+ class Notifications
10
+ class V1 < Version
11
+ ##
12
+ # Initialize the V1 version of Notifications
13
+ def initialize(domain)
14
+ super
15
+ @version = 'v1'
16
+ @services = nil
17
+ end
18
+
19
+ def services(sid=:unset)
20
+ if sid == :unset
21
+ @services ||= ServiceList.new self
22
+ else
23
+ ServiceContext.new(self, sid)
24
+ end
25
+ end
26
+
27
+ ##
28
+ # Provide a user friendly representation
29
+ def to_s
30
+ #<Twilio::REST::Notifications::V1>
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,40 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+
7
+ module Twilio
8
+ module REST
9
+ class Notifications < Domain
10
+ ##
11
+ # Initialize the Notifications Domain
12
+ def initialize(twilio)
13
+ super
14
+
15
+ @base_url = 'https://notifications.twilio.com'
16
+ @host = 'notifications.twilio.com'
17
+ @port = 443
18
+
19
+ # Versions
20
+ @v1 = nil
21
+ end
22
+
23
+ ##
24
+ # Version v1 of notifications
25
+ def v1
26
+ @v1 ||= V1.new self
27
+ end
28
+
29
+ def services
30
+ self.v1.services
31
+ end
32
+
33
+ ##
34
+ # Provide a user friendly representation
35
+ def to_s
36
+ '#<Twilio::REST::Notifications>'
37
+ end
38
+ end
39
+ end
40
+ end
@@ -33,6 +33,9 @@ module Twilio
33
33
  # Lists ReservationInstance records from the API as a list.
34
34
  # Unlike stream(), this operation is eager and will load `limit` records into
35
35
  # memory before returning.
36
+ # @param [String] status The status
37
+ # @param [String] assignment_status The assignment_status
38
+ # @param [String] reservation_status The reservation_status
36
39
  # @param [Integer] limit Upper limit for the number of records to return. stream()
37
40
  # guarantees to never return more than limit. Default is no limit
38
41
  # @param [Integer] page_size Number of records to fetch per request, when not set will use
@@ -41,8 +44,11 @@ module Twilio
41
44
  # limit with the most efficient page size, i.e. min(limit, 1000)
42
45
 
43
46
  # @return [Array] Array of up to limit results
44
- def list(limit: nil, page_size: nil)
47
+ def list(status: nil, assignment_status: nil, reservation_status: nil, limit: nil, page_size: nil)
45
48
  self.stream(
49
+ status: status,
50
+ assignment_status: assignment_status,
51
+ reservation_status: reservation_status,
46
52
  limit: limit,
47
53
  page_size: page_size
48
54
  ).entries
@@ -52,6 +58,9 @@ module Twilio
52
58
  # Streams ReservationInstance records from the API as an Enumerable.
53
59
  # This operation lazily loads records as efficiently as possible until the limit
54
60
  # is reached.
61
+ # @param [String] status The status
62
+ # @param [String] assignment_status The assignment_status
63
+ # @param [String] reservation_status The reservation_status
55
64
  # @param [Integer] limit Upper limit for the number of records to return. stream()
56
65
  # guarantees to never return more than limit. Default is no limit
57
66
  # @param [Integer] page_size Number of records to fetch per request, when not set will use
@@ -60,10 +69,13 @@ module Twilio
60
69
  # limit with the most efficient page size, i.e. min(limit, 1000)
61
70
 
62
71
  # @return [Enumerable] Enumerable that will yield up to limit results
63
- def stream(limit: nil, page_size: nil)
72
+ def stream(status: nil, assignment_status: nil, reservation_status: nil, limit: nil, page_size: nil)
64
73
  limits = @version.read_limits(limit, page_size)
65
74
 
66
75
  page = self.page(
76
+ status: status,
77
+ assignment_status: assignment_status,
78
+ reservation_status: reservation_status,
67
79
  page_size: limits['page_size'],
68
80
  )
69
81
 
@@ -74,6 +86,9 @@ module Twilio
74
86
  # When passed a block, yields ReservationInstance records from the API.
75
87
  # This operation lazily loads records as efficiently as possible until the limit
76
88
  # is reached.
89
+ # @param [String] status The status
90
+ # @param [String] assignment_status The assignment_status
91
+ # @param [String] reservation_status The reservation_status
77
92
  # @param [Integer] limit Upper limit for the number of records to return. stream()
78
93
  # guarantees to never return more than limit. Default is no limit
79
94
  # @param [Integer] page_size Number of records to fetch per request, when not set will use
@@ -95,13 +110,19 @@ module Twilio
95
110
  ##
96
111
  # Retrieve a single page of ReservationInstance records from the API.
97
112
  # Request is executed immediately.
113
+ # @param [String] status The status
114
+ # @param [String] assignment_status The assignment_status
115
+ # @param [String] reservation_status The reservation_status
98
116
  # @param [String] page_token PageToken provided by the API
99
117
  # @param [Integer] page_number Page Number, this value is simply for client state
100
118
  # @param [Integer] page_size Number of records to return, defaults to 50
101
119
 
102
120
  # @return [Page] Page of ReservationInstance
103
- def page(page_token: nil, page_number: nil, page_size: nil)
121
+ def page(status: nil, assignment_status: nil, reservation_status: nil, page_token: nil, page_number: nil, page_size: nil)
104
122
  params = {
123
+ 'Status' => status,
124
+ 'AssignmentStatus' => assignment_status,
125
+ 'ReservationStatus' => reservation_status,
105
126
  'PageToken' => page_token,
106
127
  'Page' => page_number,
107
128
  'PageSize' => page_size,
@@ -219,12 +240,47 @@ module Twilio
219
240
  # Update the ReservationInstance
220
241
  # @param [String] reservation_status The reservation_status
221
242
  # @param [String] worker_activity_sid The worker_activity_sid
243
+ # @param [String] instruction The instruction
244
+ # @param [String] dequeue_post_work_activity_sid The
245
+ # dequeue_post_work_activity_sid
246
+ # @param [String] dequeue_from The dequeue_from
247
+ # @param [String] dequeue_record The dequeue_record
248
+ # @param [String] dequeue_timeout The dequeue_timeout
249
+ # @param [String] dequeue_to The dequeue_to
250
+ # @param [String] dequeue_status_callback_url The dequeue_status_callback_url
251
+ # @param [String] call_from The call_from
252
+ # @param [String] call_record The call_record
253
+ # @param [String] call_timeout The call_timeout
254
+ # @param [String] call_to The call_to
255
+ # @param [String] call_url The call_url
256
+ # @param [String] call_status_callback_url The call_status_callback_url
257
+ # @param [Boolean] call_accept The call_accept
258
+ # @param [String] redirect_call_sid The redirect_call_sid
259
+ # @param [Boolean] redirect_accept The redirect_accept
260
+ # @param [String] redirect_url The redirect_url
222
261
 
223
262
  # @return [ReservationInstance] Updated ReservationInstance
224
- def update(reservation_status: nil, worker_activity_sid: nil)
263
+ def update(reservation_status: nil, worker_activity_sid: nil, instruction: nil, dequeue_post_work_activity_sid: nil, dequeue_from: nil, dequeue_record: nil, dequeue_timeout: nil, dequeue_to: nil, dequeue_status_callback_url: nil, call_from: nil, call_record: nil, call_timeout: nil, call_to: nil, call_url: nil, call_status_callback_url: nil, call_accept: nil, redirect_call_sid: nil, redirect_accept: nil, redirect_url: nil)
225
264
  data = {
226
265
  'ReservationStatus' => reservation_status,
227
266
  'WorkerActivitySid' => worker_activity_sid,
267
+ 'Instruction' => instruction,
268
+ 'DequeuePostWorkActivitySid' => dequeue_post_work_activity_sid,
269
+ 'DequeueFrom' => dequeue_from,
270
+ 'DequeueRecord' => dequeue_record,
271
+ 'DequeueTimeout' => dequeue_timeout,
272
+ 'DequeueTo' => dequeue_to,
273
+ 'DequeueStatusCallbackUrl' => dequeue_status_callback_url,
274
+ 'CallFrom' => call_from,
275
+ 'CallRecord' => call_record,
276
+ 'CallTimeout' => call_timeout,
277
+ 'CallTo' => call_to,
278
+ 'CallUrl' => call_url,
279
+ 'CallStatusCallbackUrl' => call_status_callback_url,
280
+ 'CallAccept' => call_accept,
281
+ 'RedirectCallSid' => redirect_call_sid,
282
+ 'RedirectAccept' => redirect_accept,
283
+ 'RedirectUrl' => redirect_url,
228
284
  }
229
285
 
230
286
  payload = @version.update(
@@ -350,11 +406,46 @@ module Twilio
350
406
  # Update the ReservationInstance
351
407
  # @param [String] reservation_status The reservation_status
352
408
  # @param [String] worker_activity_sid The worker_activity_sid
409
+ # @param [String] instruction The instruction
410
+ # @param [String] dequeue_post_work_activity_sid The
411
+ # dequeue_post_work_activity_sid
412
+ # @param [String] dequeue_from The dequeue_from
413
+ # @param [String] dequeue_record The dequeue_record
414
+ # @param [String] dequeue_timeout The dequeue_timeout
415
+ # @param [String] dequeue_to The dequeue_to
416
+ # @param [String] dequeue_status_callback_url The dequeue_status_callback_url
417
+ # @param [String] call_from The call_from
418
+ # @param [String] call_record The call_record
419
+ # @param [String] call_timeout The call_timeout
420
+ # @param [String] call_to The call_to
421
+ # @param [String] call_url The call_url
422
+ # @param [String] call_status_callback_url The call_status_callback_url
423
+ # @param [Boolean] call_accept The call_accept
424
+ # @param [String] redirect_call_sid The redirect_call_sid
425
+ # @param [Boolean] redirect_accept The redirect_accept
426
+ # @param [String] redirect_url The redirect_url
353
427
 
354
428
  # @return [ReservationInstance] Updated ReservationInstance
355
- def update(reservation_status: nil, worker_activity_sid: nil)
429
+ def update(reservation_status: nil, worker_activity_sid: nil, instruction: nil, dequeue_post_work_activity_sid: nil, dequeue_from: nil, dequeue_record: nil, dequeue_timeout: nil, dequeue_to: nil, dequeue_status_callback_url: nil, call_from: nil, call_record: nil, call_timeout: nil, call_to: nil, call_url: nil, call_status_callback_url: nil, call_accept: nil, redirect_call_sid: nil, redirect_accept: nil, redirect_url: nil)
356
430
  @context.update(
357
431
  worker_activity_sid: worker_activity_sid,
432
+ instruction: instruction,
433
+ dequeue_post_work_activity_sid: dequeue_post_work_activity_sid,
434
+ dequeue_from: dequeue_from,
435
+ dequeue_record: dequeue_record,
436
+ dequeue_timeout: dequeue_timeout,
437
+ dequeue_to: dequeue_to,
438
+ dequeue_status_callback_url: dequeue_status_callback_url,
439
+ call_from: call_from,
440
+ call_record: call_record,
441
+ call_timeout: call_timeout,
442
+ call_to: call_to,
443
+ call_url: call_url,
444
+ call_status_callback_url: call_status_callback_url,
445
+ call_accept: call_accept,
446
+ redirect_call_sid: redirect_call_sid,
447
+ redirect_accept: redirect_accept,
448
+ redirect_url: redirect_url,
358
449
  )
359
450
  end
360
451
 
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.0.0.rc3'
2
+ VERSION = '5.0.0.rc4'
3
3
  end
@@ -22,6 +22,65 @@ describe 'Credential' do
22
22
  ))).to eq(true)
23
23
  end
24
24
 
25
+ it "receives read_full responses" do
26
+ @holodeck.mock(Twilio::TwilioResponse.new(
27
+ 200,
28
+ %q[
29
+ {
30
+ "credentials": [
31
+ {
32
+ "sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
33
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34
+ "friendly_name": "Test slow create",
35
+ "type": "apn",
36
+ "sandbox": "False",
37
+ "date_created": "2015-10-07T17:50:01Z",
38
+ "date_updated": "2015-10-07T17:50:01Z",
39
+ "url": "https://ip-messaging.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
40
+ }
41
+ ],
42
+ "meta": {
43
+ "page": 0,
44
+ "page_size": 1,
45
+ "first_page_url": "https://ip-messaging.twilio.com/v1/Credentials?PageSize=1&Page=0",
46
+ "previous_page_url": null,
47
+ "url": "https://ip-messaging.twilio.com/v1/Credentials?PageSize=1&Page=0",
48
+ "next_page_url": "https://ip-messaging.twilio.com/v1/Credentials?PageSize=1&Page=1&PageToken=PTMDAwMTQ0NDI0MDIwMTE3MjoxOjE%3D",
49
+ "key": "credentials"
50
+ }
51
+ }
52
+ ]
53
+ ))
54
+
55
+ actual = @client.ip_messaging.v1.credentials.list()
56
+
57
+ expect(actual).to_not eq(nil)
58
+ end
59
+
60
+ it "receives read_empty responses" do
61
+ @holodeck.mock(Twilio::TwilioResponse.new(
62
+ 200,
63
+ %q[
64
+ {
65
+ "credentials": [],
66
+ "meta": {
67
+ "page": 0,
68
+ "page_size": 1,
69
+ "first_page_url": "https://ip-messaging.twilio.com/v1/Credentials?PageSize=1&Page=0",
70
+ "previous_page_url": null,
71
+ "url": "https://ip-messaging.twilio.com/v1/Credentials?PageSize=1&Page=0",
72
+ "next_page_url": null,
73
+ "key": "credentials"
74
+ }
75
+ }
76
+ ]
77
+ ))
78
+
79
+ actual = @client.ip_messaging.v1.credentials.list()
80
+
81
+ expect(actual).to_not eq(nil)
82
+ end
83
+
25
84
  it "can create" do
26
85
  @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
27
86
 
@@ -41,6 +100,28 @@ describe 'Credential' do
41
100
  ))).to eq(true)
42
101
  end
43
102
 
103
+ it "receives create responses" do
104
+ @holodeck.mock(Twilio::TwilioResponse.new(
105
+ 201,
106
+ %q[
107
+ {
108
+ "sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
109
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
110
+ "friendly_name": "Test slow create",
111
+ "type": "apn",
112
+ "sandbox": "False",
113
+ "date_created": "2015-10-07T17:50:01Z",
114
+ "date_updated": "2015-10-07T17:50:01Z",
115
+ "url": "https://ip-messaging.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
116
+ }
117
+ ]
118
+ ))
119
+
120
+ actual = @client.ip_messaging.v1.credentials.create(friendly_name: "friendly_name", type: "gcm")
121
+
122
+ expect(actual).to_not eq(nil)
123
+ end
124
+
44
125
  it "can fetch" do
45
126
  @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
46
127
 
@@ -56,6 +137,28 @@ describe 'Credential' do
56
137
  ))).to eq(true)
57
138
  end
58
139
 
140
+ it "receives fetch responses" do
141
+ @holodeck.mock(Twilio::TwilioResponse.new(
142
+ 200,
143
+ %q[
144
+ {
145
+ "sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
146
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
147
+ "friendly_name": "Test slow create",
148
+ "type": "apn",
149
+ "sandbox": "False",
150
+ "date_created": "2015-10-07T17:50:01Z",
151
+ "date_updated": "2015-10-07T17:50:01Z",
152
+ "url": "https://ip-messaging.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
153
+ }
154
+ ]
155
+ ))
156
+
157
+ actual = @client.ip_messaging.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
158
+
159
+ expect(actual).to_not eq(nil)
160
+ end
161
+
59
162
  it "can update" do
60
163
  @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
61
164
 
@@ -75,6 +178,28 @@ describe 'Credential' do
75
178
  ))).to eq(true)
76
179
  end
77
180
 
181
+ it "receives update responses" do
182
+ @holodeck.mock(Twilio::TwilioResponse.new(
183
+ 200,
184
+ %q[
185
+ {
186
+ "sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
187
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
188
+ "friendly_name": "Test slow create",
189
+ "type": "apn",
190
+ "sandbox": "False",
191
+ "date_created": "2015-10-07T17:50:01Z",
192
+ "date_updated": "2015-10-07T17:50:01Z",
193
+ "url": "https://ip-messaging.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
194
+ }
195
+ ]
196
+ ))
197
+
198
+ actual = @client.ip_messaging.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(friendly_name: "friendly_name", type: "gcm")
199
+
200
+ expect(actual).to_not eq(nil)
201
+ end
202
+
78
203
  it "can delete" do
79
204
  @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
80
205
 
@@ -89,4 +214,15 @@ describe 'Credential' do
89
214
  url: 'https://ip-messaging.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
90
215
  ))).to eq(true)
91
216
  end
217
+
218
+ it "receives delete responses" do
219
+ @holodeck.mock(Twilio::TwilioResponse.new(
220
+ 204,
221
+ nil,
222
+ ))
223
+
224
+ actual = @client.ip_messaging.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
225
+
226
+ expect(actual).to eq(true)
227
+ end
92
228
  end
@@ -24,6 +24,33 @@ describe 'Member' do
24
24
  ))).to eq(true)
25
25
  end
26
26
 
27
+ it "receives fetch responses" do
28
+ @holodeck.mock(Twilio::TwilioResponse.new(
29
+ 200,
30
+ %q[
31
+ {
32
+ "sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
33
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34
+ "channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35
+ "service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
+ "identity": "jing",
37
+ "role_sid": "RL003876fe89d744dfa576824b53c26784",
38
+ "last_consumed_message_index": null,
39
+ "last_consumption_timestamp": null,
40
+ "date_created": "2016-03-24T21:05:50Z",
41
+ "date_updated": "2016-03-24T21:05:50Z",
42
+ "url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
43
+ }
44
+ ]
45
+ ))
46
+
47
+ actual = @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
48
+ .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
49
+ .members("MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
50
+
51
+ expect(actual).to_not eq(nil)
52
+ end
53
+
27
54
  it "can create" do
28
55
  @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
29
56
 
@@ -44,6 +71,33 @@ describe 'Member' do
44
71
  ))).to eq(true)
45
72
  end
46
73
 
74
+ it "receives create responses" do
75
+ @holodeck.mock(Twilio::TwilioResponse.new(
76
+ 201,
77
+ %q[
78
+ {
79
+ "sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
80
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
81
+ "channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
82
+ "service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
83
+ "identity": "jing",
84
+ "role_sid": "RL003876fe89d744dfa576824b53c26784",
85
+ "last_consumed_message_index": null,
86
+ "last_consumption_timestamp": null,
87
+ "date_created": "2016-03-24T21:05:50Z",
88
+ "date_updated": "2016-03-24T21:05:50Z",
89
+ "url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
90
+ }
91
+ ]
92
+ ))
93
+
94
+ actual = @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
95
+ .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
96
+ .members.create(identity: "identity")
97
+
98
+ expect(actual).to_not eq(nil)
99
+ end
100
+
47
101
  it "can read" do
48
102
  @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
49
103
 
@@ -61,6 +115,72 @@ describe 'Member' do
61
115
  ))).to eq(true)
62
116
  end
63
117
 
118
+ it "receives read_full responses" do
119
+ @holodeck.mock(Twilio::TwilioResponse.new(
120
+ 200,
121
+ %q[
122
+ {
123
+ "meta": {
124
+ "page": 0,
125
+ "page_size": 1,
126
+ "first_page_url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members?PageSize=1&Page=0",
127
+ "previous_page_url": null,
128
+ "url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members?PageSize=1&Page=0",
129
+ "next_page_url": null,
130
+ "key": "members"
131
+ },
132
+ "members": [
133
+ {
134
+ "sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
135
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
136
+ "channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
137
+ "service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
138
+ "identity": "jing",
139
+ "role_sid": "RL003876fe89d744dfa576824b53c26784",
140
+ "last_consumed_message_index": null,
141
+ "last_consumption_timestamp": null,
142
+ "date_created": "2016-03-24T21:05:50Z",
143
+ "date_updated": "2016-03-24T21:05:50Z",
144
+ "url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
145
+ }
146
+ ]
147
+ }
148
+ ]
149
+ ))
150
+
151
+ actual = @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
152
+ .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
153
+ .members.list()
154
+
155
+ expect(actual).to_not eq(nil)
156
+ end
157
+
158
+ it "receives read_empty responses" do
159
+ @holodeck.mock(Twilio::TwilioResponse.new(
160
+ 200,
161
+ %q[
162
+ {
163
+ "meta": {
164
+ "page": 0,
165
+ "page_size": 1,
166
+ "first_page_url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members?PageSize=1&Page=0",
167
+ "previous_page_url": null,
168
+ "url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members?PageSize=1&Page=0",
169
+ "next_page_url": null,
170
+ "key": "members"
171
+ },
172
+ "members": []
173
+ }
174
+ ]
175
+ ))
176
+
177
+ actual = @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
178
+ .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
179
+ .members.list()
180
+
181
+ expect(actual).to_not eq(nil)
182
+ end
183
+
64
184
  it "can delete" do
65
185
  @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
66
186
 
@@ -77,4 +197,17 @@ describe 'Member' do
77
197
  url: 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
78
198
  ))).to eq(true)
79
199
  end
200
+
201
+ it "receives delete responses" do
202
+ @holodeck.mock(Twilio::TwilioResponse.new(
203
+ 204,
204
+ nil,
205
+ ))
206
+
207
+ actual = @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
208
+ .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
209
+ .members("MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
210
+
211
+ expect(actual).to eq(true)
212
+ end
80
213
  end