twilio-ruby 5.33.0 → 5.36.0
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/.rubocop.yml +8 -0
- data/.rubocop_todo.yml +5 -26
- data/.travis.yml +9 -1
- data/CHANGES.md +110 -0
- data/README.md +17 -2
- data/lib/twilio-ruby.rb +4 -12
- data/lib/twilio-ruby/framework/error.rb +3 -3
- data/lib/twilio-ruby/jwt/jwt.rb +6 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +90 -90
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +75 -72
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +29 -29
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +38 -3
- data/lib/twilio-ruby/rest/autopilot.rb +6 -0
- data/lib/twilio-ruby/rest/autopilot/v1.rb +7 -0
- data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +198 -0
- data/lib/twilio-ruby/rest/client.rb +35 -8
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +19 -3
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +27 -4
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +2 -1
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +20 -11
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +26 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +324 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +26 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb +239 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +266 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +197 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +7 -0
- data/lib/twilio-ruby/rest/studio.rb +2 -2
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +26 -0
- data/lib/twilio-ruby/rest/studio/v2.rb +3 -3
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +7 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +71 -24
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +12 -11
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +21 -20
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +18 -15
- data/lib/twilio-ruby/rest/supersim.rb +18 -0
- data/lib/twilio-ruby/rest/supersim/v1.rb +30 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +53 -10
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +315 -0
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +378 -0
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +352 -0
- data/lib/twilio-ruby/rest/verify.rb +9 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +16 -0
- data/lib/twilio-ruby/rest/verify/v2/form.rb +197 -0
- data/lib/twilio-ruby/rest/verify/v2/service.rb +48 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +379 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +500 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor/challenge.rb +494 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -3
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +8 -12
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +8 -12
- data/lib/twilio-ruby/rest/voice.rb +36 -0
- data/lib/twilio-ruby/rest/voice/v1.rb +64 -0
- data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +513 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +379 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +458 -0
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +366 -0
- data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +346 -0
- data/lib/twilio-ruby/twiml/twiml.rb +4 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +3 -2
- data/lib/twilio-ruby/util/configuration.rb +9 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call_spec.rb +5 -5
- data/spec/integration/api/v2010/account/conference_spec.rb +42 -14
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +12 -4
- data/spec/integration/api/v2010/account/token_spec.rb +23 -11
- data/spec/integration/autopilot/v1/restore_assistant_spec.rb +53 -0
- data/spec/integration/bulkexports/v1/export/day_spec.rb +1 -1
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +7 -0
- data/spec/integration/conversations/v1/conversation_spec.rb +4 -0
- data/spec/integration/flex_api/v1/configuration_spec.rb +3 -0
- data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +623 -0
- data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +4 -0
- data/spec/integration/preview/bulk_exports/export/day_spec.rb +1 -1
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb +54 -0
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb +52 -0
- data/spec/integration/preview/trusted_comms/business/brand_spec.rb +49 -0
- data/spec/integration/preview/trusted_comms/business_spec.rb +1 -0
- data/spec/integration/serverless/v1/service/asset/asset_version_spec.rb +1 -1
- data/spec/integration/serverless/v1/service/build_spec.rb +4 -4
- data/spec/integration/serverless/v1/service/environment/log_spec.rb +1 -0
- data/spec/integration/serverless/v1/service/function/function_version_spec.rb +1 -1
- data/spec/integration/studio/v1/flow/execution_spec.rb +46 -0
- data/spec/integration/studio/v2/flow/execution_spec.rb +45 -0
- data/spec/integration/studio/v2/flow_spec.rb +4 -0
- data/spec/integration/studio/v2/flow_validate_spec.rb +2 -2
- data/spec/integration/supersim/v1/fleet_spec.rb +12 -4
- data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +179 -0
- data/spec/integration/supersim/v1/network_access_profile_spec.rb +223 -0
- data/spec/integration/supersim/v1/network_spec.rb +139 -0
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +13 -13
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +23 -23
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +28 -28
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +17 -17
- data/spec/integration/trunking/v1/trunk_spec.rb +33 -33
- data/spec/integration/verify/v2/form_spec.rb +48 -0
- data/spec/integration/verify/v2/service/entity/factor/challenge_spec.rb +353 -0
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +298 -0
- data/spec/integration/verify/v2/service/entity_spec.rb +201 -0
- data/spec/integration/verify/v2/service_spec.rb +28 -4
- data/spec/integration/video/v1/composition_settings_spec.rb +2 -2
- data/spec/integration/video/v1/recording_settings_spec.rb +2 -2
- data/spec/integration/video/v1/recording_spec.rb +2 -2
- data/spec/integration/video/v1/room/recording_spec.rb +2 -2
- data/spec/integration/voice/v1/byoc_trunk_spec.rb +250 -0
- data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +246 -0
- data/spec/integration/voice/v1/connection_policy_spec.rb +226 -0
- data/spec/integration/voice/v1/ip_record_spec.rb +223 -0
- data/spec/integration/voice/v1/source_ip_mapping_spec.rb +219 -0
- data/spec/rest/client_spec.rb +173 -23
- data/spec/util/configuration_spec.rb +12 -0
- data/twilio-ruby.gemspec +4 -4
- metadata +67 -10
|
@@ -18,8 +18,8 @@ module Twilio
|
|
|
18
18
|
##
|
|
19
19
|
# Initialize the ExecutionContextList
|
|
20
20
|
# @param [Version] version Version that contains the resource
|
|
21
|
-
# @param [String] flow_sid The
|
|
22
|
-
# @param [String] execution_sid The
|
|
21
|
+
# @param [String] flow_sid The SID of the Flow.
|
|
22
|
+
# @param [String] execution_sid The SID of the context's Execution resource.
|
|
23
23
|
# @return [ExecutionContextList] ExecutionContextList
|
|
24
24
|
def initialize(version, flow_sid: nil, execution_sid: nil)
|
|
25
25
|
super(version)
|
|
@@ -77,8 +77,9 @@ module Twilio
|
|
|
77
77
|
##
|
|
78
78
|
# Initialize the ExecutionContextContext
|
|
79
79
|
# @param [Version] version Version that contains the resource
|
|
80
|
-
# @param [String] flow_sid The
|
|
81
|
-
#
|
|
80
|
+
# @param [String] flow_sid The SID of the Flow with the Execution context to
|
|
81
|
+
# fetch.
|
|
82
|
+
# @param [String] execution_sid The SID of the Execution context to fetch.
|
|
82
83
|
# @return [ExecutionContextContext] ExecutionContextContext
|
|
83
84
|
def initialize(version, flow_sid, execution_sid)
|
|
84
85
|
super(version)
|
|
@@ -130,8 +131,8 @@ module Twilio
|
|
|
130
131
|
# Initialize the ExecutionContextInstance
|
|
131
132
|
# @param [Version] version Version that contains the resource
|
|
132
133
|
# @param [Hash] payload payload that contains response from Twilio
|
|
133
|
-
# @param [String] flow_sid The
|
|
134
|
-
# @param [String] execution_sid The
|
|
134
|
+
# @param [String] flow_sid The SID of the Flow.
|
|
135
|
+
# @param [String] execution_sid The SID of the context's Execution resource.
|
|
135
136
|
# @return [ExecutionContextInstance] ExecutionContextInstance
|
|
136
137
|
def initialize(version, payload, flow_sid: nil, execution_sid: nil)
|
|
137
138
|
super(version)
|
|
@@ -166,31 +167,31 @@ module Twilio
|
|
|
166
167
|
end
|
|
167
168
|
|
|
168
169
|
##
|
|
169
|
-
# @return [String] The
|
|
170
|
+
# @return [String] The SID of the Account that created the resource
|
|
170
171
|
def account_sid
|
|
171
172
|
@properties['account_sid']
|
|
172
173
|
end
|
|
173
174
|
|
|
174
175
|
##
|
|
175
|
-
# @return [Hash] The
|
|
176
|
+
# @return [Hash] The current state of the flow
|
|
176
177
|
def context
|
|
177
178
|
@properties['context']
|
|
178
179
|
end
|
|
179
180
|
|
|
180
181
|
##
|
|
181
|
-
# @return [String] The
|
|
182
|
+
# @return [String] The SID of the Flow
|
|
182
183
|
def flow_sid
|
|
183
184
|
@properties['flow_sid']
|
|
184
185
|
end
|
|
185
186
|
|
|
186
187
|
##
|
|
187
|
-
# @return [String] The
|
|
188
|
+
# @return [String] The SID of the Execution
|
|
188
189
|
def execution_sid
|
|
189
190
|
@properties['execution_sid']
|
|
190
191
|
end
|
|
191
192
|
|
|
192
193
|
##
|
|
193
|
-
# @return [String] The
|
|
194
|
+
# @return [String] The absolute URL of the resource
|
|
194
195
|
def url
|
|
195
196
|
@properties['url']
|
|
196
197
|
end
|
|
@@ -18,8 +18,8 @@ module Twilio
|
|
|
18
18
|
##
|
|
19
19
|
# Initialize the ExecutionStepList
|
|
20
20
|
# @param [Version] version Version that contains the resource
|
|
21
|
-
# @param [String] flow_sid The
|
|
22
|
-
# @param [String] execution_sid The
|
|
21
|
+
# @param [String] flow_sid The SID of the Flow.
|
|
22
|
+
# @param [String] execution_sid The SID of the Step's Execution resource.
|
|
23
23
|
# @return [ExecutionStepList] ExecutionStepList
|
|
24
24
|
def initialize(version, flow_sid: nil, execution_sid: nil)
|
|
25
25
|
super(version)
|
|
@@ -160,9 +160,10 @@ module Twilio
|
|
|
160
160
|
##
|
|
161
161
|
# Initialize the ExecutionStepContext
|
|
162
162
|
# @param [Version] version Version that contains the resource
|
|
163
|
-
# @param [String] flow_sid The
|
|
164
|
-
# @param [String] execution_sid The
|
|
165
|
-
#
|
|
163
|
+
# @param [String] flow_sid The SID of the Flow with the Step to fetch.
|
|
164
|
+
# @param [String] execution_sid The SID of the Execution resource with the Step to
|
|
165
|
+
# fetch.
|
|
166
|
+
# @param [String] sid The SID of the ExecutionStep resource to fetch.
|
|
166
167
|
# @return [ExecutionStepContext] ExecutionStepContext
|
|
167
168
|
def initialize(version, flow_sid, execution_sid, sid)
|
|
168
169
|
super(version)
|
|
@@ -231,9 +232,9 @@ module Twilio
|
|
|
231
232
|
# Initialize the ExecutionStepInstance
|
|
232
233
|
# @param [Version] version Version that contains the resource
|
|
233
234
|
# @param [Hash] payload payload that contains response from Twilio
|
|
234
|
-
# @param [String] flow_sid The
|
|
235
|
-
# @param [String] execution_sid The
|
|
236
|
-
# @param [String] sid The
|
|
235
|
+
# @param [String] flow_sid The SID of the Flow.
|
|
236
|
+
# @param [String] execution_sid The SID of the Step's Execution resource.
|
|
237
|
+
# @param [String] sid The SID of the ExecutionStep resource to fetch.
|
|
237
238
|
# @return [ExecutionStepInstance] ExecutionStepInstance
|
|
238
239
|
def initialize(version, payload, flow_sid: nil, execution_sid: nil, sid: nil)
|
|
239
240
|
super(version)
|
|
@@ -280,73 +281,73 @@ module Twilio
|
|
|
280
281
|
end
|
|
281
282
|
|
|
282
283
|
##
|
|
283
|
-
# @return [String] The
|
|
284
|
+
# @return [String] The unique string that identifies the resource
|
|
284
285
|
def sid
|
|
285
286
|
@properties['sid']
|
|
286
287
|
end
|
|
287
288
|
|
|
288
289
|
##
|
|
289
|
-
# @return [String] The
|
|
290
|
+
# @return [String] The SID of the Account that created the resource
|
|
290
291
|
def account_sid
|
|
291
292
|
@properties['account_sid']
|
|
292
293
|
end
|
|
293
294
|
|
|
294
295
|
##
|
|
295
|
-
# @return [String] The
|
|
296
|
+
# @return [String] The SID of the Flow
|
|
296
297
|
def flow_sid
|
|
297
298
|
@properties['flow_sid']
|
|
298
299
|
end
|
|
299
300
|
|
|
300
301
|
##
|
|
301
|
-
# @return [String] The
|
|
302
|
+
# @return [String] The SID of the Execution
|
|
302
303
|
def execution_sid
|
|
303
304
|
@properties['execution_sid']
|
|
304
305
|
end
|
|
305
306
|
|
|
306
307
|
##
|
|
307
|
-
# @return [String] The
|
|
308
|
+
# @return [String] The event that caused the Flow to transition to the Step
|
|
308
309
|
def name
|
|
309
310
|
@properties['name']
|
|
310
311
|
end
|
|
311
312
|
|
|
312
313
|
##
|
|
313
|
-
# @return [Hash] The
|
|
314
|
+
# @return [Hash] The current state of the flow
|
|
314
315
|
def context
|
|
315
316
|
@properties['context']
|
|
316
317
|
end
|
|
317
318
|
|
|
318
319
|
##
|
|
319
|
-
# @return [String] The
|
|
320
|
+
# @return [String] The Widget that preceded the Widget for the Step
|
|
320
321
|
def transitioned_from
|
|
321
322
|
@properties['transitioned_from']
|
|
322
323
|
end
|
|
323
324
|
|
|
324
325
|
##
|
|
325
|
-
# @return [String] The
|
|
326
|
+
# @return [String] The Widget that will follow the Widget for the Step
|
|
326
327
|
def transitioned_to
|
|
327
328
|
@properties['transitioned_to']
|
|
328
329
|
end
|
|
329
330
|
|
|
330
331
|
##
|
|
331
|
-
# @return [Time] The
|
|
332
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
|
332
333
|
def date_created
|
|
333
334
|
@properties['date_created']
|
|
334
335
|
end
|
|
335
336
|
|
|
336
337
|
##
|
|
337
|
-
# @return [Time] The
|
|
338
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
|
338
339
|
def date_updated
|
|
339
340
|
@properties['date_updated']
|
|
340
341
|
end
|
|
341
342
|
|
|
342
343
|
##
|
|
343
|
-
# @return [String] The
|
|
344
|
+
# @return [String] The absolute URL of the resource
|
|
344
345
|
def url
|
|
345
346
|
@properties['url']
|
|
346
347
|
end
|
|
347
348
|
|
|
348
349
|
##
|
|
349
|
-
# @return [String] The
|
|
350
|
+
# @return [String] The URLs of related resources
|
|
350
351
|
def links
|
|
351
352
|
@properties['links']
|
|
352
353
|
end
|
|
@@ -19,9 +19,10 @@ module Twilio
|
|
|
19
19
|
##
|
|
20
20
|
# Initialize the ExecutionStepContextList
|
|
21
21
|
# @param [Version] version Version that contains the resource
|
|
22
|
-
# @param [String] flow_sid The
|
|
23
|
-
# @param [String] execution_sid The
|
|
24
|
-
# @param [String] step_sid The
|
|
22
|
+
# @param [String] flow_sid The SID of the Flow.
|
|
23
|
+
# @param [String] execution_sid The SID of the context's Execution resource.
|
|
24
|
+
# @param [String] step_sid The SID of the Step that the context is associated
|
|
25
|
+
# with.
|
|
25
26
|
# @return [ExecutionStepContextList] ExecutionStepContextList
|
|
26
27
|
def initialize(version, flow_sid: nil, execution_sid: nil, step_sid: nil)
|
|
27
28
|
super(version)
|
|
@@ -80,9 +81,10 @@ module Twilio
|
|
|
80
81
|
##
|
|
81
82
|
# Initialize the ExecutionStepContextContext
|
|
82
83
|
# @param [Version] version Version that contains the resource
|
|
83
|
-
# @param [String] flow_sid The
|
|
84
|
-
# @param [String] execution_sid The
|
|
85
|
-
#
|
|
84
|
+
# @param [String] flow_sid The SID of the Flow with the Step to fetch.
|
|
85
|
+
# @param [String] execution_sid The SID of the Execution resource with the Step to
|
|
86
|
+
# fetch.
|
|
87
|
+
# @param [String] step_sid The SID of the Step to fetch.
|
|
86
88
|
# @return [ExecutionStepContextContext] ExecutionStepContextContext
|
|
87
89
|
def initialize(version, flow_sid, execution_sid, step_sid)
|
|
88
90
|
super(version)
|
|
@@ -135,9 +137,10 @@ module Twilio
|
|
|
135
137
|
# Initialize the ExecutionStepContextInstance
|
|
136
138
|
# @param [Version] version Version that contains the resource
|
|
137
139
|
# @param [Hash] payload payload that contains response from Twilio
|
|
138
|
-
# @param [String] flow_sid The
|
|
139
|
-
# @param [String] execution_sid The
|
|
140
|
-
# @param [String] step_sid The
|
|
140
|
+
# @param [String] flow_sid The SID of the Flow.
|
|
141
|
+
# @param [String] execution_sid The SID of the context's Execution resource.
|
|
142
|
+
# @param [String] step_sid The SID of the Step that the context is associated
|
|
143
|
+
# with.
|
|
141
144
|
# @return [ExecutionStepContextInstance] ExecutionStepContextInstance
|
|
142
145
|
def initialize(version, payload, flow_sid: nil, execution_sid: nil, step_sid: nil)
|
|
143
146
|
super(version)
|
|
@@ -174,37 +177,37 @@ module Twilio
|
|
|
174
177
|
end
|
|
175
178
|
|
|
176
179
|
##
|
|
177
|
-
# @return [String] The
|
|
180
|
+
# @return [String] The SID of the Account that created the resource
|
|
178
181
|
def account_sid
|
|
179
182
|
@properties['account_sid']
|
|
180
183
|
end
|
|
181
184
|
|
|
182
185
|
##
|
|
183
|
-
# @return [Hash] The
|
|
186
|
+
# @return [Hash] The current state of the flow
|
|
184
187
|
def context
|
|
185
188
|
@properties['context']
|
|
186
189
|
end
|
|
187
190
|
|
|
188
191
|
##
|
|
189
|
-
# @return [String] The
|
|
192
|
+
# @return [String] The SID of the Execution
|
|
190
193
|
def execution_sid
|
|
191
194
|
@properties['execution_sid']
|
|
192
195
|
end
|
|
193
196
|
|
|
194
197
|
##
|
|
195
|
-
# @return [String] The
|
|
198
|
+
# @return [String] The SID of the Flow
|
|
196
199
|
def flow_sid
|
|
197
200
|
@properties['flow_sid']
|
|
198
201
|
end
|
|
199
202
|
|
|
200
203
|
##
|
|
201
|
-
# @return [String]
|
|
204
|
+
# @return [String] Step SID
|
|
202
205
|
def step_sid
|
|
203
206
|
@properties['step_sid']
|
|
204
207
|
end
|
|
205
208
|
|
|
206
209
|
##
|
|
207
|
-
# @return [String] The
|
|
210
|
+
# @return [String] The absolute URL of the resource
|
|
208
211
|
def url
|
|
209
212
|
@properties['url']
|
|
210
213
|
end
|
|
@@ -46,6 +46,24 @@ module Twilio
|
|
|
46
46
|
self.v1.fleets(sid)
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
+
##
|
|
50
|
+
# @param [String] sid The unique string that we created to identify the Network
|
|
51
|
+
# resource.
|
|
52
|
+
# @return [Twilio::REST::Supersim::V1::NetworkInstance] if sid was passed.
|
|
53
|
+
# @return [Twilio::REST::Supersim::V1::NetworkList]
|
|
54
|
+
def networks(sid=:unset)
|
|
55
|
+
self.v1.networks(sid)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
##
|
|
59
|
+
# @param [String] sid The unique string that identifies the Network Access Profile
|
|
60
|
+
# resource.
|
|
61
|
+
# @return [Twilio::REST::Supersim::V1::NetworkAccessProfileInstance] if sid was passed.
|
|
62
|
+
# @return [Twilio::REST::Supersim::V1::NetworkAccessProfileList]
|
|
63
|
+
def network_access_profiles(sid=:unset)
|
|
64
|
+
self.v1.network_access_profiles(sid)
|
|
65
|
+
end
|
|
66
|
+
|
|
49
67
|
##
|
|
50
68
|
# @param [String] sid The unique string that identifies the Sim resource.
|
|
51
69
|
# @return [Twilio::REST::Supersim::V1::SimInstance] if sid was passed.
|
|
@@ -17,6 +17,8 @@ module Twilio
|
|
|
17
17
|
@version = 'v1'
|
|
18
18
|
@commands = nil
|
|
19
19
|
@fleets = nil
|
|
20
|
+
@networks = nil
|
|
21
|
+
@network_access_profiles = nil
|
|
20
22
|
@sims = nil
|
|
21
23
|
@usage_records = nil
|
|
22
24
|
end
|
|
@@ -49,6 +51,34 @@ module Twilio
|
|
|
49
51
|
end
|
|
50
52
|
end
|
|
51
53
|
|
|
54
|
+
##
|
|
55
|
+
# @param [String] sid The SID of the Network resource to fetch.
|
|
56
|
+
# @return [Twilio::REST::Supersim::V1::NetworkContext] if sid was passed.
|
|
57
|
+
# @return [Twilio::REST::Supersim::V1::NetworkList]
|
|
58
|
+
def networks(sid=:unset)
|
|
59
|
+
if sid.nil?
|
|
60
|
+
raise ArgumentError, 'sid cannot be nil'
|
|
61
|
+
elsif sid == :unset
|
|
62
|
+
@networks ||= NetworkList.new self
|
|
63
|
+
else
|
|
64
|
+
NetworkContext.new(self, sid)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
##
|
|
69
|
+
# @param [String] sid The SID of the Network Access Profile resource to fetch.
|
|
70
|
+
# @return [Twilio::REST::Supersim::V1::NetworkAccessProfileContext] if sid was passed.
|
|
71
|
+
# @return [Twilio::REST::Supersim::V1::NetworkAccessProfileList]
|
|
72
|
+
def network_access_profiles(sid=:unset)
|
|
73
|
+
if sid.nil?
|
|
74
|
+
raise ArgumentError, 'sid cannot be nil'
|
|
75
|
+
elsif sid == :unset
|
|
76
|
+
@network_access_profiles ||= NetworkAccessProfileList.new self
|
|
77
|
+
else
|
|
78
|
+
NetworkAccessProfileContext.new(self, sid)
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
52
82
|
##
|
|
53
83
|
# @param [String] sid The SID of the Sim resource to fetch.
|
|
54
84
|
# @return [Twilio::REST::Supersim::V1::SimContext] if sid was passed.
|
|
@@ -33,6 +33,7 @@ module Twilio
|
|
|
33
33
|
# URL to address the resource.
|
|
34
34
|
# @param [Boolean] data_enabled Defines whether SIMs in the Fleet are capable of
|
|
35
35
|
# using 2G/3G/4G/LTE/CAT-M/NB-IoT data connectivity
|
|
36
|
+
# @param [String] data_limit The data_limit
|
|
36
37
|
# @param [Boolean] commands_enabled Defines whether SIMs in the Fleet are capable
|
|
37
38
|
# of sending and receiving Commands via SMS.
|
|
38
39
|
# @param [String] commands_url The URL that will receive a webhook when a SIM in
|
|
@@ -41,14 +42,19 @@ module Twilio
|
|
|
41
42
|
# @param [String] commands_method A string representing the HTTP method to use
|
|
42
43
|
# when making a request to `commands_url`. Can be one of POST or GET. Defaults to
|
|
43
44
|
# POST.
|
|
45
|
+
# @param [String] network_access_profile The SID or unique name of the Network
|
|
46
|
+
# Access Profile that will control which cellular network operators the Fleet's
|
|
47
|
+
# SIMs can connect to
|
|
44
48
|
# @return [FleetInstance] Newly created FleetInstance
|
|
45
|
-
def create(unique_name: :unset, data_enabled: :unset, commands_enabled: :unset, commands_url: :unset, commands_method: :unset)
|
|
49
|
+
def create(unique_name: :unset, data_enabled: :unset, data_limit: :unset, commands_enabled: :unset, commands_url: :unset, commands_method: :unset, network_access_profile: :unset)
|
|
46
50
|
data = Twilio::Values.of({
|
|
47
51
|
'UniqueName' => unique_name,
|
|
48
52
|
'DataEnabled' => data_enabled,
|
|
53
|
+
'DataLimit' => data_limit,
|
|
49
54
|
'CommandsEnabled' => commands_enabled,
|
|
50
55
|
'CommandsUrl' => commands_url,
|
|
51
56
|
'CommandsMethod' => commands_method,
|
|
57
|
+
'NetworkAccessProfile' => network_access_profile,
|
|
52
58
|
})
|
|
53
59
|
|
|
54
60
|
payload = @version.create(
|
|
@@ -64,6 +70,9 @@ module Twilio
|
|
|
64
70
|
# Lists FleetInstance records from the API as a list.
|
|
65
71
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
66
72
|
# memory before returning.
|
|
73
|
+
# @param [String] network_access_profile The SID or unique name of the Network
|
|
74
|
+
# Access Profile that controls which cellular network operators the Fleet's SIMs
|
|
75
|
+
# can connect to
|
|
67
76
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
68
77
|
# guarantees to never return more than limit. Default is no limit
|
|
69
78
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -71,14 +80,21 @@ module Twilio
|
|
|
71
80
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
72
81
|
# efficient page size, i.e. min(limit, 1000)
|
|
73
82
|
# @return [Array] Array of up to limit results
|
|
74
|
-
def list(limit: nil, page_size: nil)
|
|
75
|
-
self.stream(
|
|
83
|
+
def list(network_access_profile: :unset, limit: nil, page_size: nil)
|
|
84
|
+
self.stream(
|
|
85
|
+
network_access_profile: network_access_profile,
|
|
86
|
+
limit: limit,
|
|
87
|
+
page_size: page_size
|
|
88
|
+
).entries
|
|
76
89
|
end
|
|
77
90
|
|
|
78
91
|
##
|
|
79
92
|
# Streams FleetInstance records from the API as an Enumerable.
|
|
80
93
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
81
94
|
# is reached.
|
|
95
|
+
# @param [String] network_access_profile The SID or unique name of the Network
|
|
96
|
+
# Access Profile that controls which cellular network operators the Fleet's SIMs
|
|
97
|
+
# can connect to
|
|
82
98
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
83
99
|
# guarantees to never return more than limit. Default is no limit.
|
|
84
100
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -86,10 +102,10 @@ module Twilio
|
|
|
86
102
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
87
103
|
# efficient page size, i.e. min(limit, 1000)
|
|
88
104
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
89
|
-
def stream(limit: nil, page_size: nil)
|
|
105
|
+
def stream(network_access_profile: :unset, limit: nil, page_size: nil)
|
|
90
106
|
limits = @version.read_limits(limit, page_size)
|
|
91
107
|
|
|
92
|
-
page = self.page(page_size: limits[:page_size], )
|
|
108
|
+
page = self.page(network_access_profile: network_access_profile, page_size: limits[:page_size], )
|
|
93
109
|
|
|
94
110
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
|
95
111
|
end
|
|
@@ -111,12 +127,16 @@ module Twilio
|
|
|
111
127
|
##
|
|
112
128
|
# Retrieve a single page of FleetInstance records from the API.
|
|
113
129
|
# Request is executed immediately.
|
|
130
|
+
# @param [String] network_access_profile The SID or unique name of the Network
|
|
131
|
+
# Access Profile that controls which cellular network operators the Fleet's SIMs
|
|
132
|
+
# can connect to
|
|
114
133
|
# @param [String] page_token PageToken provided by the API
|
|
115
134
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
116
135
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
117
136
|
# @return [Page] Page of FleetInstance
|
|
118
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
|
137
|
+
def page(network_access_profile: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
|
119
138
|
params = Twilio::Values.of({
|
|
139
|
+
'NetworkAccessProfile' => network_access_profile,
|
|
120
140
|
'PageToken' => page_token,
|
|
121
141
|
'Page' => page_number,
|
|
122
142
|
'PageSize' => page_size,
|
|
@@ -216,9 +236,15 @@ module Twilio
|
|
|
216
236
|
# @param [String] unique_name An application-defined string that uniquely
|
|
217
237
|
# identifies the resource. It can be used in place of the resource's `sid` in the
|
|
218
238
|
# URL to address the resource.
|
|
239
|
+
# @param [String] network_access_profile The SID or unique name of the Network
|
|
240
|
+
# Access Profile that will control which cellular network operators the Fleet's
|
|
241
|
+
# SIMs can connect to
|
|
219
242
|
# @return [FleetInstance] Updated FleetInstance
|
|
220
|
-
def update(unique_name: :unset)
|
|
221
|
-
data = Twilio::Values.of({
|
|
243
|
+
def update(unique_name: :unset, network_access_profile: :unset)
|
|
244
|
+
data = Twilio::Values.of({
|
|
245
|
+
'UniqueName' => unique_name,
|
|
246
|
+
'NetworkAccessProfile' => network_access_profile,
|
|
247
|
+
})
|
|
222
248
|
|
|
223
249
|
payload = @version.update(
|
|
224
250
|
'POST',
|
|
@@ -265,10 +291,12 @@ module Twilio
|
|
|
265
291
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
266
292
|
'url' => payload['url'],
|
|
267
293
|
'data_enabled' => payload['data_enabled'],
|
|
294
|
+
'data_limit' => payload['data_limit'].to_i,
|
|
268
295
|
'data_metering' => payload['data_metering'],
|
|
269
296
|
'commands_enabled' => payload['commands_enabled'],
|
|
270
297
|
'commands_url' => payload['commands_url'],
|
|
271
298
|
'commands_method' => payload['commands_method'],
|
|
299
|
+
'network_access_profile_sid' => payload['network_access_profile_sid'],
|
|
272
300
|
}
|
|
273
301
|
|
|
274
302
|
# Context
|
|
@@ -329,6 +357,12 @@ module Twilio
|
|
|
329
357
|
@properties['data_enabled']
|
|
330
358
|
end
|
|
331
359
|
|
|
360
|
+
##
|
|
361
|
+
# @return [String] The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume
|
|
362
|
+
def data_limit
|
|
363
|
+
@properties['data_limit']
|
|
364
|
+
end
|
|
365
|
+
|
|
332
366
|
##
|
|
333
367
|
# @return [fleet.DataMetering] The model by which a SIM is metered and billed
|
|
334
368
|
def data_metering
|
|
@@ -353,6 +387,12 @@ module Twilio
|
|
|
353
387
|
@properties['commands_method']
|
|
354
388
|
end
|
|
355
389
|
|
|
390
|
+
##
|
|
391
|
+
# @return [String] The SID of the Network Access Profile of the Fleet
|
|
392
|
+
def network_access_profile_sid
|
|
393
|
+
@properties['network_access_profile_sid']
|
|
394
|
+
end
|
|
395
|
+
|
|
356
396
|
##
|
|
357
397
|
# Fetch a FleetInstance
|
|
358
398
|
# @return [FleetInstance] Fetched FleetInstance
|
|
@@ -365,9 +405,12 @@ module Twilio
|
|
|
365
405
|
# @param [String] unique_name An application-defined string that uniquely
|
|
366
406
|
# identifies the resource. It can be used in place of the resource's `sid` in the
|
|
367
407
|
# URL to address the resource.
|
|
408
|
+
# @param [String] network_access_profile The SID or unique name of the Network
|
|
409
|
+
# Access Profile that will control which cellular network operators the Fleet's
|
|
410
|
+
# SIMs can connect to
|
|
368
411
|
# @return [FleetInstance] Updated FleetInstance
|
|
369
|
-
def update(unique_name: :unset)
|
|
370
|
-
context.update(unique_name: unique_name, )
|
|
412
|
+
def update(unique_name: :unset, network_access_profile: :unset)
|
|
413
|
+
context.update(unique_name: unique_name, network_access_profile: network_access_profile, )
|
|
371
414
|
end
|
|
372
415
|
|
|
373
416
|
##
|