twilio-ruby 5.17.0 → 5.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGES.md +25 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +5 -5
  5. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +34 -22
  6. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +32 -28
  7. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +5 -3
  8. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
  9. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -1
  10. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +11 -6
  11. data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +2 -2
  12. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +3 -2
  13. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +14 -10
  14. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +45 -31
  15. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +4 -2
  16. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +4 -2
  17. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +4 -2
  18. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +4 -2
  19. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +4 -2
  20. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +4 -2
  21. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +15 -9
  22. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +14 -9
  23. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +8 -6
  24. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +41 -19
  25. data/lib/twilio-ruby/rest/authy.rb +9 -9
  26. data/lib/twilio-ruby/rest/authy/v1.rb +16 -16
  27. data/lib/twilio-ruby/rest/authy/v1/form.rb +12 -12
  28. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb +11 -7
  29. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb +4 -4
  30. data/lib/twilio-ruby/rest/preview.rb +8 -8
  31. data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
  32. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +3 -6
  33. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +28 -5
  34. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +12 -2
  35. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +80 -9
  36. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +12 -2
  37. data/lib/twilio-ruby/rest/verify/v1/service.rb +51 -3
  38. data/lib/twilio-ruby/rest/video.rb +9 -9
  39. data/lib/twilio-ruby/rest/video/v1.rb +16 -16
  40. data/lib/twilio-ruby/rest/wireless/v1.rb +4 -2
  41. data/lib/twilio-ruby/rest/wireless/v1/command.rb +28 -6
  42. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +27 -8
  43. data/lib/twilio-ruby/twiml/voice_response.rb +3 -2
  44. data/lib/twilio-ruby/version.rb +1 -1
  45. data/spec/integration/api/v2010/account/sip/domain_spec.rb +15 -11
  46. data/spec/integration/authy/v1/form_spec.rb +1 -1
  47. data/spec/integration/authy/v1/service/entity/factor/challenge_spec.rb +5 -5
  48. data/spec/integration/authy/v1/service/entity/factor_spec.rb +7 -7
  49. data/spec/integration/messaging/v1/service_spec.rb +12 -4
  50. data/spec/integration/taskrouter/v1/workspace/task_channel_spec.rb +191 -10
  51. data/spec/integration/verify/v1/service_spec.rb +12 -0
  52. data/spec/integration/wireless/v1/command_spec.rb +26 -0
  53. data/spec/integration/wireless/v1/sim_spec.rb +26 -0
  54. metadata +3 -3
@@ -15,29 +15,14 @@ module Twilio
15
15
  def initialize(domain)
16
16
  super
17
17
  @version = 'v1'
18
- @compositions = nil
19
18
  @composition_hooks = nil
20
19
  @composition_settings = nil
21
20
  @recordings = nil
22
21
  @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
-
41
26
  ##
42
27
  # @param [String] sid The Composition Hook Sid that uniquely identifies the
43
28
  # Composition Hook to fetch.
@@ -80,6 +65,21 @@ module Twilio
80
65
  @recording_settings ||= RecordingSettingsContext.new self
81
66
  end
82
67
 
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.
@@ -21,7 +21,8 @@ module Twilio
21
21
  end
22
22
 
23
23
  ##
24
- # @param [String] sid The sid
24
+ # @param [String] sid A 34 character string that uniquely identifies this
25
+ # resource.
25
26
  # @return [Twilio::REST::Wireless::V1::CommandContext] if sid was passed.
26
27
  # @return [Twilio::REST::Wireless::V1::CommandList]
27
28
  def commands(sid=:unset)
@@ -49,7 +50,8 @@ module Twilio
49
50
  end
50
51
 
51
52
  ##
52
- # @param [String] sid The sid
53
+ # @param [String] sid A 34 character string that uniquely identifies this
54
+ # resource.
53
55
  # @return [Twilio::REST::Wireless::V1::SimContext] if sid was passed.
54
56
  # @return [Twilio::REST::Wireless::V1::SimList]
55
57
  def sims(sid=:unset)
@@ -31,7 +31,8 @@ module Twilio
31
31
  # @param [command.Status] status Only return Commands with this status value.
32
32
  # @param [command.Direction] direction Only return Commands with this direction
33
33
  # value.
34
- # @param [command.Transport] transport The transport
34
+ # @param [command.Transport] transport Only return Commands with this transport
35
+ # value.
35
36
  # @param [Integer] limit Upper limit for the number of records to return. stream()
36
37
  # guarantees to never return more than limit. Default is no limit
37
38
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -58,7 +59,8 @@ module Twilio
58
59
  # @param [command.Status] status Only return Commands with this status value.
59
60
  # @param [command.Direction] direction Only return Commands with this direction
60
61
  # value.
61
- # @param [command.Transport] transport The transport
62
+ # @param [command.Transport] transport Only return Commands with this transport
63
+ # value.
62
64
  # @param [Integer] limit Upper limit for the number of records to return. stream()
63
65
  # guarantees to never return more than limit. Default is no limit.
64
66
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -101,7 +103,8 @@ module Twilio
101
103
  # @param [command.Status] status Only return Commands with this status value.
102
104
  # @param [command.Direction] direction Only return Commands with this direction
103
105
  # value.
104
- # @param [command.Transport] transport The transport
106
+ # @param [command.Transport] transport Only return Commands with this transport
107
+ # value.
105
108
  # @param [String] page_token PageToken provided by the API
106
109
  # @param [Integer] page_number Page Number, this value is simply for client state
107
110
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -161,7 +164,10 @@ module Twilio
161
164
  # CommandSid and the message body. The length of the CommandSid contributes toward
162
165
  # the 160 character limit, i.e. the SMS body must be 128 characters or less before
163
166
  # the Command Sid is included.
164
- # @param [Boolean] delivery_receipt_requested The delivery_receipt_requested
167
+ # @param [Boolean] delivery_receipt_requested A boolean representing whether to
168
+ # request delivery receipt from the recipient. For Commands that request delivery
169
+ # receipt, the Command state transitions to 'delivered' once the server has
170
+ # received a delivery receipt from the device. Defaults to true.
165
171
  # @return [CommandInstance] Newly created CommandInstance
166
172
  def create(command: nil, sim: :unset, callback_method: :unset, callback_url: :unset, command_mode: :unset, include_sid: :unset, delivery_receipt_requested: :unset)
167
173
  data = Twilio::Values.of({
@@ -223,7 +229,8 @@ module Twilio
223
229
  ##
224
230
  # Initialize the CommandContext
225
231
  # @param [Version] version Version that contains the resource
226
- # @param [String] sid The sid
232
+ # @param [String] sid A 34 character string that uniquely identifies this
233
+ # resource.
227
234
  # @return [CommandContext] CommandContext
228
235
  def initialize(version, sid)
229
236
  super(version)
@@ -248,6 +255,13 @@ module Twilio
248
255
  CommandInstance.new(@version, payload, sid: @solution[:sid], )
249
256
  end
250
257
 
258
+ ##
259
+ # Deletes the CommandInstance
260
+ # @return [Boolean] true if delete succeeds, true otherwise
261
+ def delete
262
+ @version.delete('delete', @uri)
263
+ end
264
+
251
265
  ##
252
266
  # Provide a user friendly representation
253
267
  def to_s
@@ -261,7 +275,8 @@ module Twilio
261
275
  # Initialize the CommandInstance
262
276
  # @param [Version] version Version that contains the resource
263
277
  # @param [Hash] payload payload that contains response from Twilio
264
- # @param [String] sid The sid
278
+ # @param [String] sid A 34 character string that uniquely identifies this
279
+ # resource.
265
280
  # @return [CommandInstance] CommandInstance
266
281
  def initialize(version, payload, sid: nil)
267
282
  super(version)
@@ -377,6 +392,13 @@ module Twilio
377
392
  context.fetch
378
393
  end
379
394
 
395
+ ##
396
+ # Deletes the CommandInstance
397
+ # @return [Boolean] true if delete succeeds, true otherwise
398
+ def delete
399
+ context.delete
400
+ end
401
+
380
402
  ##
381
403
  # Provide a user friendly representation
382
404
  def to_s
@@ -31,8 +31,9 @@ module Twilio
31
31
  # @param [String] iccid Return Sims with this Iccid. Currently this should be a
32
32
  # list with maximum size 1.
33
33
  # @param [String] rate_plan Only return Sims with this Rate Plan.
34
- # @param [String] e_id The e_id
35
- # @param [String] sim_registration_code The sim_registration_code
34
+ # @param [String] e_id Only return Sims with this EID.
35
+ # @param [String] sim_registration_code Only return Sims with this registration
36
+ # code.
36
37
  # @param [Integer] limit Upper limit for the number of records to return. stream()
37
38
  # guarantees to never return more than limit. Default is no limit
38
39
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -60,8 +61,9 @@ module Twilio
60
61
  # @param [String] iccid Return Sims with this Iccid. Currently this should be a
61
62
  # list with maximum size 1.
62
63
  # @param [String] rate_plan Only return Sims with this Rate Plan.
63
- # @param [String] e_id The e_id
64
- # @param [String] sim_registration_code The sim_registration_code
64
+ # @param [String] e_id Only return Sims with this EID.
65
+ # @param [String] sim_registration_code Only return Sims with this registration
66
+ # code.
65
67
  # @param [Integer] limit Upper limit for the number of records to return. stream()
66
68
  # guarantees to never return more than limit. Default is no limit.
67
69
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -105,8 +107,9 @@ module Twilio
105
107
  # @param [String] iccid Return Sims with this Iccid. Currently this should be a
106
108
  # list with maximum size 1.
107
109
  # @param [String] rate_plan Only return Sims with this Rate Plan.
108
- # @param [String] e_id The e_id
109
- # @param [String] sim_registration_code The sim_registration_code
110
+ # @param [String] e_id Only return Sims with this EID.
111
+ # @param [String] sim_registration_code Only return Sims with this registration
112
+ # code.
110
113
  # @param [String] page_token PageToken provided by the API
111
114
  # @param [Integer] page_number Page Number, this value is simply for client state
112
115
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -183,7 +186,8 @@ module Twilio
183
186
  ##
184
187
  # Initialize the SimContext
185
188
  # @param [Version] version Version that contains the resource
186
- # @param [String] sid The sid
189
+ # @param [String] sid A 34 character string that uniquely identifies this
190
+ # resource.
187
191
  # @return [SimContext] SimContext
188
192
  def initialize(version, sid)
189
193
  super(version)
@@ -288,6 +292,13 @@ module Twilio
288
292
  SimInstance.new(@version, payload, sid: @solution[:sid], )
289
293
  end
290
294
 
295
+ ##
296
+ # Deletes the SimInstance
297
+ # @return [Boolean] true if delete succeeds, true otherwise
298
+ def delete
299
+ @version.delete('delete', @uri)
300
+ end
301
+
291
302
  ##
292
303
  # Access the usage_records
293
304
  # @return [UsageRecordList]
@@ -325,7 +336,8 @@ module Twilio
325
336
  # Initialize the SimInstance
326
337
  # @param [Version] version Version that contains the resource
327
338
  # @param [Hash] payload payload that contains response from Twilio
328
- # @param [String] sid The sid
339
+ # @param [String] sid A 34 character string that uniquely identifies this
340
+ # resource.
329
341
  # @return [SimInstance] SimInstance
330
342
  def initialize(version, payload, sid: nil)
331
343
  super(version)
@@ -586,6 +598,13 @@ module Twilio
586
598
  )
587
599
  end
588
600
 
601
+ ##
602
+ # Deletes the SimInstance
603
+ # @return [Boolean] true if delete succeeds, true otherwise
604
+ def delete
605
+ context.delete
606
+ end
607
+
589
608
  ##
590
609
  # Access the usage_records
591
610
  # @return [usage_records] usage_records
@@ -157,11 +157,12 @@ module Twilio
157
157
  # trim:: Trim the recording
158
158
  # recording_status_callback:: Status callback URL
159
159
  # recording_status_callback_method:: Status callback URL method
160
+ # recording_status_callback_event:: Recording status callback events
160
161
  # transcribe:: Transcribe the recording
161
162
  # transcribe_callback:: Transcribe callback URL
162
163
  # keyword_args:: additional attributes
163
- def record(action: nil, method: nil, timeout: nil, finish_on_key: nil, max_length: nil, play_beep: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, transcribe: nil, transcribe_callback: nil, **keyword_args)
164
- append(Record.new(action: action, method: method, timeout: timeout, finish_on_key: finish_on_key, max_length: max_length, play_beep: play_beep, trim: trim, recording_status_callback: recording_status_callback, recording_status_callback_method: recording_status_callback_method, transcribe: transcribe, transcribe_callback: transcribe_callback, **keyword_args))
164
+ def record(action: nil, method: nil, timeout: nil, finish_on_key: nil, max_length: nil, play_beep: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, transcribe: nil, transcribe_callback: nil, **keyword_args)
165
+ append(Record.new(action: action, method: method, timeout: timeout, finish_on_key: finish_on_key, max_length: max_length, play_beep: play_beep, trim: trim, recording_status_callback: recording_status_callback, recording_status_callback_method: recording_status_callback_method, recording_status_callback_event: recording_status_callback_event, transcribe: transcribe, transcribe_callback: transcribe_callback, **keyword_args))
165
166
  end
166
167
 
167
168
  ##
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.17.0'
2
+ VERSION = '5.18.0'
3
3
  end
@@ -35,10 +35,10 @@ describe 'Domain' do
35
35
  {
36
36
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37
37
  "api_version": "2010-04-01",
38
- "auth_type": "",
39
- "date_created": "Fri, 06 Sep 2013 18:48:50 -0000",
40
- "date_updated": "Fri, 06 Sep 2013 18:48:50 -0000",
41
- "domain_name": "dunder-mifflin-scranton.api.twilio.com",
38
+ "auth_type": "IP_ACL",
39
+ "date_created": "Mon, 20 Jul 2015 17:27:10 +0000",
40
+ "date_updated": "Mon, 20 Jul 2015 17:27:10 +0000",
41
+ "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
42
42
  "friendly_name": "Scranton Office",
43
43
  "sip_registration": true,
44
44
  "sid": "SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -55,6 +55,8 @@ describe 'Domain' do
55
55
  "voice_url": "https://dundermifflin.example.com/twilio/app.php"
56
56
  }
57
57
  ],
58
+ "start": 0,
59
+ "end": 0,
58
60
  "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains.json?PageSize=50&Page=0",
59
61
  "next_page_uri": null,
60
62
  "page": 0,
@@ -78,6 +80,8 @@ describe 'Domain' do
78
80
  %q[
79
81
  {
80
82
  "domains": [],
83
+ "start": 0,
84
+ "end": 0,
81
85
  "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains.json?PageSize=50&Page=0",
82
86
  "next_page_uri": null,
83
87
  "page": 0,
@@ -121,8 +125,8 @@ describe 'Domain' do
121
125
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
122
126
  "api_version": "2010-04-01",
123
127
  "auth_type": "IP_ACL",
124
- "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
125
- "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
128
+ "date_created": "Mon, 20 Jul 2015 17:27:10 +0000",
129
+ "date_updated": "Mon, 20 Jul 2015 17:27:10 +0000",
126
130
  "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
127
131
  "friendly_name": "Scranton Office",
128
132
  "sip_registration": true,
@@ -174,8 +178,8 @@ describe 'Domain' do
174
178
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
175
179
  "api_version": "2010-04-01",
176
180
  "auth_type": "IP_ACL",
177
- "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
178
- "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
181
+ "date_created": "Mon, 20 Jul 2015 17:27:10 +0000",
182
+ "date_updated": "Mon, 20 Jul 2015 17:27:10 +0000",
179
183
  "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
180
184
  "friendly_name": "Scranton Office",
181
185
  "sip_registration": true,
@@ -227,11 +231,11 @@ describe 'Domain' do
227
231
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
228
232
  "api_version": "2010-04-01",
229
233
  "auth_type": "IP_ACL",
230
- "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
231
- "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
234
+ "date_created": "Mon, 20 Jul 2015 17:27:10 +0000",
235
+ "date_updated": "Mon, 20 Jul 2015 17:27:10 +0000",
232
236
  "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
233
237
  "friendly_name": "Scranton Office",
234
- "sip_registration": false,
238
+ "sip_registration": true,
235
239
  "sid": "SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
236
240
  "subresource_uris": {
237
241
  "credential_list_mappings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialListMappings.json",
@@ -29,7 +29,7 @@ describe 'Form' do
29
29
  200,
30
30
  %q[
31
31
  {
32
- "type": "form-sms",
32
+ "form_type": "form-sms",
33
33
  "forms": {
34
34
  "create_factor": {},
35
35
  "verify_factor": {},
@@ -46,7 +46,7 @@ describe 'Challenge' do
46
46
  "responded_reason": "none",
47
47
  "details": "Hi! Mr. John Doe, would you like to sign up?",
48
48
  "hidden_details": "Hidden details about the sign up",
49
- "type": "sms",
49
+ "factor_type": "sms",
50
50
  "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
51
51
  }
52
52
  ]
@@ -129,7 +129,7 @@ describe 'Challenge' do
129
129
  "responded_reason": "none",
130
130
  "details": "details",
131
131
  "hidden_details": "hidden_details",
132
- "type": "sms",
132
+ "factor_type": "sms",
133
133
  "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
134
134
  }
135
135
  ]
@@ -162,7 +162,7 @@ describe 'Challenge' do
162
162
  "responded_reason": "none",
163
163
  "details": "details",
164
164
  "hidden_details": "hidden_details",
165
- "type": "sms",
165
+ "factor_type": "sms",
166
166
  "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
167
167
  }
168
168
  ]
@@ -213,7 +213,7 @@ describe 'Challenge' do
213
213
  "responded_reason": "none",
214
214
  "details": "Hi! Mr. John Doe, would you like to sign up?",
215
215
  "hidden_details": "Hidden details about the sign up",
216
- "type": "sms",
216
+ "factor_type": "sms",
217
217
  "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
218
218
  }
219
219
  ]
@@ -246,7 +246,7 @@ describe 'Challenge' do
246
246
  "responded_reason": "none",
247
247
  "details": "Hi! Mr. John Doe, would you like to sign up?",
248
248
  "hidden_details": "Hidden details about the sign up",
249
- "type": "sms",
249
+ "factor_type": "sms",
250
250
  "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
251
251
  }
252
252
  ]
@@ -15,10 +15,10 @@ describe 'Factor' do
15
15
  expect {
16
16
  @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
17
  .entities('identity') \
18
- .factors.create(binding: 'binding', friendly_name: 'friendly_name', type: 'app-push')
18
+ .factors.create(binding: 'binding', friendly_name: 'friendly_name', factor_type: 'app-push')
19
19
  }.to raise_exception(Twilio::REST::TwilioError)
20
20
 
21
- values = {'Binding' => 'binding', 'FriendlyName' => 'friendly_name', 'Type' => 'app-push', }
21
+ values = {'Binding' => 'binding', 'FriendlyName' => 'friendly_name', 'FactorType' => 'app-push', }
22
22
  expect(
23
23
  @holodeck.has_request?(Holodeck::Request.new(
24
24
  method: 'post',
@@ -41,7 +41,7 @@ describe 'Factor' do
41
41
  "date_updated": "2015-07-30T20:00:00Z",
42
42
  "friendly_name": "friendly_name",
43
43
  "status": "unverified",
44
- "type": "sms",
44
+ "factor_type": "sms",
45
45
  "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
46
46
  "links": {
47
47
  "challenges": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
@@ -52,7 +52,7 @@ describe 'Factor' do
52
52
 
53
53
  actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
54
54
  .entities('identity') \
55
- .factors.create(binding: 'binding', friendly_name: 'friendly_name', type: 'app-push')
55
+ .factors.create(binding: 'binding', friendly_name: 'friendly_name', factor_type: 'app-push')
56
56
 
57
57
  expect(actual).to_not eq(nil)
58
58
  end
@@ -118,7 +118,7 @@ describe 'Factor' do
118
118
  "date_updated": "2015-07-30T20:00:00Z",
119
119
  "friendly_name": "friendly_name",
120
120
  "status": "unverified",
121
- "type": "sms",
121
+ "factor_type": "sms",
122
122
  "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
123
123
  "links": {
124
124
  "challenges": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
@@ -193,7 +193,7 @@ describe 'Factor' do
193
193
  "date_updated": "2015-07-30T20:00:00Z",
194
194
  "friendly_name": "friendly_name",
195
195
  "status": "unverified",
196
- "type": "sms",
196
+ "factor_type": "sms",
197
197
  "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
198
198
  "links": {
199
199
  "challenges": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
@@ -251,7 +251,7 @@ describe 'Factor' do
251
251
  "date_updated": "2015-07-30T20:00:00Z",
252
252
  "friendly_name": "friendly_name",
253
253
  "status": "verified",
254
- "type": "sms",
254
+ "factor_type": "sms",
255
255
  "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
256
256
  "links": {
257
257
  "challenges": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
@@ -51,7 +51,9 @@ describe 'Service' do
51
51
  "links": {
52
52
  "phone_numbers": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers",
53
53
  "short_codes": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ShortCodes",
54
- "alpha_senders": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders"
54
+ "alpha_senders": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders",
55
+ "messages": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages",
56
+ "broadcasts": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Broadcasts"
55
57
  },
56
58
  "url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
57
59
  }
@@ -104,7 +106,9 @@ describe 'Service' do
104
106
  "links": {
105
107
  "phone_numbers": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers",
106
108
  "short_codes": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ShortCodes",
107
- "alpha_senders": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders"
109
+ "alpha_senders": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders",
110
+ "messages": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages",
111
+ "broadcasts": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Broadcasts"
108
112
  },
109
113
  "url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
110
114
  }
@@ -168,7 +172,9 @@ describe 'Service' do
168
172
  "links": {
169
173
  "phone_numbers": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers",
170
174
  "short_codes": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ShortCodes",
171
- "alpha_senders": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders"
175
+ "alpha_senders": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders",
176
+ "messages": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages",
177
+ "broadcasts": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Broadcasts"
172
178
  },
173
179
  "url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
174
180
  }
@@ -223,7 +229,9 @@ describe 'Service' do
223
229
  "links": {
224
230
  "phone_numbers": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers",
225
231
  "short_codes": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ShortCodes",
226
- "alpha_senders": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders"
232
+ "alpha_senders": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders",
233
+ "messages": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages",
234
+ "broadcasts": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Broadcasts"
227
235
  },
228
236
  "url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
229
237
  }