twilio-ruby 5.7.0 → 5.7.1
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.
- checksums.yaml +4 -4
- data/CHANGES.md +13 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +9 -1
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +7 -16
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +7 -25
- data/lib/twilio-ruby/rest/video/v1/composition.rb +16 -3
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/studio/v1/flow/engagement/step_spec.rb +2 -4
- data/spec/integration/studio/v1/flow/engagement_spec.rb +8 -4
- data/spec/integration/video/v1/composition_spec.rb +3 -0
- metadata +2 -8
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb +0 -215
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb +0 -230
- data/spec/integration/studio/v1/flow/engagement/engagement_context_spec.rb +0 -49
- data/spec/integration/studio/v1/flow/engagement/step/step_context_spec.rb +0 -52
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 739e64ed88c197acb2ad3f6e2a24892379b9113a
|
4
|
+
data.tar.gz: 5032005bd70defd556793d46340e7daea90c75f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cfb21a2b9d9ea4395f5af8bcb67440558016bb4820db24bacff9c255227894931f7c76630c1ea5fb8faf897f58d8881e63aa44a2bbcfd391418fcde198976cb
|
7
|
+
data.tar.gz: b962b9d40e2bc71db724bcb4842b62c6e4baecde44fe1bd16f19ce18ee6f7995c25d25d237ccdefe611749d0a0d4702e2b8416ba154514b896333f47f865aa8a
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,19 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2018-03-09] Version 5.7.1
|
5
|
+
---------------------------
|
6
|
+
**Api**
|
7
|
+
- Add `caller_id` param to Outbound Calls API
|
8
|
+
- Release `trim` recording Outbound Calls API functionality in helper libraries
|
9
|
+
|
10
|
+
**Video**
|
11
|
+
- Add `room_sid` to Composition resource.
|
12
|
+
|
13
|
+
**Twiml**
|
14
|
+
- Adds support for passing in multiple input type enums when setting `input` on `Gather`
|
15
|
+
|
16
|
+
|
4
17
|
[2018-03-02] Version 5.7.0
|
5
18
|
---------------------------
|
6
19
|
**TwiML**
|
data/README.md
CHANGED
@@ -27,13 +27,13 @@ in-line code documentation here in the library.
|
|
27
27
|
To install using [Bundler][bundler] grab the latest stable version:
|
28
28
|
|
29
29
|
```ruby
|
30
|
-
gem 'twilio-ruby', '~> 5.7.
|
30
|
+
gem 'twilio-ruby', '~> 5.7.1'
|
31
31
|
```
|
32
32
|
|
33
33
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
34
34
|
|
35
35
|
```bash
|
36
|
-
gem install twilio-ruby -v 5.7.
|
36
|
+
gem install twilio-ruby -v 5.7.1
|
37
37
|
```
|
38
38
|
|
39
39
|
To build and install the development branch yourself from the latest source:
|
@@ -78,6 +78,12 @@ module Twilio
|
|
78
78
|
# Twilio should wait while machine_detection is performned before timing out.
|
79
79
|
# @param [String] recording_status_callback_event The
|
80
80
|
# recording_status_callback_event
|
81
|
+
# @param [String] trim Set this parameter to control trimming of silence on the
|
82
|
+
# recording. Possible values are `trim-silence` or `do-not-trim`. Defaults to
|
83
|
+
# `trim-silence`.
|
84
|
+
# @param [String] caller_id The phone number, SIP address or Client identifier
|
85
|
+
# that made this Call. Phone numbers are in E.164 format (e.g. +16175551212). SIP
|
86
|
+
# addresses are formatted as `name@company.com`.
|
81
87
|
# @param [String] url The fully qualified URL that should be consulted when the
|
82
88
|
# call connects. Just like when you set a URL on a phone number for handling
|
83
89
|
# inbound calls.
|
@@ -85,7 +91,7 @@ module Twilio
|
|
85
91
|
# should use to handle this phone call. If this parameter is present, Twilio will
|
86
92
|
# ignore all of the voice URLs passed and use the URLs set on the application.
|
87
93
|
# @return [CallInstance] Newly created CallInstance
|
88
|
-
def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, if_machine: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, url: :unset, application_sid: :unset)
|
94
|
+
def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, if_machine: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, url: :unset, application_sid: :unset)
|
89
95
|
data = Twilio::Values.of({
|
90
96
|
'To' => to,
|
91
97
|
'From' => from,
|
@@ -109,6 +115,8 @@ module Twilio
|
|
109
115
|
'MachineDetection' => machine_detection,
|
110
116
|
'MachineDetectionTimeout' => machine_detection_timeout,
|
111
117
|
'RecordingStatusCallbackEvent' => Twilio.serialize_list(recording_status_callback_event) { |e| e },
|
118
|
+
'Trim' => trim,
|
119
|
+
'CallerId' => caller_id,
|
112
120
|
})
|
113
121
|
|
114
122
|
payload = @version.create(
|
@@ -182,7 +182,6 @@ module Twilio
|
|
182
182
|
|
183
183
|
# Dependents
|
184
184
|
@steps = nil
|
185
|
-
@engagement_context = nil
|
186
185
|
end
|
187
186
|
|
188
187
|
##
|
@@ -218,14 +217,6 @@ module Twilio
|
|
218
217
|
@steps
|
219
218
|
end
|
220
219
|
|
221
|
-
##
|
222
|
-
# Access the engagement_context
|
223
|
-
# @return [EngagementContextList]
|
224
|
-
# @return [EngagementContextContext]
|
225
|
-
def engagement_context
|
226
|
-
EngagementContextContext.new(@version, @solution[:flow_sid], @solution[:sid], )
|
227
|
-
end
|
228
|
-
|
229
220
|
##
|
230
221
|
# Provide a user friendly representation
|
231
222
|
def to_s
|
@@ -255,6 +246,7 @@ module Twilio
|
|
255
246
|
'contact_sid' => payload['contact_sid'],
|
256
247
|
'contact_channel_address' => payload['contact_channel_address'],
|
257
248
|
'status' => payload['status'],
|
249
|
+
'context' => payload['context'],
|
258
250
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
259
251
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
260
252
|
'url' => payload['url'],
|
@@ -313,6 +305,12 @@ module Twilio
|
|
313
305
|
@properties['status']
|
314
306
|
end
|
315
307
|
|
308
|
+
##
|
309
|
+
# @return [Hash] The context
|
310
|
+
def context
|
311
|
+
@properties['context']
|
312
|
+
end
|
313
|
+
|
316
314
|
##
|
317
315
|
# @return [Time] The date_created
|
318
316
|
def date_created
|
@@ -351,13 +349,6 @@ module Twilio
|
|
351
349
|
context.steps
|
352
350
|
end
|
353
351
|
|
354
|
-
##
|
355
|
-
# Access the engagement_context
|
356
|
-
# @return [engagement_context] engagement_context
|
357
|
-
def engagement_context
|
358
|
-
context.engagement_context
|
359
|
-
end
|
360
|
-
|
361
352
|
##
|
362
353
|
# Provide a user friendly representation
|
363
354
|
def to_s
|
@@ -168,9 +168,6 @@ module Twilio
|
|
168
168
|
# Path Solution
|
169
169
|
@solution = {flow_sid: flow_sid, engagement_sid: engagement_sid, sid: sid, }
|
170
170
|
@uri = "/Flows/#{@solution[:flow_sid]}/Engagements/#{@solution[:engagement_sid]}/Steps/#{@solution[:sid]}"
|
171
|
-
|
172
|
-
# Dependents
|
173
|
-
@step_context = nil
|
174
171
|
end
|
175
172
|
|
176
173
|
##
|
@@ -194,14 +191,6 @@ module Twilio
|
|
194
191
|
)
|
195
192
|
end
|
196
193
|
|
197
|
-
##
|
198
|
-
# Access the step_context
|
199
|
-
# @return [StepContextList]
|
200
|
-
# @return [StepContextContext]
|
201
|
-
def step_context
|
202
|
-
StepContextContext.new(@version, @solution[:flow_sid], @solution[:engagement_sid], @solution[:sid], )
|
203
|
-
end
|
204
|
-
|
205
194
|
##
|
206
195
|
# Provide a user friendly representation
|
207
196
|
def to_s
|
@@ -231,12 +220,12 @@ module Twilio
|
|
231
220
|
'flow_sid' => payload['flow_sid'],
|
232
221
|
'engagement_sid' => payload['engagement_sid'],
|
233
222
|
'name' => payload['name'],
|
223
|
+
'context' => payload['context'],
|
234
224
|
'transitioned_from' => payload['transitioned_from'],
|
235
225
|
'transitioned_to' => payload['transitioned_to'],
|
236
226
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
237
227
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
238
228
|
'url' => payload['url'],
|
239
|
-
'links' => payload['links'],
|
240
229
|
}
|
241
230
|
|
242
231
|
# Context
|
@@ -294,6 +283,12 @@ module Twilio
|
|
294
283
|
@properties['name']
|
295
284
|
end
|
296
285
|
|
286
|
+
##
|
287
|
+
# @return [Hash] The context
|
288
|
+
def context
|
289
|
+
@properties['context']
|
290
|
+
end
|
291
|
+
|
297
292
|
##
|
298
293
|
# @return [String] The transitioned_from
|
299
294
|
def transitioned_from
|
@@ -324,12 +319,6 @@ module Twilio
|
|
324
319
|
@properties['url']
|
325
320
|
end
|
326
321
|
|
327
|
-
##
|
328
|
-
# @return [String] The links
|
329
|
-
def links
|
330
|
-
@properties['links']
|
331
|
-
end
|
332
|
-
|
333
322
|
##
|
334
323
|
# Fetch a StepInstance
|
335
324
|
# @return [StepInstance] Fetched StepInstance
|
@@ -337,13 +326,6 @@ module Twilio
|
|
337
326
|
context.fetch
|
338
327
|
end
|
339
328
|
|
340
|
-
##
|
341
|
-
# Access the step_context
|
342
|
-
# @return [step_context] step_context
|
343
|
-
def step_context
|
344
|
-
context.step_context
|
345
|
-
end
|
346
|
-
|
347
329
|
##
|
348
330
|
# Provide a user friendly representation
|
349
331
|
def to_s
|
@@ -30,6 +30,7 @@ module Twilio
|
|
30
30
|
# @param [composition.Status] status The status
|
31
31
|
# @param [Time] date_created_after The date_created_after
|
32
32
|
# @param [Time] date_created_before The date_created_before
|
33
|
+
# @param [String] room_sid The room_sid
|
33
34
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
34
35
|
# guarantees to never return more than limit. Default is no limit
|
35
36
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -37,11 +38,12 @@ module Twilio
|
|
37
38
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
38
39
|
# efficient page size, i.e. min(limit, 1000)
|
39
40
|
# @return [Array] Array of up to limit results
|
40
|
-
def list(status: :unset, date_created_after: :unset, date_created_before: :unset, limit: nil, page_size: nil)
|
41
|
+
def list(status: :unset, date_created_after: :unset, date_created_before: :unset, room_sid: :unset, limit: nil, page_size: nil)
|
41
42
|
self.stream(
|
42
43
|
status: status,
|
43
44
|
date_created_after: date_created_after,
|
44
45
|
date_created_before: date_created_before,
|
46
|
+
room_sid: room_sid,
|
45
47
|
limit: limit,
|
46
48
|
page_size: page_size
|
47
49
|
).entries
|
@@ -54,6 +56,7 @@ module Twilio
|
|
54
56
|
# @param [composition.Status] status The status
|
55
57
|
# @param [Time] date_created_after The date_created_after
|
56
58
|
# @param [Time] date_created_before The date_created_before
|
59
|
+
# @param [String] room_sid The room_sid
|
57
60
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
58
61
|
# guarantees to never return more than limit. Default is no limit.
|
59
62
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -61,13 +64,14 @@ module Twilio
|
|
61
64
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
62
65
|
# efficient page size, i.e. min(limit, 1000)
|
63
66
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
64
|
-
def stream(status: :unset, date_created_after: :unset, date_created_before: :unset, limit: nil, page_size: nil)
|
67
|
+
def stream(status: :unset, date_created_after: :unset, date_created_before: :unset, room_sid: :unset, limit: nil, page_size: nil)
|
65
68
|
limits = @version.read_limits(limit, page_size)
|
66
69
|
|
67
70
|
page = self.page(
|
68
71
|
status: status,
|
69
72
|
date_created_after: date_created_after,
|
70
73
|
date_created_before: date_created_before,
|
74
|
+
room_sid: room_sid,
|
71
75
|
page_size: limits[:page_size],
|
72
76
|
)
|
73
77
|
|
@@ -94,15 +98,17 @@ module Twilio
|
|
94
98
|
# @param [composition.Status] status The status
|
95
99
|
# @param [Time] date_created_after The date_created_after
|
96
100
|
# @param [Time] date_created_before The date_created_before
|
101
|
+
# @param [String] room_sid The room_sid
|
97
102
|
# @param [String] page_token PageToken provided by the API
|
98
103
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
99
104
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
100
105
|
# @return [Page] Page of CompositionInstance
|
101
|
-
def page(status: :unset, date_created_after: :unset, date_created_before: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
106
|
+
def page(status: :unset, date_created_after: :unset, date_created_before: :unset, room_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
102
107
|
params = Twilio::Values.of({
|
103
108
|
'Status' => status,
|
104
109
|
'DateCreatedAfter' => Twilio.serialize_iso8601_datetime(date_created_after),
|
105
110
|
'DateCreatedBefore' => Twilio.serialize_iso8601_datetime(date_created_before),
|
111
|
+
'RoomSid' => room_sid,
|
106
112
|
'PageToken' => page_token,
|
107
113
|
'Page' => page_number,
|
108
114
|
'PageSize' => page_size,
|
@@ -280,6 +286,7 @@ module Twilio
|
|
280
286
|
'size' => payload['size'].to_i,
|
281
287
|
'duration' => payload['duration'].to_i,
|
282
288
|
'url' => payload['url'],
|
289
|
+
'room_sid' => payload['room_sid'],
|
283
290
|
'links' => payload['links'],
|
284
291
|
}
|
285
292
|
|
@@ -389,6 +396,12 @@ module Twilio
|
|
389
396
|
@properties['url']
|
390
397
|
end
|
391
398
|
|
399
|
+
##
|
400
|
+
# @return [String] The room_sid
|
401
|
+
def room_sid
|
402
|
+
@properties['room_sid']
|
403
|
+
end
|
404
|
+
|
392
405
|
##
|
393
406
|
# @return [String] The links
|
394
407
|
def links
|
data/lib/twilio-ruby/version.rb
CHANGED
@@ -77,14 +77,12 @@ describe 'Step' do
|
|
77
77
|
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
78
78
|
"engagement_sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
79
79
|
"name": "incomingRequest",
|
80
|
+
"context": {},
|
80
81
|
"transitioned_from": "Trigger",
|
81
82
|
"transitioned_to": "Ended",
|
82
83
|
"date_created": "2017-11-06T12:00:00Z",
|
83
84
|
"date_updated": null,
|
84
|
-
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
85
|
-
"links": {
|
86
|
-
"step_context": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
|
87
|
-
}
|
85
|
+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
88
86
|
}
|
89
87
|
]
|
90
88
|
))
|
@@ -75,12 +75,12 @@ describe 'Engagement' do
|
|
75
75
|
"contact_sid": "FCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
76
76
|
"contact_channel_address": "+14155555555",
|
77
77
|
"status": "ended",
|
78
|
+
"context": {},
|
78
79
|
"date_created": "2017-11-06T12:00:00Z",
|
79
80
|
"date_updated": null,
|
80
81
|
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
81
82
|
"links": {
|
82
|
-
"steps": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps"
|
83
|
-
"engagement_context": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
|
83
|
+
"steps": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps"
|
84
84
|
}
|
85
85
|
}
|
86
86
|
]
|
@@ -118,14 +118,18 @@ describe 'Engagement' do
|
|
118
118
|
"sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
119
119
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
120
120
|
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
121
|
+
"context": {
|
122
|
+
"flow": {
|
123
|
+
"first_name": "Foo"
|
124
|
+
}
|
125
|
+
},
|
121
126
|
"contact_sid": "FCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
122
127
|
"contact_channel_address": "+18001234567",
|
123
128
|
"status": "active",
|
124
129
|
"date_created": "2015-07-30T20:00:00Z",
|
125
130
|
"date_updated": "2015-07-30T20:00:00Z",
|
126
131
|
"links": {
|
127
|
-
"steps": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps"
|
128
|
-
"engagement_context": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
|
132
|
+
"steps": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps"
|
129
133
|
}
|
130
134
|
}
|
131
135
|
]
|
@@ -45,6 +45,7 @@ describe 'Composition' do
|
|
45
45
|
"bitrate": 64,
|
46
46
|
"size": 4,
|
47
47
|
"duration": 6,
|
48
|
+
"room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
48
49
|
"url": "https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
49
50
|
"links": {
|
50
51
|
"media": "https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media"
|
@@ -121,6 +122,7 @@ describe 'Composition' do
|
|
121
122
|
"bitrate": 16,
|
122
123
|
"size": 55,
|
123
124
|
"duration": 10,
|
125
|
+
"room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
124
126
|
"url": "https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
125
127
|
"links": {
|
126
128
|
"media": "https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media"
|
@@ -208,6 +210,7 @@ describe 'Composition' do
|
|
208
210
|
"bitrate": 0,
|
209
211
|
"size": 0,
|
210
212
|
"duration": 1,
|
213
|
+
"room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
211
214
|
"url": "https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
212
215
|
"links": {
|
213
216
|
"media": "https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media"
|
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.7.
|
4
|
+
version: 5.7.1
|
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-03-
|
11
|
+
date: 2018-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -381,9 +381,7 @@ files:
|
|
381
381
|
- lib/twilio-ruby/rest/studio/v1.rb
|
382
382
|
- lib/twilio-ruby/rest/studio/v1/flow.rb
|
383
383
|
- lib/twilio-ruby/rest/studio/v1/flow/engagement.rb
|
384
|
-
- lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb
|
385
384
|
- lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb
|
386
|
-
- lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb
|
387
385
|
- lib/twilio-ruby/rest/sync.rb
|
388
386
|
- lib/twilio-ruby/rest/sync/v1.rb
|
389
387
|
- lib/twilio-ruby/rest/sync/v1/service.rb
|
@@ -648,8 +646,6 @@ files:
|
|
648
646
|
- spec/integration/proxy/v1/service/session_spec.rb
|
649
647
|
- spec/integration/proxy/v1/service/short_code_spec.rb
|
650
648
|
- spec/integration/proxy/v1/service_spec.rb
|
651
|
-
- spec/integration/studio/v1/flow/engagement/engagement_context_spec.rb
|
652
|
-
- spec/integration/studio/v1/flow/engagement/step/step_context_spec.rb
|
653
649
|
- spec/integration/studio/v1/flow/engagement/step_spec.rb
|
654
650
|
- spec/integration/studio/v1/flow/engagement_spec.rb
|
655
651
|
- spec/integration/studio/v1/flow_spec.rb
|
@@ -946,8 +942,6 @@ test_files:
|
|
946
942
|
- spec/integration/proxy/v1/service/session_spec.rb
|
947
943
|
- spec/integration/proxy/v1/service/short_code_spec.rb
|
948
944
|
- spec/integration/proxy/v1/service_spec.rb
|
949
|
-
- spec/integration/studio/v1/flow/engagement/engagement_context_spec.rb
|
950
|
-
- spec/integration/studio/v1/flow/engagement/step/step_context_spec.rb
|
951
945
|
- spec/integration/studio/v1/flow/engagement/step_spec.rb
|
952
946
|
- spec/integration/studio/v1/flow/engagement_spec.rb
|
953
947
|
- spec/integration/studio/v1/flow_spec.rb
|
@@ -1,215 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
|
7
|
-
module Twilio
|
8
|
-
module REST
|
9
|
-
class Studio < Domain
|
10
|
-
class V1 < Version
|
11
|
-
class FlowContext < InstanceContext
|
12
|
-
class EngagementContext < InstanceContext
|
13
|
-
##
|
14
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
-
class EngagementContextList < ListResource
|
16
|
-
##
|
17
|
-
# Initialize the EngagementContextList
|
18
|
-
# @param [Version] version Version that contains the resource
|
19
|
-
# @param [String] flow_sid The flow_sid
|
20
|
-
# @param [String] engagement_sid The engagement_sid
|
21
|
-
# @return [EngagementContextList] EngagementContextList
|
22
|
-
def initialize(version, flow_sid: nil, engagement_sid: nil)
|
23
|
-
super(version)
|
24
|
-
|
25
|
-
# Path Solution
|
26
|
-
@solution = {flow_sid: flow_sid, engagement_sid: engagement_sid}
|
27
|
-
end
|
28
|
-
|
29
|
-
##
|
30
|
-
# Provide a user friendly representation
|
31
|
-
def to_s
|
32
|
-
'#<Twilio.Studio.V1.EngagementContextList>'
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
##
|
37
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
38
|
-
class EngagementContextPage < Page
|
39
|
-
##
|
40
|
-
# Initialize the EngagementContextPage
|
41
|
-
# @param [Version] version Version that contains the resource
|
42
|
-
# @param [Response] response Response from the API
|
43
|
-
# @param [Hash] solution Path solution for the resource
|
44
|
-
# @return [EngagementContextPage] EngagementContextPage
|
45
|
-
def initialize(version, response, solution)
|
46
|
-
super(version, response)
|
47
|
-
|
48
|
-
# Path Solution
|
49
|
-
@solution = solution
|
50
|
-
end
|
51
|
-
|
52
|
-
##
|
53
|
-
# Build an instance of EngagementContextInstance
|
54
|
-
# @param [Hash] payload Payload response from the API
|
55
|
-
# @return [EngagementContextInstance] EngagementContextInstance
|
56
|
-
def get_instance(payload)
|
57
|
-
EngagementContextInstance.new(
|
58
|
-
@version,
|
59
|
-
payload,
|
60
|
-
flow_sid: @solution[:flow_sid],
|
61
|
-
engagement_sid: @solution[:engagement_sid],
|
62
|
-
)
|
63
|
-
end
|
64
|
-
|
65
|
-
##
|
66
|
-
# Provide a user friendly representation
|
67
|
-
def to_s
|
68
|
-
'<Twilio.Studio.V1.EngagementContextPage>'
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
##
|
73
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
74
|
-
class EngagementContextContext < InstanceContext
|
75
|
-
##
|
76
|
-
# Initialize the EngagementContextContext
|
77
|
-
# @param [Version] version Version that contains the resource
|
78
|
-
# @param [String] flow_sid The flow_sid
|
79
|
-
# @param [String] engagement_sid The engagement_sid
|
80
|
-
# @return [EngagementContextContext] EngagementContextContext
|
81
|
-
def initialize(version, flow_sid, engagement_sid)
|
82
|
-
super(version)
|
83
|
-
|
84
|
-
# Path Solution
|
85
|
-
@solution = {flow_sid: flow_sid, engagement_sid: engagement_sid, }
|
86
|
-
@uri = "/Flows/#{@solution[:flow_sid]}/Engagements/#{@solution[:engagement_sid]}/Context"
|
87
|
-
end
|
88
|
-
|
89
|
-
##
|
90
|
-
# Fetch a EngagementContextInstance
|
91
|
-
# @return [EngagementContextInstance] Fetched EngagementContextInstance
|
92
|
-
def fetch
|
93
|
-
params = Twilio::Values.of({})
|
94
|
-
|
95
|
-
payload = @version.fetch(
|
96
|
-
'GET',
|
97
|
-
@uri,
|
98
|
-
params,
|
99
|
-
)
|
100
|
-
|
101
|
-
EngagementContextInstance.new(
|
102
|
-
@version,
|
103
|
-
payload,
|
104
|
-
flow_sid: @solution[:flow_sid],
|
105
|
-
engagement_sid: @solution[:engagement_sid],
|
106
|
-
)
|
107
|
-
end
|
108
|
-
|
109
|
-
##
|
110
|
-
# Provide a user friendly representation
|
111
|
-
def to_s
|
112
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
113
|
-
"#<Twilio.Studio.V1.EngagementContextContext #{context}>"
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
##
|
118
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
119
|
-
class EngagementContextInstance < InstanceResource
|
120
|
-
##
|
121
|
-
# Initialize the EngagementContextInstance
|
122
|
-
# @param [Version] version Version that contains the resource
|
123
|
-
# @param [Hash] payload payload that contains response from Twilio
|
124
|
-
# @param [String] flow_sid The flow_sid
|
125
|
-
# @param [String] engagement_sid The engagement_sid
|
126
|
-
# @return [EngagementContextInstance] EngagementContextInstance
|
127
|
-
def initialize(version, payload, flow_sid: nil, engagement_sid: nil)
|
128
|
-
super(version)
|
129
|
-
|
130
|
-
# Marshaled Properties
|
131
|
-
@properties = {
|
132
|
-
'account_sid' => payload['account_sid'],
|
133
|
-
'context' => payload['context'],
|
134
|
-
'engagement_sid' => payload['engagement_sid'],
|
135
|
-
'flow_sid' => payload['flow_sid'],
|
136
|
-
'url' => payload['url'],
|
137
|
-
}
|
138
|
-
|
139
|
-
# Context
|
140
|
-
@instance_context = nil
|
141
|
-
@params = {'flow_sid' => flow_sid, 'engagement_sid' => engagement_sid, }
|
142
|
-
end
|
143
|
-
|
144
|
-
##
|
145
|
-
# Generate an instance context for the instance, the context is capable of
|
146
|
-
# performing various actions. All instance actions are proxied to the context
|
147
|
-
# @return [EngagementContextContext] EngagementContextContext for this EngagementContextInstance
|
148
|
-
def context
|
149
|
-
unless @instance_context
|
150
|
-
@instance_context = EngagementContextContext.new(
|
151
|
-
@version,
|
152
|
-
@params['flow_sid'],
|
153
|
-
@params['engagement_sid'],
|
154
|
-
)
|
155
|
-
end
|
156
|
-
@instance_context
|
157
|
-
end
|
158
|
-
|
159
|
-
##
|
160
|
-
# @return [String] The account_sid
|
161
|
-
def account_sid
|
162
|
-
@properties['account_sid']
|
163
|
-
end
|
164
|
-
|
165
|
-
##
|
166
|
-
# @return [Hash] The context
|
167
|
-
def context
|
168
|
-
@properties['context']
|
169
|
-
end
|
170
|
-
|
171
|
-
##
|
172
|
-
# @return [String] The engagement_sid
|
173
|
-
def engagement_sid
|
174
|
-
@properties['engagement_sid']
|
175
|
-
end
|
176
|
-
|
177
|
-
##
|
178
|
-
# @return [String] The flow_sid
|
179
|
-
def flow_sid
|
180
|
-
@properties['flow_sid']
|
181
|
-
end
|
182
|
-
|
183
|
-
##
|
184
|
-
# @return [String] The url
|
185
|
-
def url
|
186
|
-
@properties['url']
|
187
|
-
end
|
188
|
-
|
189
|
-
##
|
190
|
-
# Fetch a EngagementContextInstance
|
191
|
-
# @return [EngagementContextInstance] Fetched EngagementContextInstance
|
192
|
-
def fetch
|
193
|
-
context.fetch
|
194
|
-
end
|
195
|
-
|
196
|
-
##
|
197
|
-
# Provide a user friendly representation
|
198
|
-
def to_s
|
199
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
200
|
-
"<Twilio.Studio.V1.EngagementContextInstance #{values}>"
|
201
|
-
end
|
202
|
-
|
203
|
-
##
|
204
|
-
# Provide a detailed, user friendly representation
|
205
|
-
def inspect
|
206
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
207
|
-
"<Twilio.Studio.V1.EngagementContextInstance #{values}>"
|
208
|
-
end
|
209
|
-
end
|
210
|
-
end
|
211
|
-
end
|
212
|
-
end
|
213
|
-
end
|
214
|
-
end
|
215
|
-
end
|
@@ -1,230 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
|
7
|
-
module Twilio
|
8
|
-
module REST
|
9
|
-
class Studio < Domain
|
10
|
-
class V1 < Version
|
11
|
-
class FlowContext < InstanceContext
|
12
|
-
class EngagementContext < InstanceContext
|
13
|
-
class StepContext < InstanceContext
|
14
|
-
##
|
15
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
16
|
-
class StepContextList < ListResource
|
17
|
-
##
|
18
|
-
# Initialize the StepContextList
|
19
|
-
# @param [Version] version Version that contains the resource
|
20
|
-
# @param [String] flow_sid The flow_sid
|
21
|
-
# @param [String] engagement_sid The engagement_sid
|
22
|
-
# @param [String] step_sid The step_sid
|
23
|
-
# @return [StepContextList] StepContextList
|
24
|
-
def initialize(version, flow_sid: nil, engagement_sid: nil, step_sid: nil)
|
25
|
-
super(version)
|
26
|
-
|
27
|
-
# Path Solution
|
28
|
-
@solution = {flow_sid: flow_sid, engagement_sid: engagement_sid, step_sid: step_sid}
|
29
|
-
end
|
30
|
-
|
31
|
-
##
|
32
|
-
# Provide a user friendly representation
|
33
|
-
def to_s
|
34
|
-
'#<Twilio.Studio.V1.StepContextList>'
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
##
|
39
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
40
|
-
class StepContextPage < Page
|
41
|
-
##
|
42
|
-
# Initialize the StepContextPage
|
43
|
-
# @param [Version] version Version that contains the resource
|
44
|
-
# @param [Response] response Response from the API
|
45
|
-
# @param [Hash] solution Path solution for the resource
|
46
|
-
# @return [StepContextPage] StepContextPage
|
47
|
-
def initialize(version, response, solution)
|
48
|
-
super(version, response)
|
49
|
-
|
50
|
-
# Path Solution
|
51
|
-
@solution = solution
|
52
|
-
end
|
53
|
-
|
54
|
-
##
|
55
|
-
# Build an instance of StepContextInstance
|
56
|
-
# @param [Hash] payload Payload response from the API
|
57
|
-
# @return [StepContextInstance] StepContextInstance
|
58
|
-
def get_instance(payload)
|
59
|
-
StepContextInstance.new(
|
60
|
-
@version,
|
61
|
-
payload,
|
62
|
-
flow_sid: @solution[:flow_sid],
|
63
|
-
engagement_sid: @solution[:engagement_sid],
|
64
|
-
step_sid: @solution[:step_sid],
|
65
|
-
)
|
66
|
-
end
|
67
|
-
|
68
|
-
##
|
69
|
-
# Provide a user friendly representation
|
70
|
-
def to_s
|
71
|
-
'<Twilio.Studio.V1.StepContextPage>'
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
##
|
76
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
77
|
-
class StepContextContext < InstanceContext
|
78
|
-
##
|
79
|
-
# Initialize the StepContextContext
|
80
|
-
# @param [Version] version Version that contains the resource
|
81
|
-
# @param [String] flow_sid The flow_sid
|
82
|
-
# @param [String] engagement_sid The engagement_sid
|
83
|
-
# @param [String] step_sid The step_sid
|
84
|
-
# @return [StepContextContext] StepContextContext
|
85
|
-
def initialize(version, flow_sid, engagement_sid, step_sid)
|
86
|
-
super(version)
|
87
|
-
|
88
|
-
# Path Solution
|
89
|
-
@solution = {flow_sid: flow_sid, engagement_sid: engagement_sid, step_sid: step_sid, }
|
90
|
-
@uri = "/Flows/#{@solution[:flow_sid]}/Engagements/#{@solution[:engagement_sid]}/Steps/#{@solution[:step_sid]}/Context"
|
91
|
-
end
|
92
|
-
|
93
|
-
##
|
94
|
-
# Fetch a StepContextInstance
|
95
|
-
# @return [StepContextInstance] Fetched StepContextInstance
|
96
|
-
def fetch
|
97
|
-
params = Twilio::Values.of({})
|
98
|
-
|
99
|
-
payload = @version.fetch(
|
100
|
-
'GET',
|
101
|
-
@uri,
|
102
|
-
params,
|
103
|
-
)
|
104
|
-
|
105
|
-
StepContextInstance.new(
|
106
|
-
@version,
|
107
|
-
payload,
|
108
|
-
flow_sid: @solution[:flow_sid],
|
109
|
-
engagement_sid: @solution[:engagement_sid],
|
110
|
-
step_sid: @solution[:step_sid],
|
111
|
-
)
|
112
|
-
end
|
113
|
-
|
114
|
-
##
|
115
|
-
# Provide a user friendly representation
|
116
|
-
def to_s
|
117
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
118
|
-
"#<Twilio.Studio.V1.StepContextContext #{context}>"
|
119
|
-
end
|
120
|
-
end
|
121
|
-
|
122
|
-
##
|
123
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
124
|
-
class StepContextInstance < InstanceResource
|
125
|
-
##
|
126
|
-
# Initialize the StepContextInstance
|
127
|
-
# @param [Version] version Version that contains the resource
|
128
|
-
# @param [Hash] payload payload that contains response from Twilio
|
129
|
-
# @param [String] flow_sid The flow_sid
|
130
|
-
# @param [String] engagement_sid The engagement_sid
|
131
|
-
# @param [String] step_sid The step_sid
|
132
|
-
# @return [StepContextInstance] StepContextInstance
|
133
|
-
def initialize(version, payload, flow_sid: nil, engagement_sid: nil, step_sid: nil)
|
134
|
-
super(version)
|
135
|
-
|
136
|
-
# Marshaled Properties
|
137
|
-
@properties = {
|
138
|
-
'account_sid' => payload['account_sid'],
|
139
|
-
'context' => payload['context'],
|
140
|
-
'engagement_sid' => payload['engagement_sid'],
|
141
|
-
'flow_sid' => payload['flow_sid'],
|
142
|
-
'step_sid' => payload['step_sid'],
|
143
|
-
'url' => payload['url'],
|
144
|
-
}
|
145
|
-
|
146
|
-
# Context
|
147
|
-
@instance_context = nil
|
148
|
-
@params = {'flow_sid' => flow_sid, 'engagement_sid' => engagement_sid, 'step_sid' => step_sid, }
|
149
|
-
end
|
150
|
-
|
151
|
-
##
|
152
|
-
# Generate an instance context for the instance, the context is capable of
|
153
|
-
# performing various actions. All instance actions are proxied to the context
|
154
|
-
# @return [StepContextContext] StepContextContext for this StepContextInstance
|
155
|
-
def context
|
156
|
-
unless @instance_context
|
157
|
-
@instance_context = StepContextContext.new(
|
158
|
-
@version,
|
159
|
-
@params['flow_sid'],
|
160
|
-
@params['engagement_sid'],
|
161
|
-
@params['step_sid'],
|
162
|
-
)
|
163
|
-
end
|
164
|
-
@instance_context
|
165
|
-
end
|
166
|
-
|
167
|
-
##
|
168
|
-
# @return [String] The account_sid
|
169
|
-
def account_sid
|
170
|
-
@properties['account_sid']
|
171
|
-
end
|
172
|
-
|
173
|
-
##
|
174
|
-
# @return [Hash] The context
|
175
|
-
def context
|
176
|
-
@properties['context']
|
177
|
-
end
|
178
|
-
|
179
|
-
##
|
180
|
-
# @return [String] The engagement_sid
|
181
|
-
def engagement_sid
|
182
|
-
@properties['engagement_sid']
|
183
|
-
end
|
184
|
-
|
185
|
-
##
|
186
|
-
# @return [String] The flow_sid
|
187
|
-
def flow_sid
|
188
|
-
@properties['flow_sid']
|
189
|
-
end
|
190
|
-
|
191
|
-
##
|
192
|
-
# @return [String] The step_sid
|
193
|
-
def step_sid
|
194
|
-
@properties['step_sid']
|
195
|
-
end
|
196
|
-
|
197
|
-
##
|
198
|
-
# @return [String] The url
|
199
|
-
def url
|
200
|
-
@properties['url']
|
201
|
-
end
|
202
|
-
|
203
|
-
##
|
204
|
-
# Fetch a StepContextInstance
|
205
|
-
# @return [StepContextInstance] Fetched StepContextInstance
|
206
|
-
def fetch
|
207
|
-
context.fetch
|
208
|
-
end
|
209
|
-
|
210
|
-
##
|
211
|
-
# Provide a user friendly representation
|
212
|
-
def to_s
|
213
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
214
|
-
"<Twilio.Studio.V1.StepContextInstance #{values}>"
|
215
|
-
end
|
216
|
-
|
217
|
-
##
|
218
|
-
# Provide a detailed, user friendly representation
|
219
|
-
def inspect
|
220
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
221
|
-
"<Twilio.Studio.V1.StepContextInstance #{values}>"
|
222
|
-
end
|
223
|
-
end
|
224
|
-
end
|
225
|
-
end
|
226
|
-
end
|
227
|
-
end
|
228
|
-
end
|
229
|
-
end
|
230
|
-
end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
|
7
|
-
require 'spec_helper.rb'
|
8
|
-
|
9
|
-
describe 'EngagementContext' do
|
10
|
-
it "can fetch" do
|
11
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
12
|
-
|
13
|
-
expect {
|
14
|
-
@client.studio.v1.flows('FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \
|
15
|
-
.engagements('FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \
|
16
|
-
.engagement_context().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://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context',
|
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
|
-
"context": {
|
34
|
-
"foo": "bar"
|
35
|
-
},
|
36
|
-
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
37
|
-
"engagement_sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
38
|
-
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
|
39
|
-
}
|
40
|
-
]
|
41
|
-
))
|
42
|
-
|
43
|
-
actual = @client.studio.v1.flows('FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \
|
44
|
-
.engagements('FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \
|
45
|
-
.engagement_context().fetch()
|
46
|
-
|
47
|
-
expect(actual).to_not eq(nil)
|
48
|
-
end
|
49
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
|
7
|
-
require 'spec_helper.rb'
|
8
|
-
|
9
|
-
describe 'StepContext' do
|
10
|
-
it "can fetch" do
|
11
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
12
|
-
|
13
|
-
expect {
|
14
|
-
@client.studio.v1.flows('FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \
|
15
|
-
.engagements('FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \
|
16
|
-
.steps('FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \
|
17
|
-
.step_context().fetch()
|
18
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
19
|
-
|
20
|
-
values = {}
|
21
|
-
expect(
|
22
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
23
|
-
method: 'get',
|
24
|
-
url: 'https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context',
|
25
|
-
))).to eq(true)
|
26
|
-
end
|
27
|
-
|
28
|
-
it "receives fetch responses" do
|
29
|
-
@holodeck.mock(Twilio::Response.new(
|
30
|
-
200,
|
31
|
-
%q[
|
32
|
-
{
|
33
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
34
|
-
"context": {
|
35
|
-
"foo": "bar"
|
36
|
-
},
|
37
|
-
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
38
|
-
"engagement_sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
39
|
-
"step_sid": "FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
40
|
-
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
|
41
|
-
}
|
42
|
-
]
|
43
|
-
))
|
44
|
-
|
45
|
-
actual = @client.studio.v1.flows('FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \
|
46
|
-
.engagements('FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \
|
47
|
-
.steps('FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \
|
48
|
-
.step_context().fetch()
|
49
|
-
|
50
|
-
expect(actual).to_not eq(nil)
|
51
|
-
end
|
52
|
-
end
|