twilio-ruby 5.41.0 → 5.42.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +28 -0
  3. data/{LICENSE.md → LICENSE} +0 -0
  4. data/PULL_REQUEST_TEMPLATE.md +3 -3
  5. data/README.md +2 -2
  6. data/lib/twilio-ruby/jwt/access_token.rb +7 -2
  7. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +5 -22
  8. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +25 -40
  9. data/lib/twilio-ruby/rest/insights.rb +8 -0
  10. data/lib/twilio-ruby/rest/insights/v1.rb +15 -0
  11. data/lib/twilio-ruby/rest/insights/v1/room.rb +487 -0
  12. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +385 -0
  13. data/lib/twilio-ruby/rest/ip_messaging.rb +8 -10
  14. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +6 -8
  15. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +29 -68
  16. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +198 -313
  17. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +32 -59
  18. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +23 -55
  19. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +28 -71
  20. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +31 -59
  21. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +19 -39
  22. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +29 -51
  23. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +12 -18
  24. data/lib/twilio-ruby/rest/ip_messaging/v2.rb +6 -6
  25. data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +29 -66
  26. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +116 -205
  27. data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +23 -50
  28. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +41 -91
  29. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +23 -50
  30. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +42 -118
  31. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +46 -100
  32. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +36 -89
  33. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +19 -41
  34. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +29 -53
  35. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +23 -53
  36. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +27 -56
  37. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +5 -22
  38. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +21 -39
  39. data/lib/twilio-ruby/rest/verify/v2/form.rb +4 -4
  40. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +3 -3
  41. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +20 -34
  42. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +22 -46
  43. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +24 -42
  44. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +4 -4
  45. data/lib/twilio-ruby/rest/video/v1/room.rb +20 -0
  46. data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +150 -0
  47. data/lib/twilio-ruby/version.rb +1 -1
  48. data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +4 -2
  49. data/spec/integration/events/v1/sink/sink_test_spec.rb +1 -1
  50. data/spec/integration/insights/v1/room/participant_spec.rb +149 -0
  51. data/spec/integration/insights/v1/room_spec.rb +164 -0
  52. data/spec/integration/ip_messaging/v1/credential_spec.rb +13 -13
  53. data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +11 -11
  54. data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +14 -14
  55. data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +14 -14
  56. data/spec/integration/ip_messaging/v1/service/channel_spec.rb +25 -25
  57. data/spec/integration/ip_messaging/v1/service/role_spec.rb +13 -13
  58. data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +7 -7
  59. data/spec/integration/ip_messaging/v1/service/user_spec.rb +17 -17
  60. data/spec/integration/ip_messaging/v1/service_spec.rb +9 -9
  61. data/spec/integration/ip_messaging/v2/credential_spec.rb +13 -13
  62. data/spec/integration/ip_messaging/v2/service/binding_spec.rb +11 -11
  63. data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +11 -11
  64. data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +13 -13
  65. data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +17 -17
  66. data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +15 -15
  67. data/spec/integration/ip_messaging/v2/service/channel_spec.rb +29 -29
  68. data/spec/integration/ip_messaging/v2/service/role_spec.rb +13 -13
  69. data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +9 -9
  70. data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +20 -20
  71. data/spec/integration/ip_messaging/v2/service/user_spec.rb +21 -21
  72. data/spec/integration/ip_messaging/v2/service_spec.rb +29 -29
  73. data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +4 -2
  74. data/spec/integration/verify/v2/service/entity/challenge_spec.rb +4 -12
  75. data/spec/integration/verify/v2/service/entity/factor_spec.rb +5 -15
  76. data/spec/integration/verify/v2/service/entity_spec.rb +4 -12
  77. data/spec/integration/video/v1/room/room_recording_rule_spec.rb +89 -0
  78. data/spec/integration/video/v1/room_spec.rb +10 -5
  79. data/spec/jwt/access_token_spec.rb +9 -1
  80. data/twilio-ruby.gemspec +1 -1
  81. metadata +13 -4
@@ -11,7 +11,7 @@ module Twilio
11
11
  class Verify < Domain
12
12
  class V2 < Version
13
13
  ##
14
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
14
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
15
15
  class FormList < ListResource
16
16
  ##
17
17
  # Initialize the FormList
@@ -32,7 +32,7 @@ module Twilio
32
32
  end
33
33
 
34
34
  ##
35
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
35
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
36
36
  class FormPage < Page
37
37
  ##
38
38
  # Initialize the FormPage
@@ -63,7 +63,7 @@ module Twilio
63
63
  end
64
64
 
65
65
  ##
66
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
66
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
67
67
  class FormContext < InstanceContext
68
68
  ##
69
69
  # Initialize the FormContext
@@ -104,7 +104,7 @@ module Twilio
104
104
  end
105
105
 
106
106
  ##
107
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
107
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
108
108
  class FormInstance < InstanceResource
109
109
  ##
110
110
  # Initialize the FormInstance
@@ -12,7 +12,7 @@ module Twilio
12
12
  class V2 < Version
13
13
  class ServiceContext < InstanceContext
14
14
  ##
15
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
16
  class AccessTokenList < ListResource
17
17
  ##
18
18
  # Initialize the AccessTokenList
@@ -52,7 +52,7 @@ module Twilio
52
52
  end
53
53
 
54
54
  ##
55
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
55
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
56
56
  class AccessTokenPage < Page
57
57
  ##
58
58
  # Initialize the AccessTokenPage
@@ -83,7 +83,7 @@ module Twilio
83
83
  end
84
84
 
85
85
  ##
86
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
86
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
87
87
  class AccessTokenInstance < InstanceResource
88
88
  ##
89
89
  # Initialize the AccessTokenInstance
@@ -12,7 +12,7 @@ module Twilio
12
12
  class V2 < Version
13
13
  class ServiceContext < InstanceContext
14
14
  ##
15
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
16
  class EntityList < ListResource
17
17
  ##
18
18
  # Initialize the EntityList
@@ -31,13 +31,11 @@ module Twilio
31
31
  # Create the EntityInstance
32
32
  # @param [String] identity The unique external identifier for the Entity of the
33
33
  # Service
34
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
35
34
  # @return [EntityInstance] Created EntityInstance
36
- def create(identity: nil, twilio_sandbox_mode: :unset)
35
+ def create(identity: nil)
37
36
  data = Twilio::Values.of({'Identity' => identity, })
38
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
39
37
 
40
- payload = @version.create('POST', @uri, data: data, headers: headers)
38
+ payload = @version.create('POST', @uri, data: data)
41
39
 
42
40
  EntityInstance.new(@version, payload, service_sid: @solution[:service_sid], )
43
41
  end
@@ -46,7 +44,6 @@ module Twilio
46
44
  # Lists EntityInstance records from the API as a list.
47
45
  # Unlike stream(), this operation is eager and will load `limit` records into
48
46
  # memory before returning.
49
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
50
47
  # @param [Integer] limit Upper limit for the number of records to return. stream()
51
48
  # guarantees to never return more than limit. Default is no limit
52
49
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -54,15 +51,14 @@ module Twilio
54
51
  # but a limit is defined, stream() will attempt to read the limit with the most
55
52
  # efficient page size, i.e. min(limit, 1000)
56
53
  # @return [Array] Array of up to limit results
57
- def list(twilio_sandbox_mode: :unset, limit: nil, page_size: nil)
58
- self.stream(twilio_sandbox_mode: twilio_sandbox_mode, limit: limit, page_size: page_size).entries
54
+ def list(limit: nil, page_size: nil)
55
+ self.stream(limit: limit, page_size: page_size).entries
59
56
  end
60
57
 
61
58
  ##
62
59
  # Streams EntityInstance records from the API as an Enumerable.
63
60
  # This operation lazily loads records as efficiently as possible until the limit
64
61
  # is reached.
65
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
66
62
  # @param [Integer] limit Upper limit for the number of records to return. stream()
67
63
  # guarantees to never return more than limit. Default is no limit.
68
64
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -70,10 +66,10 @@ module Twilio
70
66
  # but a limit is defined, stream() will attempt to read the limit with the most
71
67
  # efficient page size, i.e. min(limit, 1000)
72
68
  # @return [Enumerable] Enumerable that will yield up to limit results
73
- def stream(twilio_sandbox_mode: :unset, limit: nil, page_size: nil)
69
+ def stream(limit: nil, page_size: nil)
74
70
  limits = @version.read_limits(limit, page_size)
75
71
 
76
- page = self.page(twilio_sandbox_mode: twilio_sandbox_mode, page_size: limits[:page_size], )
72
+ page = self.page(page_size: limits[:page_size], )
77
73
 
78
74
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
79
75
  end
@@ -95,20 +91,18 @@ module Twilio
95
91
  ##
96
92
  # Retrieve a single page of EntityInstance records from the API.
97
93
  # Request is executed immediately.
98
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
99
94
  # @param [String] page_token PageToken provided by the API
100
95
  # @param [Integer] page_number Page Number, this value is simply for client state
101
96
  # @param [Integer] page_size Number of records to return, defaults to 50
102
97
  # @return [Page] Page of EntityInstance
103
- def page(twilio_sandbox_mode: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
98
+ def page(page_token: :unset, page_number: :unset, page_size: :unset)
104
99
  params = Twilio::Values.of({
105
100
  'PageToken' => page_token,
106
101
  'Page' => page_number,
107
102
  'PageSize' => page_size,
108
103
  })
109
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
110
104
 
111
- response = @version.page('GET', @uri, params: params, headers: headers)
105
+ response = @version.page('GET', @uri, params: params)
112
106
 
113
107
  EntityPage.new(@version, response, @solution)
114
108
  end
@@ -134,7 +128,7 @@ module Twilio
134
128
  end
135
129
 
136
130
  ##
137
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
131
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
138
132
  class EntityPage < Page
139
133
  ##
140
134
  # Initialize the EntityPage
@@ -165,7 +159,7 @@ module Twilio
165
159
  end
166
160
 
167
161
  ##
168
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
162
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
169
163
  class EntityContext < InstanceContext
170
164
  ##
171
165
  # Initialize the EntityContext
@@ -188,22 +182,16 @@ module Twilio
188
182
 
189
183
  ##
190
184
  # Delete the EntityInstance
191
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
192
185
  # @return [Boolean] true if delete succeeds, false otherwise
193
- def delete(twilio_sandbox_mode: :unset)
194
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
195
-
196
- @version.delete('DELETE', @uri, headers: headers)
186
+ def delete
187
+ @version.delete('DELETE', @uri)
197
188
  end
198
189
 
199
190
  ##
200
191
  # Fetch the EntityInstance
201
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
202
192
  # @return [EntityInstance] Fetched EntityInstance
203
- def fetch(twilio_sandbox_mode: :unset)
204
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
205
-
206
- payload = @version.fetch('GET', @uri, headers: headers)
193
+ def fetch
194
+ payload = @version.fetch('GET', @uri)
207
195
 
208
196
  EntityInstance.new(
209
197
  @version,
@@ -273,7 +261,7 @@ module Twilio
273
261
  end
274
262
 
275
263
  ##
276
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
264
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
277
265
  class EntityInstance < InstanceResource
278
266
  ##
279
267
  # Initialize the EntityInstance
@@ -364,18 +352,16 @@ module Twilio
364
352
 
365
353
  ##
366
354
  # Delete the EntityInstance
367
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
368
355
  # @return [Boolean] true if delete succeeds, false otherwise
369
- def delete(twilio_sandbox_mode: :unset)
370
- context.delete(twilio_sandbox_mode: twilio_sandbox_mode, )
356
+ def delete
357
+ context.delete
371
358
  end
372
359
 
373
360
  ##
374
361
  # Fetch the EntityInstance
375
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
376
362
  # @return [EntityInstance] Fetched EntityInstance
377
- def fetch(twilio_sandbox_mode: :unset)
378
- context.fetch(twilio_sandbox_mode: twilio_sandbox_mode, )
363
+ def fetch
364
+ context.fetch
379
365
  end
380
366
 
381
367
  ##
@@ -13,7 +13,7 @@ module Twilio
13
13
  class ServiceContext < InstanceContext
14
14
  class EntityContext < InstanceContext
15
15
  ##
16
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
16
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
17
17
  class ChallengeList < ListResource
18
18
  ##
19
19
  # Initialize the ChallengeList
@@ -43,9 +43,8 @@ module Twilio
43
43
  # @param [Hash] hidden_details Details provided to give context about the
44
44
  # Challenge. Not shown to the end user. It must be a stringified JSON with only
45
45
  # strings values eg. `{"ip": "172.168.1.234"}`
46
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
47
46
  # @return [ChallengeInstance] Created ChallengeInstance
48
- def create(factor_sid: nil, expiration_date: :unset, details_message: :unset, details_fields: :unset, hidden_details: :unset, twilio_sandbox_mode: :unset)
47
+ def create(factor_sid: nil, expiration_date: :unset, details_message: :unset, details_fields: :unset, hidden_details: :unset)
49
48
  data = Twilio::Values.of({
50
49
  'FactorSid' => factor_sid,
51
50
  'ExpirationDate' => Twilio.serialize_iso8601_datetime(expiration_date),
@@ -53,9 +52,8 @@ module Twilio
53
52
  'Details.Fields' => Twilio.serialize_list(details_fields) { |e| Twilio.serialize_object(e) },
54
53
  'HiddenDetails' => Twilio.serialize_object(hidden_details),
55
54
  })
56
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
57
55
 
58
- payload = @version.create('POST', @uri, data: data, headers: headers)
56
+ payload = @version.create('POST', @uri, data: data)
59
57
 
60
58
  ChallengeInstance.new(
61
59
  @version,
@@ -72,7 +70,6 @@ module Twilio
72
70
  # @param [String] factor_sid The unique SID identifier of the Factor.
73
71
  # @param [challenge.ChallengeStatuses] status The Status of the Challenges to
74
72
  # fetch. One of `pending`, `expired`, `approved` or `denied`.
75
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
76
73
  # @param [Integer] limit Upper limit for the number of records to return. stream()
77
74
  # guarantees to never return more than limit. Default is no limit
78
75
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -80,14 +77,8 @@ module Twilio
80
77
  # but a limit is defined, stream() will attempt to read the limit with the most
81
78
  # efficient page size, i.e. min(limit, 1000)
82
79
  # @return [Array] Array of up to limit results
83
- def list(factor_sid: :unset, status: :unset, twilio_sandbox_mode: :unset, limit: nil, page_size: nil)
84
- self.stream(
85
- factor_sid: factor_sid,
86
- status: status,
87
- twilio_sandbox_mode: twilio_sandbox_mode,
88
- limit: limit,
89
- page_size: page_size
90
- ).entries
80
+ def list(factor_sid: :unset, status: :unset, limit: nil, page_size: nil)
81
+ self.stream(factor_sid: factor_sid, status: status, limit: limit, page_size: page_size).entries
91
82
  end
92
83
 
93
84
  ##
@@ -97,7 +88,6 @@ module Twilio
97
88
  # @param [String] factor_sid The unique SID identifier of the Factor.
98
89
  # @param [challenge.ChallengeStatuses] status The Status of the Challenges to
99
90
  # fetch. One of `pending`, `expired`, `approved` or `denied`.
100
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
101
91
  # @param [Integer] limit Upper limit for the number of records to return. stream()
102
92
  # guarantees to never return more than limit. Default is no limit.
103
93
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -105,15 +95,10 @@ module Twilio
105
95
  # but a limit is defined, stream() will attempt to read the limit with the most
106
96
  # efficient page size, i.e. min(limit, 1000)
107
97
  # @return [Enumerable] Enumerable that will yield up to limit results
108
- def stream(factor_sid: :unset, status: :unset, twilio_sandbox_mode: :unset, limit: nil, page_size: nil)
98
+ def stream(factor_sid: :unset, status: :unset, limit: nil, page_size: nil)
109
99
  limits = @version.read_limits(limit, page_size)
110
100
 
111
- page = self.page(
112
- factor_sid: factor_sid,
113
- status: status,
114
- twilio_sandbox_mode: twilio_sandbox_mode,
115
- page_size: limits[:page_size],
116
- )
101
+ page = self.page(factor_sid: factor_sid, status: status, page_size: limits[:page_size], )
117
102
 
118
103
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
119
104
  end
@@ -138,12 +123,11 @@ module Twilio
138
123
  # @param [String] factor_sid The unique SID identifier of the Factor.
139
124
  # @param [challenge.ChallengeStatuses] status The Status of the Challenges to
140
125
  # fetch. One of `pending`, `expired`, `approved` or `denied`.
141
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
142
126
  # @param [String] page_token PageToken provided by the API
143
127
  # @param [Integer] page_number Page Number, this value is simply for client state
144
128
  # @param [Integer] page_size Number of records to return, defaults to 50
145
129
  # @return [Page] Page of ChallengeInstance
146
- def page(factor_sid: :unset, status: :unset, twilio_sandbox_mode: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
130
+ def page(factor_sid: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
147
131
  params = Twilio::Values.of({
148
132
  'FactorSid' => factor_sid,
149
133
  'Status' => status,
@@ -151,9 +135,8 @@ module Twilio
151
135
  'Page' => page_number,
152
136
  'PageSize' => page_size,
153
137
  })
154
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
155
138
 
156
- response = @version.page('GET', @uri, params: params, headers: headers)
139
+ response = @version.page('GET', @uri, params: params)
157
140
 
158
141
  ChallengePage.new(@version, response, @solution)
159
142
  end
@@ -179,7 +162,7 @@ module Twilio
179
162
  end
180
163
 
181
164
  ##
182
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
165
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
183
166
  class ChallengePage < Page
184
167
  ##
185
168
  # Initialize the ChallengePage
@@ -215,7 +198,7 @@ module Twilio
215
198
  end
216
199
 
217
200
  ##
218
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
201
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
219
202
  class ChallengeContext < InstanceContext
220
203
  ##
221
204
  # Initialize the ChallengeContext
@@ -237,12 +220,9 @@ module Twilio
237
220
 
238
221
  ##
239
222
  # Fetch the ChallengeInstance
240
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
241
223
  # @return [ChallengeInstance] Fetched ChallengeInstance
242
- def fetch(twilio_sandbox_mode: :unset)
243
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
244
-
245
- payload = @version.fetch('GET', @uri, headers: headers)
224
+ def fetch
225
+ payload = @version.fetch('GET', @uri)
246
226
 
247
227
  ChallengeInstance.new(
248
228
  @version,
@@ -257,13 +237,11 @@ module Twilio
257
237
  # Update the ChallengeInstance
258
238
  # @param [String] auth_payload The optional payload needed to verify the
259
239
  # Challenge. E.g., a TOTP would use the numeric code.
260
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
261
240
  # @return [ChallengeInstance] Updated ChallengeInstance
262
- def update(auth_payload: :unset, twilio_sandbox_mode: :unset)
241
+ def update(auth_payload: :unset)
263
242
  data = Twilio::Values.of({'AuthPayload' => auth_payload, })
264
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
265
243
 
266
- payload = @version.update('POST', @uri, data: data, headers: headers)
244
+ payload = @version.update('POST', @uri, data: data)
267
245
 
268
246
  ChallengeInstance.new(
269
247
  @version,
@@ -290,7 +268,7 @@ module Twilio
290
268
  end
291
269
 
292
270
  ##
293
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
271
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
294
272
  class ChallengeInstance < InstanceResource
295
273
  ##
296
274
  # Initialize the ChallengeInstance
@@ -419,13 +397,13 @@ module Twilio
419
397
  end
420
398
 
421
399
  ##
422
- # @return [Hash] The details
400
+ # @return [Hash] Details about the Challenge.
423
401
  def details
424
402
  @properties['details']
425
403
  end
426
404
 
427
405
  ##
428
- # @return [Hash] Hidden details provided to contextualize the Challenge
406
+ # @return [Hash] Hidden details about the Challenge
429
407
  def hidden_details
430
408
  @properties['hidden_details']
431
409
  end
@@ -444,20 +422,18 @@ module Twilio
444
422
 
445
423
  ##
446
424
  # Fetch the ChallengeInstance
447
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
448
425
  # @return [ChallengeInstance] Fetched ChallengeInstance
449
- def fetch(twilio_sandbox_mode: :unset)
450
- context.fetch(twilio_sandbox_mode: twilio_sandbox_mode, )
426
+ def fetch
427
+ context.fetch
451
428
  end
452
429
 
453
430
  ##
454
431
  # Update the ChallengeInstance
455
432
  # @param [String] auth_payload The optional payload needed to verify the
456
433
  # Challenge. E.g., a TOTP would use the numeric code.
457
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
458
434
  # @return [ChallengeInstance] Updated ChallengeInstance
459
- def update(auth_payload: :unset, twilio_sandbox_mode: :unset)
460
- context.update(auth_payload: auth_payload, twilio_sandbox_mode: twilio_sandbox_mode, )
435
+ def update(auth_payload: :unset)
436
+ context.update(auth_payload: auth_payload, )
461
437
  end
462
438
 
463
439
  ##
@@ -13,7 +13,7 @@ module Twilio
13
13
  class ServiceContext < InstanceContext
14
14
  class EntityContext < InstanceContext
15
15
  ##
16
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
16
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
17
17
  class FactorList < ListResource
18
18
  ##
19
19
  # Initialize the FactorList
@@ -51,9 +51,8 @@ module Twilio
51
51
  # `factor_type` is `push`
52
52
  # @param [String] config_sdk_version The Verify Push SDK version used to configure
53
53
  # the factor
54
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
55
54
  # @return [FactorInstance] Created FactorInstance
56
- def create(friendly_name: nil, factor_type: nil, binding_alg: :unset, binding_public_key: :unset, config_app_id: :unset, config_notification_platform: :unset, config_notification_token: :unset, config_sdk_version: :unset, twilio_sandbox_mode: :unset)
55
+ def create(friendly_name: nil, factor_type: nil, binding_alg: :unset, binding_public_key: :unset, config_app_id: :unset, config_notification_platform: :unset, config_notification_token: :unset, config_sdk_version: :unset)
57
56
  data = Twilio::Values.of({
58
57
  'FriendlyName' => friendly_name,
59
58
  'FactorType' => factor_type,
@@ -64,9 +63,8 @@ module Twilio
64
63
  'Config.NotificationToken' => config_notification_token,
65
64
  'Config.SdkVersion' => config_sdk_version,
66
65
  })
67
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
68
66
 
69
- payload = @version.create('POST', @uri, data: data, headers: headers)
67
+ payload = @version.create('POST', @uri, data: data)
70
68
 
71
69
  FactorInstance.new(
72
70
  @version,
@@ -80,7 +78,6 @@ module Twilio
80
78
  # Lists FactorInstance records from the API as a list.
81
79
  # Unlike stream(), this operation is eager and will load `limit` records into
82
80
  # memory before returning.
83
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
84
81
  # @param [Integer] limit Upper limit for the number of records to return. stream()
85
82
  # guarantees to never return more than limit. Default is no limit
86
83
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -88,15 +85,14 @@ module Twilio
88
85
  # but a limit is defined, stream() will attempt to read the limit with the most
89
86
  # efficient page size, i.e. min(limit, 1000)
90
87
  # @return [Array] Array of up to limit results
91
- def list(twilio_sandbox_mode: :unset, limit: nil, page_size: nil)
92
- self.stream(twilio_sandbox_mode: twilio_sandbox_mode, limit: limit, page_size: page_size).entries
88
+ def list(limit: nil, page_size: nil)
89
+ self.stream(limit: limit, page_size: page_size).entries
93
90
  end
94
91
 
95
92
  ##
96
93
  # Streams FactorInstance records from the API as an Enumerable.
97
94
  # This operation lazily loads records as efficiently as possible until the limit
98
95
  # is reached.
99
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
100
96
  # @param [Integer] limit Upper limit for the number of records to return. stream()
101
97
  # guarantees to never return more than limit. Default is no limit.
102
98
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -104,10 +100,10 @@ module Twilio
104
100
  # but a limit is defined, stream() will attempt to read the limit with the most
105
101
  # efficient page size, i.e. min(limit, 1000)
106
102
  # @return [Enumerable] Enumerable that will yield up to limit results
107
- def stream(twilio_sandbox_mode: :unset, limit: nil, page_size: nil)
103
+ def stream(limit: nil, page_size: nil)
108
104
  limits = @version.read_limits(limit, page_size)
109
105
 
110
- page = self.page(twilio_sandbox_mode: twilio_sandbox_mode, page_size: limits[:page_size], )
106
+ page = self.page(page_size: limits[:page_size], )
111
107
 
112
108
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
113
109
  end
@@ -129,20 +125,18 @@ module Twilio
129
125
  ##
130
126
  # Retrieve a single page of FactorInstance records from the API.
131
127
  # Request is executed immediately.
132
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
133
128
  # @param [String] page_token PageToken provided by the API
134
129
  # @param [Integer] page_number Page Number, this value is simply for client state
135
130
  # @param [Integer] page_size Number of records to return, defaults to 50
136
131
  # @return [Page] Page of FactorInstance
137
- def page(twilio_sandbox_mode: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
132
+ def page(page_token: :unset, page_number: :unset, page_size: :unset)
138
133
  params = Twilio::Values.of({
139
134
  'PageToken' => page_token,
140
135
  'Page' => page_number,
141
136
  'PageSize' => page_size,
142
137
  })
143
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
144
138
 
145
- response = @version.page('GET', @uri, params: params, headers: headers)
139
+ response = @version.page('GET', @uri, params: params)
146
140
 
147
141
  FactorPage.new(@version, response, @solution)
148
142
  end
@@ -168,7 +162,7 @@ module Twilio
168
162
  end
169
163
 
170
164
  ##
171
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
165
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
172
166
  class FactorPage < Page
173
167
  ##
174
168
  # Initialize the FactorPage
@@ -204,7 +198,7 @@ module Twilio
204
198
  end
205
199
 
206
200
  ##
207
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
201
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
208
202
  class FactorContext < InstanceContext
209
203
  ##
210
204
  # Initialize the FactorContext
@@ -224,22 +218,16 @@ module Twilio
224
218
 
225
219
  ##
226
220
  # Delete the FactorInstance
227
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
228
221
  # @return [Boolean] true if delete succeeds, false otherwise
229
- def delete(twilio_sandbox_mode: :unset)
230
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
231
-
232
- @version.delete('DELETE', @uri, headers: headers)
222
+ def delete
223
+ @version.delete('DELETE', @uri)
233
224
  end
234
225
 
235
226
  ##
236
227
  # Fetch the FactorInstance
237
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
238
228
  # @return [FactorInstance] Fetched FactorInstance
239
- def fetch(twilio_sandbox_mode: :unset)
240
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
241
-
242
- payload = @version.fetch('GET', @uri, headers: headers)
229
+ def fetch
230
+ payload = @version.fetch('GET', @uri)
243
231
 
244
232
  FactorInstance.new(
245
233
  @version,
@@ -260,18 +248,16 @@ module Twilio
260
248
  # `factor_type` is `push`
261
249
  # @param [String] config_sdk_version The Verify Push SDK version used to configure
262
250
  # the factor
263
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
264
251
  # @return [FactorInstance] Updated FactorInstance
265
- def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, twilio_sandbox_mode: :unset)
252
+ def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset)
266
253
  data = Twilio::Values.of({
267
254
  'AuthPayload' => auth_payload,
268
255
  'FriendlyName' => friendly_name,
269
256
  'Config.NotificationToken' => config_notification_token,
270
257
  'Config.SdkVersion' => config_sdk_version,
271
258
  })
272
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
273
259
 
274
- payload = @version.update('POST', @uri, data: data, headers: headers)
260
+ payload = @version.update('POST', @uri, data: data)
275
261
 
276
262
  FactorInstance.new(
277
263
  @version,
@@ -298,7 +284,7 @@ module Twilio
298
284
  end
299
285
 
300
286
  ##
301
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
287
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
302
288
  class FactorInstance < InstanceResource
303
289
  ##
304
290
  # Initialize the FactorInstance
@@ -411,7 +397,7 @@ module Twilio
411
397
  end
412
398
 
413
399
  ##
414
- # @return [Hash] The config
400
+ # @return [Hash] Configurations for a `factor_type`.
415
401
  def config
416
402
  @properties['config']
417
403
  end
@@ -424,18 +410,16 @@ module Twilio
424
410
 
425
411
  ##
426
412
  # Delete the FactorInstance
427
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
428
413
  # @return [Boolean] true if delete succeeds, false otherwise
429
- def delete(twilio_sandbox_mode: :unset)
430
- context.delete(twilio_sandbox_mode: twilio_sandbox_mode, )
414
+ def delete
415
+ context.delete
431
416
  end
432
417
 
433
418
  ##
434
419
  # Fetch the FactorInstance
435
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
436
420
  # @return [FactorInstance] Fetched FactorInstance
437
- def fetch(twilio_sandbox_mode: :unset)
438
- context.fetch(twilio_sandbox_mode: twilio_sandbox_mode, )
421
+ def fetch
422
+ context.fetch
439
423
  end
440
424
 
441
425
  ##
@@ -448,15 +432,13 @@ module Twilio
448
432
  # `factor_type` is `push`
449
433
  # @param [String] config_sdk_version The Verify Push SDK version used to configure
450
434
  # the factor
451
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
452
435
  # @return [FactorInstance] Updated FactorInstance
453
- def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, twilio_sandbox_mode: :unset)
436
+ def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset)
454
437
  context.update(
455
438
  auth_payload: auth_payload,
456
439
  friendly_name: friendly_name,
457
440
  config_notification_token: config_notification_token,
458
441
  config_sdk_version: config_sdk_version,
459
- twilio_sandbox_mode: twilio_sandbox_mode,
460
442
  )
461
443
  end
462
444