twilio-ruby 5.46.0 → 5.50.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +112 -0
  3. data/README.md +20 -6
  4. data/lib/twilio-ruby/rest/api.rb +1 -1
  5. data/lib/twilio-ruby/rest/api/v2010.rb +5 -4
  6. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +10 -1
  7. data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +4 -4
  8. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +4 -4
  9. data/lib/twilio-ruby/rest/autopilot/v1.rb +5 -4
  10. data/lib/twilio-ruby/rest/bulkexports/v1.rb +10 -8
  11. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +14 -0
  12. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +14 -0
  13. data/lib/twilio-ruby/rest/chat/v1.rb +10 -8
  14. data/lib/twilio-ruby/rest/chat/v2.rb +10 -8
  15. data/lib/twilio-ruby/rest/client.rb +8 -1
  16. data/lib/twilio-ruby/rest/conversations/v1.rb +25 -20
  17. data/lib/twilio-ruby/rest/events/v1.rb +20 -16
  18. data/lib/twilio-ruby/rest/events/v1/event_type.rb +4 -4
  19. data/lib/twilio-ruby/rest/events/v1/schema.rb +4 -4
  20. data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +4 -4
  21. data/lib/twilio-ruby/rest/events/v1/sink.rb +6 -5
  22. data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +3 -3
  23. data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +3 -3
  24. data/lib/twilio-ruby/rest/events/v1/subscription.rb +15 -8
  25. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +133 -6
  26. data/lib/twilio-ruby/rest/fax/v1.rb +5 -4
  27. data/lib/twilio-ruby/rest/flex_api/v1.rb +15 -12
  28. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
  29. data/lib/twilio-ruby/rest/insights.rb +1 -1
  30. data/lib/twilio-ruby/rest/insights/v1.rb +11 -9
  31. data/lib/twilio-ruby/rest/insights/v1/room.rb +55 -43
  32. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +22 -22
  33. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +10 -8
  34. data/lib/twilio-ruby/rest/ip_messaging/v2.rb +10 -8
  35. data/lib/twilio-ruby/rest/lookups/v1.rb +5 -4
  36. data/lib/twilio-ruby/rest/messaging.rb +8 -0
  37. data/lib/twilio-ruby/rest/messaging/v1.rb +21 -4
  38. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +328 -0
  39. data/lib/twilio-ruby/rest/monitor/v1.rb +10 -8
  40. data/lib/twilio-ruby/rest/notify/v1.rb +10 -8
  41. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +10 -8
  42. data/lib/twilio-ruby/rest/preview/deployed_devices.rb +5 -4
  43. data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +10 -8
  44. data/lib/twilio-ruby/rest/preview/marketplace.rb +10 -8
  45. data/lib/twilio-ruby/rest/preview/sync.rb +5 -4
  46. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +4 -8
  47. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +5 -4
  48. data/lib/twilio-ruby/rest/preview/understand.rb +5 -4
  49. data/lib/twilio-ruby/rest/preview/wireless.rb +15 -12
  50. data/lib/twilio-ruby/rest/proxy/v1.rb +5 -4
  51. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -1
  52. data/lib/twilio-ruby/rest/serverless/v1.rb +5 -4
  53. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +11 -1
  54. data/lib/twilio-ruby/rest/studio/v1.rb +5 -4
  55. data/lib/twilio-ruby/rest/studio/v2.rb +5 -4
  56. data/lib/twilio-ruby/rest/studio/v2/flow.rb +4 -12
  57. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +0 -8
  58. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +0 -8
  59. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +0 -8
  60. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +0 -8
  61. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -9
  62. data/lib/twilio-ruby/rest/studio/v2/flow/test_user.rb +10 -16
  63. data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +6 -11
  64. data/lib/twilio-ruby/rest/supersim.rb +9 -0
  65. data/lib/twilio-ruby/rest/supersim/v1.rb +41 -20
  66. data/lib/twilio-ruby/rest/supersim/v1/command.rb +4 -4
  67. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +86 -13
  68. data/lib/twilio-ruby/rest/supersim/v1/network.rb +4 -4
  69. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +4 -4
  70. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +4 -4
  71. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +4 -4
  72. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +371 -0
  73. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +3 -3
  74. data/lib/twilio-ruby/rest/sync/v1.rb +5 -4
  75. data/lib/twilio-ruby/rest/sync/v1/service.rb +0 -8
  76. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +13 -32
  77. data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +0 -8
  78. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +9 -23
  79. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +38 -45
  80. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +0 -8
  81. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +9 -23
  82. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +38 -47
  83. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +0 -8
  84. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +9 -23
  85. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +0 -6
  86. data/lib/twilio-ruby/rest/taskrouter/v1.rb +5 -4
  87. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +12 -8
  88. data/lib/twilio-ruby/rest/trunking/v1.rb +5 -4
  89. data/lib/twilio-ruby/rest/trusthub.rb +100 -0
  90. data/lib/twilio-ruby/rest/trusthub/v1.rb +146 -0
  91. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +523 -0
  92. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb +359 -0
  93. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +330 -0
  94. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb +328 -0
  95. data/lib/twilio-ruby/rest/trusthub/v1/end_user.rb +356 -0
  96. data/lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb +271 -0
  97. data/lib/twilio-ruby/rest/trusthub/v1/policies.rb +262 -0
  98. data/lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb +369 -0
  99. data/lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb +271 -0
  100. data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +523 -0
  101. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb +359 -0
  102. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +330 -0
  103. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb +328 -0
  104. data/lib/twilio-ruby/rest/verify.rb +9 -0
  105. data/lib/twilio-ruby/rest/verify/v2.rb +26 -8
  106. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +4 -3
  107. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +64 -13
  108. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +329 -0
  109. data/lib/twilio-ruby/rest/video/v1.rb +20 -16
  110. data/lib/twilio-ruby/rest/video/v1/room.rb +4 -1
  111. data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +0 -6
  112. data/lib/twilio-ruby/rest/voice/v1.rb +20 -16
  113. data/lib/twilio-ruby/rest/wireless/v1.rb +15 -12
  114. data/lib/twilio-ruby/twiml/voice_response.rb +38 -8
  115. data/lib/twilio-ruby/version.rb +1 -1
  116. data/spec/integration/api/v2010/account/conference_spec.rb +302 -44
  117. data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +4 -16
  118. data/spec/integration/api/v2010/account/message_spec.rb +37 -0
  119. data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +6 -2
  120. data/spec/integration/bulkexports/v1/export/job_spec.rb +3 -1
  121. data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +134 -0
  122. data/spec/integration/flex_api/v1/configuration_spec.rb +24 -0
  123. data/spec/integration/messaging/v1/brand_registration_spec.rb +143 -0
  124. data/spec/integration/preview/sync/service/document_spec.rb +1 -3
  125. data/spec/integration/serverless/v1/service/build_spec.rb +12 -2
  126. data/spec/integration/supersim/v1/fleet_spec.rb +20 -0
  127. data/spec/integration/supersim/v1/sms_command_spec.rb +184 -0
  128. data/spec/integration/sync/v1/service/document_spec.rb +1 -3
  129. data/spec/integration/taskrouter/v1/workspace/task_spec.rb +3 -1
  130. data/spec/integration/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment_spec.rb +192 -0
  131. data/spec/integration/trusthub/v1/customer_profiles/customer_profiles_entity_assignments_spec.rb +186 -0
  132. data/spec/integration/trusthub/v1/customer_profiles/customer_profiles_evaluations_spec.rb +615 -0
  133. data/spec/integration/trusthub/v1/customer_profiles_spec.rb +255 -0
  134. data/spec/integration/trusthub/v1/end_user_spec.rb +247 -0
  135. data/spec/integration/trusthub/v1/end_user_type_spec.rb +176 -0
  136. data/spec/integration/trusthub/v1/policies_spec.rb +252 -0
  137. data/spec/integration/trusthub/v1/supporting_document_spec.rb +235 -0
  138. data/spec/integration/trusthub/v1/supporting_document_type_spec.rb +159 -0
  139. data/spec/integration/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment_spec.rb +192 -0
  140. data/spec/integration/trusthub/v1/trust_products/trust_products_entity_assignments_spec.rb +186 -0
  141. data/spec/integration/trusthub/v1/trust_products/trust_products_evaluations_spec.rb +615 -0
  142. data/spec/integration/trusthub/v1/trust_products_spec.rb +255 -0
  143. data/spec/integration/verify/v2/service/entity/factor_spec.rb +3 -3
  144. data/spec/integration/verify/v2/verification_attempt_spec.rb +146 -0
  145. data/spec/integration/video/v1/room_spec.rb +39 -0
  146. metadata +52 -2
@@ -11,7 +11,7 @@ module Twilio
11
11
  class Supersim < Domain
12
12
  class V1 < 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 CommandList < ListResource
16
16
  ##
17
17
  # Initialize the CommandList
@@ -176,7 +176,7 @@ module Twilio
176
176
  end
177
177
 
178
178
  ##
179
- # 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.
179
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
180
180
  class CommandPage < Page
181
181
  ##
182
182
  # Initialize the CommandPage
@@ -207,7 +207,7 @@ module Twilio
207
207
  end
208
208
 
209
209
  ##
210
- # 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.
210
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
211
211
  class CommandContext < InstanceContext
212
212
  ##
213
213
  # Initialize the CommandContext
@@ -247,7 +247,7 @@ module Twilio
247
247
  end
248
248
 
249
249
  ##
250
- # 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.
250
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
251
251
  class CommandInstance < InstanceResource
252
252
  ##
253
253
  # Initialize the CommandInstance
@@ -11,7 +11,7 @@ module Twilio
11
11
  class Supersim < Domain
12
12
  class V1 < 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 FleetList < ListResource
16
16
  ##
17
17
  # Initialize the FleetList
@@ -42,15 +42,25 @@ module Twilio
42
42
  # @param [Boolean] commands_enabled Defines whether SIMs in the Fleet are capable
43
43
  # of sending and receiving machine-to-machine SMS via Commands. Defaults to
44
44
  # `true`.
45
- # @param [String] commands_url The URL that will receive a webhook when a SIM in
46
- # the Fleet originates a machine-to-machine SMS via Commands. Your server should
47
- # respond with an HTTP status code in the 200 range; any response body will be
48
- # ignored.
45
+ # @param [String] commands_url The URL that will receive a webhook when a Super
46
+ # SIM in the Fleet is used to send an SMS from your device to the Commands number.
47
+ # Your server should respond with an HTTP status code in the 200 range; any
48
+ # response body will be ignored.
49
49
  # @param [String] commands_method A string representing the HTTP method to use
50
50
  # when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults
51
51
  # to `POST`.
52
+ # @param [Boolean] sms_commands_enabled Defines whether SIMs in the Fleet are
53
+ # capable of sending and receiving machine-to-machine SMS via Commands. Defaults
54
+ # to `true`.
55
+ # @param [String] sms_commands_url The URL that will receive a webhook when a
56
+ # Super SIM in the Fleet is used to send an SMS from your device to the SMS
57
+ # Commands number. Your server should respond with an HTTP status code in the 200
58
+ # range; any response body will be ignored.
59
+ # @param [String] sms_commands_method A string representing the HTTP method to use
60
+ # when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
61
+ # Defaults to `POST`.
52
62
  # @return [FleetInstance] Created FleetInstance
53
- def create(network_access_profile: nil, unique_name: :unset, data_enabled: :unset, data_limit: :unset, commands_enabled: :unset, commands_url: :unset, commands_method: :unset)
63
+ def create(network_access_profile: nil, unique_name: :unset, data_enabled: :unset, data_limit: :unset, commands_enabled: :unset, commands_url: :unset, commands_method: :unset, sms_commands_enabled: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
54
64
  data = Twilio::Values.of({
55
65
  'NetworkAccessProfile' => network_access_profile,
56
66
  'UniqueName' => unique_name,
@@ -59,6 +69,9 @@ module Twilio
59
69
  'CommandsEnabled' => commands_enabled,
60
70
  'CommandsUrl' => commands_url,
61
71
  'CommandsMethod' => commands_method,
72
+ 'SmsCommandsEnabled' => sms_commands_enabled,
73
+ 'SmsCommandsUrl' => sms_commands_url,
74
+ 'SmsCommandsMethod' => sms_commands_method,
62
75
  })
63
76
 
64
77
  payload = @version.create('POST', @uri, data: data)
@@ -168,7 +181,7 @@ module Twilio
168
181
  end
169
182
 
170
183
  ##
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.
184
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
172
185
  class FleetPage < Page
173
186
  ##
174
187
  # Initialize the FleetPage
@@ -199,7 +212,7 @@ module Twilio
199
212
  end
200
213
 
201
214
  ##
202
- # 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.
215
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
203
216
  class FleetContext < InstanceContext
204
217
  ##
205
218
  # Initialize the FleetContext
@@ -231,11 +244,29 @@ module Twilio
231
244
  # @param [String] network_access_profile The SID or unique name of the Network
232
245
  # Access Profile that will control which cellular networks the Fleet's SIMs can
233
246
  # connect to.
247
+ # @param [String] commands_url The URL that will receive a webhook when a Super
248
+ # SIM in the Fleet is used to send an SMS from your device to the Commands number.
249
+ # Your server should respond with an HTTP status code in the 200 range; any
250
+ # response body will be ignored.
251
+ # @param [String] commands_method A string representing the HTTP method to use
252
+ # when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults
253
+ # to `POST`.
254
+ # @param [String] sms_commands_url The URL that will receive a webhook when a
255
+ # Super SIM in the Fleet is used to send an SMS from your device to the SMS
256
+ # Commands number. Your server should respond with an HTTP status code in the 200
257
+ # range; any response body will be ignored.
258
+ # @param [String] sms_commands_method A string representing the HTTP method to use
259
+ # when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
260
+ # Defaults to `POST`.
234
261
  # @return [FleetInstance] Updated FleetInstance
235
- def update(unique_name: :unset, network_access_profile: :unset)
262
+ def update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
236
263
  data = Twilio::Values.of({
237
264
  'UniqueName' => unique_name,
238
265
  'NetworkAccessProfile' => network_access_profile,
266
+ 'CommandsUrl' => commands_url,
267
+ 'CommandsMethod' => commands_method,
268
+ 'SmsCommandsUrl' => sms_commands_url,
269
+ 'SmsCommandsMethod' => sms_commands_method,
239
270
  })
240
271
 
241
272
  payload = @version.update('POST', @uri, data: data)
@@ -259,7 +290,7 @@ module Twilio
259
290
  end
260
291
 
261
292
  ##
262
- # 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.
293
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
263
294
  class FleetInstance < InstanceResource
264
295
  ##
265
296
  # Initialize the FleetInstance
@@ -284,6 +315,9 @@ module Twilio
284
315
  'commands_enabled' => payload['commands_enabled'],
285
316
  'commands_url' => payload['commands_url'],
286
317
  'commands_method' => payload['commands_method'],
318
+ 'sms_commands_enabled' => payload['sms_commands_enabled'],
319
+ 'sms_commands_url' => payload['sms_commands_url'],
320
+ 'sms_commands_method' => payload['sms_commands_method'],
287
321
  'network_access_profile_sid' => payload['network_access_profile_sid'],
288
322
  }
289
323
 
@@ -364,7 +398,7 @@ module Twilio
364
398
  end
365
399
 
366
400
  ##
367
- # @return [String] The URL that will receive a webhook when a SIM in the Fleet originates a machine-to-machine SMS via Commands
401
+ # @return [String] The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the Commands number
368
402
  def commands_url
369
403
  @properties['commands_url']
370
404
  end
@@ -375,6 +409,24 @@ module Twilio
375
409
  @properties['commands_method']
376
410
  end
377
411
 
412
+ ##
413
+ # @return [Boolean] Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands
414
+ def sms_commands_enabled
415
+ @properties['sms_commands_enabled']
416
+ end
417
+
418
+ ##
419
+ # @return [String] The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the SMS Commands number
420
+ def sms_commands_url
421
+ @properties['sms_commands_url']
422
+ end
423
+
424
+ ##
425
+ # @return [String] A string representing the HTTP method to use when making a request to `sms_commands_url`
426
+ def sms_commands_method
427
+ @properties['sms_commands_method']
428
+ end
429
+
378
430
  ##
379
431
  # @return [String] The SID of the Network Access Profile of the Fleet
380
432
  def network_access_profile_sid
@@ -396,9 +448,30 @@ module Twilio
396
448
  # @param [String] network_access_profile The SID or unique name of the Network
397
449
  # Access Profile that will control which cellular networks the Fleet's SIMs can
398
450
  # connect to.
451
+ # @param [String] commands_url The URL that will receive a webhook when a Super
452
+ # SIM in the Fleet is used to send an SMS from your device to the Commands number.
453
+ # Your server should respond with an HTTP status code in the 200 range; any
454
+ # response body will be ignored.
455
+ # @param [String] commands_method A string representing the HTTP method to use
456
+ # when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults
457
+ # to `POST`.
458
+ # @param [String] sms_commands_url The URL that will receive a webhook when a
459
+ # Super SIM in the Fleet is used to send an SMS from your device to the SMS
460
+ # Commands number. Your server should respond with an HTTP status code in the 200
461
+ # range; any response body will be ignored.
462
+ # @param [String] sms_commands_method A string representing the HTTP method to use
463
+ # when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
464
+ # Defaults to `POST`.
399
465
  # @return [FleetInstance] Updated FleetInstance
400
- def update(unique_name: :unset, network_access_profile: :unset)
401
- context.update(unique_name: unique_name, network_access_profile: network_access_profile, )
466
+ def update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
467
+ context.update(
468
+ unique_name: unique_name,
469
+ network_access_profile: network_access_profile,
470
+ commands_url: commands_url,
471
+ commands_method: commands_method,
472
+ sms_commands_url: sms_commands_url,
473
+ sms_commands_method: sms_commands_method,
474
+ )
402
475
  end
403
476
 
404
477
  ##
@@ -11,7 +11,7 @@ module Twilio
11
11
  class Supersim < Domain
12
12
  class V1 < 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 NetworkList < ListResource
16
16
  ##
17
17
  # Initialize the NetworkList
@@ -143,7 +143,7 @@ module Twilio
143
143
  end
144
144
 
145
145
  ##
146
- # 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.
146
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
147
147
  class NetworkPage < Page
148
148
  ##
149
149
  # Initialize the NetworkPage
@@ -174,7 +174,7 @@ module Twilio
174
174
  end
175
175
 
176
176
  ##
177
- # 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.
177
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
178
178
  class NetworkContext < InstanceContext
179
179
  ##
180
180
  # Initialize the NetworkContext
@@ -214,7 +214,7 @@ module Twilio
214
214
  end
215
215
 
216
216
  ##
217
- # 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.
217
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
218
218
  class NetworkInstance < InstanceResource
219
219
  ##
220
220
  # Initialize the NetworkInstance
@@ -11,7 +11,7 @@ module Twilio
11
11
  class Supersim < Domain
12
12
  class V1 < 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 NetworkAccessProfileList < ListResource
16
16
  ##
17
17
  # Initialize the NetworkAccessProfileList
@@ -132,7 +132,7 @@ module Twilio
132
132
  end
133
133
 
134
134
  ##
135
- # 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.
135
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
136
136
  class NetworkAccessProfilePage < Page
137
137
  ##
138
138
  # Initialize the NetworkAccessProfilePage
@@ -163,7 +163,7 @@ module Twilio
163
163
  end
164
164
 
165
165
  ##
166
- # 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.
166
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
167
167
  class NetworkAccessProfileContext < InstanceContext
168
168
  ##
169
169
  # Initialize the NetworkAccessProfileContext
@@ -239,7 +239,7 @@ module Twilio
239
239
  end
240
240
 
241
241
  ##
242
- # 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.
242
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
243
243
  class NetworkAccessProfileInstance < InstanceResource
244
244
  ##
245
245
  # Initialize the NetworkAccessProfileInstance
@@ -12,7 +12,7 @@ module Twilio
12
12
  class V1 < Version
13
13
  class NetworkAccessProfileContext < 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 NetworkAccessProfileNetworkList < ListResource
17
17
  ##
18
18
  # Initialize the NetworkAccessProfileNetworkList
@@ -133,7 +133,7 @@ module Twilio
133
133
  end
134
134
 
135
135
  ##
136
- # 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.
136
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
137
137
  class NetworkAccessProfileNetworkPage < Page
138
138
  ##
139
139
  # Initialize the NetworkAccessProfileNetworkPage
@@ -168,7 +168,7 @@ module Twilio
168
168
  end
169
169
 
170
170
  ##
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.
171
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
172
172
  class NetworkAccessProfileNetworkContext < InstanceContext
173
173
  ##
174
174
  # Initialize the NetworkAccessProfileNetworkContext
@@ -222,7 +222,7 @@ module Twilio
222
222
  end
223
223
 
224
224
  ##
225
- # 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.
225
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
226
226
  class NetworkAccessProfileNetworkInstance < InstanceResource
227
227
  ##
228
228
  # Initialize the NetworkAccessProfileNetworkInstance
@@ -11,7 +11,7 @@ module Twilio
11
11
  class Supersim < Domain
12
12
  class V1 < 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 SimList < ListResource
16
16
  ##
17
17
  # Initialize the SimList
@@ -140,7 +140,7 @@ module Twilio
140
140
  end
141
141
 
142
142
  ##
143
- # 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.
143
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
144
144
  class SimPage < Page
145
145
  ##
146
146
  # Initialize the SimPage
@@ -171,7 +171,7 @@ module Twilio
171
171
  end
172
172
 
173
173
  ##
174
- # 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.
174
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
175
175
  class SimContext < InstanceContext
176
176
  ##
177
177
  # Initialize the SimContext
@@ -246,7 +246,7 @@ module Twilio
246
246
  end
247
247
 
248
248
  ##
249
- # 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.
249
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
250
250
  class SimInstance < InstanceResource
251
251
  ##
252
252
  # Initialize the SimInstance
@@ -0,0 +1,371 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class Supersim < Domain
12
+ class V1 < Version
13
+ ##
14
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
15
+ class SmsCommandList < ListResource
16
+ ##
17
+ # Initialize the SmsCommandList
18
+ # @param [Version] version Version that contains the resource
19
+ # @return [SmsCommandList] SmsCommandList
20
+ def initialize(version)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {}
25
+ @uri = "/SmsCommands"
26
+ end
27
+
28
+ ##
29
+ # Create the SmsCommandInstance
30
+ # @param [String] sim The `sid` or `unique_name` of the
31
+ # {SIM}[https://www.twilio.com/docs/wireless/api/sim-resource] to send the SMS
32
+ # Command to.
33
+ # @param [String] payload The message body of the SMS Command.
34
+ # @param [String] callback_method The HTTP method we should use to call
35
+ # `callback_url`. Can be: `GET` or `POST` and the default is POST.
36
+ # @param [String] callback_url The URL we should call using the `callback_method`
37
+ # after we have sent the command.
38
+ # @return [SmsCommandInstance] Created SmsCommandInstance
39
+ def create(sim: nil, payload: nil, callback_method: :unset, callback_url: :unset)
40
+ data = Twilio::Values.of({
41
+ 'Sim' => sim,
42
+ 'Payload' => payload,
43
+ 'CallbackMethod' => callback_method,
44
+ 'CallbackUrl' => callback_url,
45
+ })
46
+
47
+ payload = @version.create('POST', @uri, data: data)
48
+
49
+ SmsCommandInstance.new(@version, payload, )
50
+ end
51
+
52
+ ##
53
+ # Lists SmsCommandInstance records from the API as a list.
54
+ # Unlike stream(), this operation is eager and will load `limit` records into
55
+ # memory before returning.
56
+ # @param [String] sim The SID or unique name of the Sim that SMS Command was sent
57
+ # to or from.
58
+ # @param [sms_command.Status] status The status of the SMS Command. Can be:
59
+ # `queued`, `sent`, `delivered`, `received` or `failed`. See the {SMS Command
60
+ # Status
61
+ # Values}[https://www.twilio.com/docs/wireless/api/smscommand-resource#status-values]
62
+ # for a description of each.
63
+ # @param [sms_command.Direction] direction The direction of the SMS Command. Can
64
+ # be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
65
+ # `mobile terminated`, and `from_sim` is synonymous with the term `mobile
66
+ # originated`.
67
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
68
+ # guarantees to never return more than limit. Default is no limit
69
+ # @param [Integer] page_size Number of records to fetch per request, when
70
+ # not set will use the default value of 50 records. If no page_size is defined
71
+ # but a limit is defined, stream() will attempt to read the limit with the most
72
+ # efficient page size, i.e. min(limit, 1000)
73
+ # @return [Array] Array of up to limit results
74
+ def list(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
75
+ self.stream(
76
+ sim: sim,
77
+ status: status,
78
+ direction: direction,
79
+ limit: limit,
80
+ page_size: page_size
81
+ ).entries
82
+ end
83
+
84
+ ##
85
+ # Streams SmsCommandInstance records from the API as an Enumerable.
86
+ # This operation lazily loads records as efficiently as possible until the limit
87
+ # is reached.
88
+ # @param [String] sim The SID or unique name of the Sim that SMS Command was sent
89
+ # to or from.
90
+ # @param [sms_command.Status] status The status of the SMS Command. Can be:
91
+ # `queued`, `sent`, `delivered`, `received` or `failed`. See the {SMS Command
92
+ # Status
93
+ # Values}[https://www.twilio.com/docs/wireless/api/smscommand-resource#status-values]
94
+ # for a description of each.
95
+ # @param [sms_command.Direction] direction The direction of the SMS Command. Can
96
+ # be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
97
+ # `mobile terminated`, and `from_sim` is synonymous with the term `mobile
98
+ # originated`.
99
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
100
+ # guarantees to never return more than limit. Default is no limit.
101
+ # @param [Integer] page_size Number of records to fetch per request, when
102
+ # not set will use the default value of 50 records. If no page_size is defined
103
+ # but a limit is defined, stream() will attempt to read the limit with the most
104
+ # efficient page size, i.e. min(limit, 1000)
105
+ # @return [Enumerable] Enumerable that will yield up to limit results
106
+ def stream(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
107
+ limits = @version.read_limits(limit, page_size)
108
+
109
+ page = self.page(sim: sim, status: status, direction: direction, page_size: limits[:page_size], )
110
+
111
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
112
+ end
113
+
114
+ ##
115
+ # When passed a block, yields SmsCommandInstance records from the API.
116
+ # This operation lazily loads records as efficiently as possible until the limit
117
+ # is reached.
118
+ def each
119
+ limits = @version.read_limits
120
+
121
+ page = self.page(page_size: limits[:page_size], )
122
+
123
+ @version.stream(page,
124
+ limit: limits[:limit],
125
+ page_limit: limits[:page_limit]).each {|x| yield x}
126
+ end
127
+
128
+ ##
129
+ # Retrieve a single page of SmsCommandInstance records from the API.
130
+ # Request is executed immediately.
131
+ # @param [String] sim The SID or unique name of the Sim that SMS Command was sent
132
+ # to or from.
133
+ # @param [sms_command.Status] status The status of the SMS Command. Can be:
134
+ # `queued`, `sent`, `delivered`, `received` or `failed`. See the {SMS Command
135
+ # Status
136
+ # Values}[https://www.twilio.com/docs/wireless/api/smscommand-resource#status-values]
137
+ # for a description of each.
138
+ # @param [sms_command.Direction] direction The direction of the SMS Command. Can
139
+ # be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
140
+ # `mobile terminated`, and `from_sim` is synonymous with the term `mobile
141
+ # originated`.
142
+ # @param [String] page_token PageToken provided by the API
143
+ # @param [Integer] page_number Page Number, this value is simply for client state
144
+ # @param [Integer] page_size Number of records to return, defaults to 50
145
+ # @return [Page] Page of SmsCommandInstance
146
+ def page(sim: :unset, status: :unset, direction: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
147
+ params = Twilio::Values.of({
148
+ 'Sim' => sim,
149
+ 'Status' => status,
150
+ 'Direction' => direction,
151
+ 'PageToken' => page_token,
152
+ 'Page' => page_number,
153
+ 'PageSize' => page_size,
154
+ })
155
+
156
+ response = @version.page('GET', @uri, params: params)
157
+
158
+ SmsCommandPage.new(@version, response, @solution)
159
+ end
160
+
161
+ ##
162
+ # Retrieve a single page of SmsCommandInstance records from the API.
163
+ # Request is executed immediately.
164
+ # @param [String] target_url API-generated URL for the requested results page
165
+ # @return [Page] Page of SmsCommandInstance
166
+ def get_page(target_url)
167
+ response = @version.domain.request(
168
+ 'GET',
169
+ target_url
170
+ )
171
+ SmsCommandPage.new(@version, response, @solution)
172
+ end
173
+
174
+ ##
175
+ # Provide a user friendly representation
176
+ def to_s
177
+ '#<Twilio.Supersim.V1.SmsCommandList>'
178
+ end
179
+ end
180
+
181
+ ##
182
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
183
+ class SmsCommandPage < Page
184
+ ##
185
+ # Initialize the SmsCommandPage
186
+ # @param [Version] version Version that contains the resource
187
+ # @param [Response] response Response from the API
188
+ # @param [Hash] solution Path solution for the resource
189
+ # @return [SmsCommandPage] SmsCommandPage
190
+ def initialize(version, response, solution)
191
+ super(version, response)
192
+
193
+ # Path Solution
194
+ @solution = solution
195
+ end
196
+
197
+ ##
198
+ # Build an instance of SmsCommandInstance
199
+ # @param [Hash] payload Payload response from the API
200
+ # @return [SmsCommandInstance] SmsCommandInstance
201
+ def get_instance(payload)
202
+ SmsCommandInstance.new(@version, payload, )
203
+ end
204
+
205
+ ##
206
+ # Provide a user friendly representation
207
+ def to_s
208
+ '<Twilio.Supersim.V1.SmsCommandPage>'
209
+ end
210
+ end
211
+
212
+ ##
213
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
214
+ class SmsCommandContext < InstanceContext
215
+ ##
216
+ # Initialize the SmsCommandContext
217
+ # @param [Version] version Version that contains the resource
218
+ # @param [String] sid The SID of the SMS Command resource to fetch.
219
+ # @return [SmsCommandContext] SmsCommandContext
220
+ def initialize(version, sid)
221
+ super(version)
222
+
223
+ # Path Solution
224
+ @solution = {sid: sid, }
225
+ @uri = "/SmsCommands/#{@solution[:sid]}"
226
+ end
227
+
228
+ ##
229
+ # Fetch the SmsCommandInstance
230
+ # @return [SmsCommandInstance] Fetched SmsCommandInstance
231
+ def fetch
232
+ payload = @version.fetch('GET', @uri)
233
+
234
+ SmsCommandInstance.new(@version, payload, sid: @solution[:sid], )
235
+ end
236
+
237
+ ##
238
+ # Provide a user friendly representation
239
+ def to_s
240
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
241
+ "#<Twilio.Supersim.V1.SmsCommandContext #{context}>"
242
+ end
243
+
244
+ ##
245
+ # Provide a detailed, user friendly representation
246
+ def inspect
247
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
248
+ "#<Twilio.Supersim.V1.SmsCommandContext #{context}>"
249
+ end
250
+ end
251
+
252
+ ##
253
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
254
+ class SmsCommandInstance < InstanceResource
255
+ ##
256
+ # Initialize the SmsCommandInstance
257
+ # @param [Version] version Version that contains the resource
258
+ # @param [Hash] payload payload that contains response from Twilio
259
+ # @param [String] sid The SID of the SMS Command resource to fetch.
260
+ # @return [SmsCommandInstance] SmsCommandInstance
261
+ def initialize(version, payload, sid: nil)
262
+ super(version)
263
+
264
+ # Marshaled Properties
265
+ @properties = {
266
+ 'sid' => payload['sid'],
267
+ 'account_sid' => payload['account_sid'],
268
+ 'sim_sid' => payload['sim_sid'],
269
+ 'payload' => payload['payload'],
270
+ 'status' => payload['status'],
271
+ 'direction' => payload['direction'],
272
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
273
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
274
+ 'url' => payload['url'],
275
+ }
276
+
277
+ # Context
278
+ @instance_context = nil
279
+ @params = {'sid' => sid || @properties['sid'], }
280
+ end
281
+
282
+ ##
283
+ # Generate an instance context for the instance, the context is capable of
284
+ # performing various actions. All instance actions are proxied to the context
285
+ # @return [SmsCommandContext] SmsCommandContext for this SmsCommandInstance
286
+ def context
287
+ unless @instance_context
288
+ @instance_context = SmsCommandContext.new(@version, @params['sid'], )
289
+ end
290
+ @instance_context
291
+ end
292
+
293
+ ##
294
+ # @return [String] The unique string that identifies the resource
295
+ def sid
296
+ @properties['sid']
297
+ end
298
+
299
+ ##
300
+ # @return [String] The SID of the Account that created the resource
301
+ def account_sid
302
+ @properties['account_sid']
303
+ end
304
+
305
+ ##
306
+ # @return [String] The SID of the SIM that this SMS Command was sent to or from
307
+ def sim_sid
308
+ @properties['sim_sid']
309
+ end
310
+
311
+ ##
312
+ # @return [String] The message body of the SMS Command sent to or from the SIM
313
+ def payload
314
+ @properties['payload']
315
+ end
316
+
317
+ ##
318
+ # @return [sms_command.Status] The status of the SMS Command
319
+ def status
320
+ @properties['status']
321
+ end
322
+
323
+ ##
324
+ # @return [sms_command.Direction] The direction of the SMS Command
325
+ def direction
326
+ @properties['direction']
327
+ end
328
+
329
+ ##
330
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was created
331
+ def date_created
332
+ @properties['date_created']
333
+ end
334
+
335
+ ##
336
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
337
+ def date_updated
338
+ @properties['date_updated']
339
+ end
340
+
341
+ ##
342
+ # @return [String] The absolute URL of the SMS Command resource
343
+ def url
344
+ @properties['url']
345
+ end
346
+
347
+ ##
348
+ # Fetch the SmsCommandInstance
349
+ # @return [SmsCommandInstance] Fetched SmsCommandInstance
350
+ def fetch
351
+ context.fetch
352
+ end
353
+
354
+ ##
355
+ # Provide a user friendly representation
356
+ def to_s
357
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
358
+ "<Twilio.Supersim.V1.SmsCommandInstance #{values}>"
359
+ end
360
+
361
+ ##
362
+ # Provide a detailed, user friendly representation
363
+ def inspect
364
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
365
+ "<Twilio.Supersim.V1.SmsCommandInstance #{values}>"
366
+ end
367
+ end
368
+ end
369
+ end
370
+ end
371
+ end