twilio-ruby 5.39.1 → 5.40.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGES.md +101 -1
  4. data/CONTRIBUTING.md +2 -2
  5. data/ISSUE_TEMPLATE.md +5 -1
  6. data/Makefile +1 -1
  7. data/PULL_REQUEST_TEMPLATE.md +1 -1
  8. data/README.md +4 -3
  9. data/lib/twilio-ruby/framework/version.rb +2 -7
  10. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +6 -4
  11. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +3 -3
  12. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +79 -60
  13. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +14 -0
  14. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +14 -0
  15. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +14 -0
  16. data/lib/twilio-ruby/rest/client.rb +7 -0
  17. data/lib/twilio-ruby/rest/conversations.rb +52 -0
  18. data/lib/twilio-ruby/rest/conversations/v1.rb +88 -1
  19. data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +258 -0
  20. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +15 -4
  21. data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +19 -10
  22. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +12 -2
  23. data/lib/twilio-ruby/rest/conversations/v1/credential.rb +427 -0
  24. data/lib/twilio-ruby/rest/conversations/v1/notification.rb +310 -0
  25. data/lib/twilio-ruby/rest/conversations/v1/role.rb +372 -0
  26. data/lib/twilio-ruby/rest/conversations/v1/service.rb +442 -0
  27. data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +385 -0
  28. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +259 -0
  29. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +586 -0
  30. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +546 -0
  31. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +388 -0
  32. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +513 -0
  33. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +454 -0
  34. data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +393 -0
  35. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +419 -0
  36. data/lib/twilio-ruby/rest/conversations/v1/user.rb +398 -0
  37. data/lib/twilio-ruby/rest/events.rb +63 -0
  38. data/lib/twilio-ruby/rest/events/v1.rb +74 -0
  39. data/lib/twilio-ruby/rest/events/v1/event_type.rb +291 -0
  40. data/lib/twilio-ruby/rest/events/v1/sink.rb +380 -0
  41. data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +115 -0
  42. data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +119 -0
  43. data/lib/twilio-ruby/rest/events/v1/subscription.rb +363 -0
  44. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +322 -0
  45. data/lib/twilio-ruby/rest/messaging.rb +6 -0
  46. data/lib/twilio-ruby/rest/messaging/v1.rb +7 -0
  47. data/lib/twilio-ruby/rest/messaging/v1/deactivation.rb +164 -0
  48. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +3 -3
  49. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +16 -2
  50. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +18 -4
  51. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +45 -4
  52. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +14 -1
  53. data/lib/twilio-ruby/rest/serverless/v1/service.rb +13 -13
  54. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +6 -6
  55. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +5 -5
  56. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +8 -8
  57. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +6 -8
  58. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +8 -8
  59. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +14 -14
  60. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
  61. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +7 -7
  62. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +1 -1
  63. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +12 -11
  64. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +39 -9
  65. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +75 -9
  66. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +2 -1
  67. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +25 -3
  68. data/lib/twilio-ruby/rest/verify/v2/service.rb +21 -9
  69. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +10 -2
  70. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +4 -1
  71. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +0 -6
  72. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +5 -19
  73. data/lib/twilio-ruby/version.rb +1 -1
  74. data/spec/framework/version_spec.rb +42 -0
  75. data/spec/holodeck/holodeck.rb +3 -3
  76. data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +35 -36
  77. data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +39 -40
  78. data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +35 -36
  79. data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +25 -23
  80. data/spec/integration/api/v2010/account/message_spec.rb +37 -0
  81. data/spec/integration/bulkexports/v1/export/day_spec.rb +5 -5
  82. data/spec/integration/bulkexports/v1/export_configuration_spec.rb +4 -4
  83. data/spec/integration/bulkexports/v1/export_spec.rb +3 -3
  84. data/spec/integration/conversations/v1/configuration_spec.rb +85 -0
  85. data/spec/integration/conversations/v1/conversation/message/delivery_receipt_spec.rb +4 -0
  86. data/spec/integration/conversations/v1/conversation/message_spec.rb +38 -0
  87. data/spec/integration/conversations/v1/conversation/participant_spec.rb +60 -4
  88. data/spec/integration/conversations/v1/conversation_spec.rb +35 -0
  89. data/spec/integration/conversations/v1/credential_spec.rb +219 -0
  90. data/spec/integration/conversations/v1/notification_spec.rb +107 -0
  91. data/spec/integration/conversations/v1/role_spec.rb +249 -0
  92. data/spec/integration/conversations/v1/service/binding_spec.rb +166 -0
  93. data/spec/integration/conversations/v1/service/configuration_spec.rb +87 -0
  94. data/spec/integration/conversations/v1/service/conversation/message/delivery_receipt_spec.rb +144 -0
  95. data/spec/integration/conversations/v1/service/conversation/message_spec.rb +429 -0
  96. data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +407 -0
  97. data/spec/integration/conversations/v1/service/conversation/webhook_spec.rb +299 -0
  98. data/spec/integration/conversations/v1/service/conversation_spec.rb +289 -0
  99. data/spec/integration/conversations/v1/service/role_spec.rb +260 -0
  100. data/spec/integration/conversations/v1/service/user_spec.rb +230 -0
  101. data/spec/integration/conversations/v1/service_spec.rb +174 -0
  102. data/spec/integration/conversations/v1/user_spec.rb +220 -0
  103. data/spec/integration/events/v1/event_type_spec.rb +133 -0
  104. data/spec/integration/events/v1/sink/sink_test_spec.rb +42 -0
  105. data/spec/integration/events/v1/sink/sink_validate_spec.rb +44 -0
  106. data/spec/integration/events/v1/sink_spec.rb +217 -0
  107. data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +212 -0
  108. data/spec/integration/events/v1/subscription_spec.rb +205 -0
  109. data/spec/integration/messaging/v1/deactivation_spec.rb +40 -0
  110. data/spec/integration/numbers/v2/regulatory_compliance/end_user_spec.rb +27 -0
  111. data/spec/integration/numbers/v2/regulatory_compliance/supporting_document_spec.rb +27 -0
  112. data/spec/integration/studio/v1/flow/execution/execution_step_spec.rb +1 -0
  113. data/spec/integration/studio/v2/flow/execution/execution_step_spec.rb +1 -0
  114. data/spec/integration/supersim/v1/sim_spec.rb +23 -0
  115. data/spec/integration/supersim/v1/usage_record_spec.rb +463 -18
  116. data/spec/integration/trunking/v1/trunk_spec.rb +4 -0
  117. data/spec/integration/verify/v2/service/access_token_spec.rb +1 -1
  118. data/spec/integration/verify/v2/service/entity/challenge_spec.rb +8 -8
  119. data/spec/integration/video/v1/room_spec.rb +37 -0
  120. data/spec/integration/wireless/v1/sim/data_session_spec.rb +2 -2
  121. data/spec/spec_helper.rb +1 -1
  122. metadata +70 -2
@@ -20,7 +20,7 @@ module Twilio
20
20
  # @param [Version] version Version that contains the resource
21
21
  # @param [String] service_sid The SID of the Service that the Deployment resource
22
22
  # is associated with.
23
- # @param [String] environment_sid The SID of the environment for the deployment.
23
+ # @param [String] environment_sid The SID of the Environment for the Deployment.
24
24
  # @return [DeploymentList] DeploymentList
25
25
  def initialize(version, service_sid: nil, environment_sid: nil)
26
26
  super(version)
@@ -112,7 +112,7 @@ module Twilio
112
112
 
113
113
  ##
114
114
  # Create the DeploymentInstance
115
- # @param [String] build_sid The SID of the build for the deployment.
115
+ # @param [String] build_sid The SID of the Build for the Deployment.
116
116
  # @return [DeploymentInstance] Created DeploymentInstance
117
117
  def create(build_sid: :unset)
118
118
  data = Twilio::Values.of({'BuildSid' => build_sid, })
@@ -178,9 +178,9 @@ module Twilio
178
178
  # @param [Version] version Version that contains the resource
179
179
  # @param [String] service_sid The SID of the Service to fetch the Deployment
180
180
  # resource from.
181
- # @param [String] environment_sid The SID of the environment used by the
181
+ # @param [String] environment_sid The SID of the Environment used by the
182
182
  # Deployment to fetch.
183
- # @param [String] sid The SID of the Deployment resource to fetch.
183
+ # @param [String] sid The SID that identifies the Deployment resource to fetch.
184
184
  # @return [DeploymentContext] DeploymentContext
185
185
  def initialize(version, service_sid, environment_sid, sid)
186
186
  super(version)
@@ -229,8 +229,8 @@ module Twilio
229
229
  # @param [Hash] payload payload that contains response from Twilio
230
230
  # @param [String] service_sid The SID of the Service that the Deployment resource
231
231
  # is associated with.
232
- # @param [String] environment_sid The SID of the environment for the deployment.
233
- # @param [String] sid The SID of the Deployment resource to fetch.
232
+ # @param [String] environment_sid The SID of the Environment for the Deployment.
233
+ # @param [String] sid The SID that identifies the Deployment resource to fetch.
234
234
  # @return [DeploymentInstance] DeploymentInstance
235
235
  def initialize(version, payload, service_sid: nil, environment_sid: nil, sid: nil)
236
236
  super(version)
@@ -291,13 +291,13 @@ module Twilio
291
291
  end
292
292
 
293
293
  ##
294
- # @return [String] The SID of the environment for the deployment
294
+ # @return [String] The SID of the Environment for the Deployment
295
295
  def environment_sid
296
296
  @properties['environment_sid']
297
297
  end
298
298
 
299
299
  ##
300
- # @return [String] The SID of the build for the deployment
300
+ # @return [String] The SID of the Build for the deployment
301
301
  def build_sid
302
302
  @properties['build_sid']
303
303
  end
@@ -20,7 +20,7 @@ module Twilio
20
20
  # @param [Version] version Version that contains the resource
21
21
  # @param [String] service_sid The SID of the Service that the Variable resource is
22
22
  # associated with.
23
- # @param [String] environment_sid The SID of the environment in which the variable
23
+ # @param [String] environment_sid The SID of the Environment in which the Variable
24
24
  # exists.
25
25
  # @return [VariableList] VariableList
26
26
  def initialize(version, service_sid: nil, environment_sid: nil)
@@ -114,9 +114,9 @@ module Twilio
114
114
  ##
115
115
  # Create the VariableInstance
116
116
  # @param [String] key A string by which the Variable resource can be referenced.
117
- # Must be less than 128 characters long.
118
- # @param [String] value A string that contains the actual value of the variable.
119
- # Must have less than 450 bytes.
117
+ # It can be a maximum of 128 characters.
118
+ # @param [String] value A string that contains the actual value of the Variable.
119
+ # It can be a maximum of 450 bytes in size.
120
120
  # @return [VariableInstance] Created VariableInstance
121
121
  def create(key: nil, value: nil)
122
122
  data = Twilio::Values.of({'Key' => key, 'Value' => value, })
@@ -182,7 +182,7 @@ module Twilio
182
182
  # @param [Version] version Version that contains the resource
183
183
  # @param [String] service_sid The SID of the Service to fetch the Variable
184
184
  # resource from.
185
- # @param [String] environment_sid The SID of the environment with the Variable
185
+ # @param [String] environment_sid The SID of the Environment with the Variable
186
186
  # resource to fetch.
187
187
  # @param [String] sid The SID of the Variable resource to fetch.
188
188
  # @return [VariableContext] VariableContext
@@ -212,9 +212,9 @@ module Twilio
212
212
  ##
213
213
  # Update the VariableInstance
214
214
  # @param [String] key A string by which the Variable resource can be referenced.
215
- # Must be less than 128 characters long.
216
- # @param [String] value A string that contains the actual value of the variable.
217
- # Must have less than 450 bytes.
215
+ # It can be a maximum of 128 characters.
216
+ # @param [String] value A string that contains the actual value of the Variable.
217
+ # It can be a maximum of 450 bytes in size.
218
218
  # @return [VariableInstance] Updated VariableInstance
219
219
  def update(key: :unset, value: :unset)
220
220
  data = Twilio::Values.of({'Key' => key, 'Value' => value, })
@@ -261,7 +261,7 @@ module Twilio
261
261
  # @param [Hash] payload payload that contains response from Twilio
262
262
  # @param [String] service_sid The SID of the Service that the Variable resource is
263
263
  # associated with.
264
- # @param [String] environment_sid The SID of the environment in which the variable
264
+ # @param [String] environment_sid The SID of the Environment in which the Variable
265
265
  # exists.
266
266
  # @param [String] sid The SID of the Variable resource to fetch.
267
267
  # @return [VariableInstance] VariableInstance
@@ -325,7 +325,7 @@ module Twilio
325
325
  end
326
326
 
327
327
  ##
328
- # @return [String] The SID of the environment in which the variable exists
328
+ # @return [String] The SID of the Environment in which the Variable exists
329
329
  def environment_sid
330
330
  @properties['environment_sid']
331
331
  end
@@ -337,7 +337,7 @@ module Twilio
337
337
  end
338
338
 
339
339
  ##
340
- # @return [String] A string that contains the actual value of the variable
340
+ # @return [String] A string that contains the actual value of the Variable
341
341
  def value
342
342
  @properties['value']
343
343
  end
@@ -370,9 +370,9 @@ module Twilio
370
370
  ##
371
371
  # Update the VariableInstance
372
372
  # @param [String] key A string by which the Variable resource can be referenced.
373
- # Must be less than 128 characters long.
374
- # @param [String] value A string that contains the actual value of the variable.
375
- # Must have less than 450 bytes.
373
+ # It can be a maximum of 128 characters.
374
+ # @param [String] value A string that contains the actual value of the Variable.
375
+ # It can be a maximum of 450 bytes in size.
376
376
  # @return [VariableInstance] Updated VariableInstance
377
377
  def update(key: :unset, value: :unset)
378
378
  context.update(key: key, value: value, )
@@ -111,7 +111,7 @@ module Twilio
111
111
  ##
112
112
  # Create the FunctionInstance
113
113
  # @param [String] friendly_name A descriptive string that you create to describe
114
- # the Function resource. It can be up to 255 characters long.
114
+ # the Function resource. It can be a maximum of 255 characters.
115
115
  # @return [FunctionInstance] Created FunctionInstance
116
116
  def create(friendly_name: nil)
117
117
  data = Twilio::Values.of({'FriendlyName' => friendly_name, })
@@ -199,7 +199,7 @@ module Twilio
199
199
  ##
200
200
  # Update the FunctionInstance
201
201
  # @param [String] friendly_name A descriptive string that you create to describe
202
- # the Function resource. It can be up to 255 characters long.
202
+ # the Function resource. It can be a maximum of 255 characters.
203
203
  # @return [FunctionInstance] Updated FunctionInstance
204
204
  def update(friendly_name: nil)
205
205
  data = Twilio::Values.of({'FriendlyName' => friendly_name, })
@@ -331,7 +331,7 @@ module Twilio
331
331
  end
332
332
 
333
333
  ##
334
- # @return [String] The URLs of nested resources of the function
334
+ # @return [String] The URLs of nested resources of the Function resource
335
335
  def links
336
336
  @properties['links']
337
337
  end
@@ -353,7 +353,7 @@ module Twilio
353
353
  ##
354
354
  # Update the FunctionInstance
355
355
  # @param [String] friendly_name A descriptive string that you create to describe
356
- # the Function resource. It can be up to 255 characters long.
356
+ # the Function resource. It can be a maximum of 255 characters.
357
357
  # @return [FunctionInstance] Updated FunctionInstance
358
358
  def update(friendly_name: nil)
359
359
  context.update(friendly_name: friendly_name, )
@@ -20,8 +20,8 @@ module Twilio
20
20
  # @param [Version] version Version that contains the resource
21
21
  # @param [String] service_sid The SID of the Service that the Function Version
22
22
  # resource is associated with.
23
- # @param [String] function_sid The SID of the function that is the parent of the
24
- # function version.
23
+ # @param [String] function_sid The SID of the Function resource that is the parent
24
+ # of the Function Version resource.
25
25
  # @return [FunctionVersionList] FunctionVersionList
26
26
  def initialize(version, service_sid: nil, function_sid: nil)
27
27
  super(version)
@@ -229,8 +229,8 @@ module Twilio
229
229
  # @param [Hash] payload payload that contains response from Twilio
230
230
  # @param [String] service_sid The SID of the Service that the Function Version
231
231
  # resource is associated with.
232
- # @param [String] function_sid The SID of the function that is the parent of the
233
- # function version.
232
+ # @param [String] function_sid The SID of the Function resource that is the parent
233
+ # of the Function Version resource.
234
234
  # @param [String] sid The SID of the Function Version resource to fetch.
235
235
  # @return [FunctionVersionInstance] FunctionVersionInstance
236
236
  def initialize(version, payload, service_sid: nil, function_sid: nil, sid: nil)
@@ -293,19 +293,19 @@ module Twilio
293
293
  end
294
294
 
295
295
  ##
296
- # @return [String] The SID of the function that is the parent of the function version
296
+ # @return [String] The SID of the Function resource that is the parent of the Function Version resource
297
297
  def function_sid
298
298
  @properties['function_sid']
299
299
  end
300
300
 
301
301
  ##
302
- # @return [String] The URL-friendly string by which the function version can be referenced
302
+ # @return [String] The URL-friendly string by which the Function Version resource can be referenced
303
303
  def path
304
304
  @properties['path']
305
305
  end
306
306
 
307
307
  ##
308
- # @return [function_version.Visibility] The access control that determines how the function version can be accessed
308
+ # @return [function_version.Visibility] The access control that determines how the Function Version resource can be accessed
309
309
  def visibility
310
310
  @properties['visibility']
311
311
  end
@@ -85,7 +85,7 @@ module Twilio
85
85
  # @param [Version] version Version that contains the resource
86
86
  # @param [String] service_sid The SID of the Service to fetch the Function Version
87
87
  # content from.
88
- # @param [String] function_sid The SID of the function that is the parent of the
88
+ # @param [String] function_sid The SID of the Function that is the parent of the
89
89
  # Function Version content to fetch.
90
90
  # @param [String] sid The SID of the Function Version content to fetch.
91
91
  # @return [FunctionVersionContentContext] FunctionVersionContentContext
@@ -29,25 +29,26 @@ module Twilio
29
29
  # Create the FleetInstance
30
30
  # @param [String] network_access_profile The SID or unique name of the Network
31
31
  # Access Profile that will control which cellular networks the Fleet's SIMs can
32
- # connect to
32
+ # connect to.
33
33
  # @param [String] unique_name An application-defined string that uniquely
34
34
  # identifies the resource. It can be used in place of the resource's `sid` in the
35
35
  # URL to address the resource.
36
36
  # @param [Boolean] data_enabled Defines whether SIMs in the Fleet are capable of
37
- # using 2G/3G/4G/LTE/CAT-M data connectivity
37
+ # using 2G/3G/4G/LTE/CAT-M data connectivity. Defaults to `true`.
38
38
  # @param [String] data_limit The total data usage (download and upload combined)
39
39
  # in Megabytes that each Sim resource assigned to the Fleet resource can consume
40
40
  # during a billing period (normally one month). Value must be between 1MB (1) and
41
- # 2TB (2,000,000).
41
+ # 2TB (2,000,000). Defaults to 1GB (1,000).
42
42
  # @param [Boolean] commands_enabled Defines whether SIMs in the Fleet are capable
43
- # of sending and receiving machine-to-machine SMS via Commands.
43
+ # of sending and receiving machine-to-machine SMS via Commands. Defaults to
44
+ # `true`.
44
45
  # @param [String] commands_url The URL that will receive a webhook when a SIM in
45
46
  # the Fleet originates a machine-to-machine SMS via Commands. Your server should
46
47
  # respond with an HTTP status code in the 200 range; any response body will be
47
48
  # ignored.
48
49
  # @param [String] commands_method A string representing the HTTP method to use
49
- # when making a request to `commands_url`. Can be one of POST or GET. Defaults to
50
- # POST.
50
+ # when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults
51
+ # to `POST`.
51
52
  # @return [FleetInstance] Created FleetInstance
52
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)
53
54
  data = Twilio::Values.of({
@@ -71,7 +72,7 @@ module Twilio
71
72
  # memory before returning.
72
73
  # @param [String] network_access_profile The SID or unique name of the Network
73
74
  # Access Profile that controls which cellular networks the Fleet's SIMs can
74
- # connect to
75
+ # connect to.
75
76
  # @param [Integer] limit Upper limit for the number of records to return. stream()
76
77
  # guarantees to never return more than limit. Default is no limit
77
78
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -93,7 +94,7 @@ module Twilio
93
94
  # is reached.
94
95
  # @param [String] network_access_profile The SID or unique name of the Network
95
96
  # Access Profile that controls which cellular networks the Fleet's SIMs can
96
- # connect to
97
+ # connect to.
97
98
  # @param [Integer] limit Upper limit for the number of records to return. stream()
98
99
  # guarantees to never return more than limit. Default is no limit.
99
100
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -128,7 +129,7 @@ module Twilio
128
129
  # Request is executed immediately.
129
130
  # @param [String] network_access_profile The SID or unique name of the Network
130
131
  # Access Profile that controls which cellular networks the Fleet's SIMs can
131
- # connect to
132
+ # connect to.
132
133
  # @param [String] page_token PageToken provided by the API
133
134
  # @param [Integer] page_number Page Number, this value is simply for client state
134
135
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -229,7 +230,7 @@ module Twilio
229
230
  # URL to address the resource.
230
231
  # @param [String] network_access_profile The SID or unique name of the Network
231
232
  # Access Profile that will control which cellular networks the Fleet's SIMs can
232
- # connect to
233
+ # connect to.
233
234
  # @return [FleetInstance] Updated FleetInstance
234
235
  def update(unique_name: :unset, network_access_profile: :unset)
235
236
  data = Twilio::Values.of({
@@ -394,7 +395,7 @@ module Twilio
394
395
  # URL to address the resource.
395
396
  # @param [String] network_access_profile The SID or unique name of the Network
396
397
  # Access Profile that will control which cellular networks the Fleet's SIMs can
397
- # connect to
398
+ # connect to.
398
399
  # @return [FleetInstance] Updated FleetInstance
399
400
  def update(unique_name: :unset, network_access_profile: :unset)
400
401
  context.update(unique_name: unique_name, network_access_profile: network_access_profile, )
@@ -30,7 +30,7 @@ module Twilio
30
30
  # Unlike stream(), this operation is eager and will load `limit` records into
31
31
  # memory before returning.
32
32
  # @param [sim.Status] status The status of the Sim resources to read. Can be
33
- # `new`, `active`, `inactive`, or `scheduled`.
33
+ # `new`, `ready`, `active`, `inactive`, or `scheduled`.
34
34
  # @param [String] fleet The SID or unique name of the Fleet to which a list of
35
35
  # Sims are assigned.
36
36
  # @param [String] iccid The
@@ -53,7 +53,7 @@ module Twilio
53
53
  # This operation lazily loads records as efficiently as possible until the limit
54
54
  # is reached.
55
55
  # @param [sim.Status] status The status of the Sim resources to read. Can be
56
- # `new`, `active`, `inactive`, or `scheduled`.
56
+ # `new`, `ready`, `active`, `inactive`, or `scheduled`.
57
57
  # @param [String] fleet The SID or unique name of the Fleet to which a list of
58
58
  # Sims are assigned.
59
59
  # @param [String] iccid The
@@ -93,7 +93,7 @@ module Twilio
93
93
  # Retrieve a single page of SimInstance records from the API.
94
94
  # Request is executed immediately.
95
95
  # @param [sim.Status] status The status of the Sim resources to read. Can be
96
- # `new`, `active`, `inactive`, or `scheduled`.
96
+ # `new`, `ready`, `active`, `inactive`, or `scheduled`.
97
97
  # @param [String] fleet The SID or unique name of the Fleet to which a list of
98
98
  # Sims are assigned.
99
99
  # @param [String] iccid The
@@ -201,14 +201,29 @@ module Twilio
201
201
  # identifies the resource. It can be used in place of the resource's `sid` in the
202
202
  # URL to address the resource.
203
203
  # @param [sim.StatusUpdate] status The new status of the resource. Can be:
204
- # `active` or `inactive`. See the [Super SIM Status
204
+ # `ready`, `active`, or `inactive`. See the [Super SIM Status
205
205
  # Values](https://www.twilio.com/docs/iot/supersim/api/sim-resource#status-values)
206
206
  # for more info.
207
207
  # @param [String] fleet The SID or unique name of the Fleet to which the SIM
208
208
  # resource should be assigned.
209
+ # @param [String] callback_url The URL we should call using the `callback_method`
210
+ # after an asynchronous update has finished.
211
+ # @param [String] callback_method The HTTP method we should use to call
212
+ # `callback_url`. Can be: `GET` or `POST` and the default is POST.
213
+ # @param [String] account_sid The SID of the Account to which the Sim resource
214
+ # should belong. The Account SID can only be that of the requesting Account or
215
+ # that of a Subaccount of the requesting Account. Only valid when the Sim
216
+ # resource's status is new.
209
217
  # @return [SimInstance] Updated SimInstance
210
- def update(unique_name: :unset, status: :unset, fleet: :unset)
211
- data = Twilio::Values.of({'UniqueName' => unique_name, 'Status' => status, 'Fleet' => fleet, })
218
+ def update(unique_name: :unset, status: :unset, fleet: :unset, callback_url: :unset, callback_method: :unset, account_sid: :unset)
219
+ data = Twilio::Values.of({
220
+ 'UniqueName' => unique_name,
221
+ 'Status' => status,
222
+ 'Fleet' => fleet,
223
+ 'CallbackUrl' => callback_url,
224
+ 'CallbackMethod' => callback_method,
225
+ 'AccountSid' => account_sid,
226
+ })
212
227
 
213
228
  payload = @version.update('POST', @uri, data: data)
214
229
 
@@ -338,14 +353,29 @@ module Twilio
338
353
  # identifies the resource. It can be used in place of the resource's `sid` in the
339
354
  # URL to address the resource.
340
355
  # @param [sim.StatusUpdate] status The new status of the resource. Can be:
341
- # `active` or `inactive`. See the [Super SIM Status
356
+ # `ready`, `active`, or `inactive`. See the [Super SIM Status
342
357
  # Values](https://www.twilio.com/docs/iot/supersim/api/sim-resource#status-values)
343
358
  # for more info.
344
359
  # @param [String] fleet The SID or unique name of the Fleet to which the SIM
345
360
  # resource should be assigned.
361
+ # @param [String] callback_url The URL we should call using the `callback_method`
362
+ # after an asynchronous update has finished.
363
+ # @param [String] callback_method The HTTP method we should use to call
364
+ # `callback_url`. Can be: `GET` or `POST` and the default is POST.
365
+ # @param [String] account_sid The SID of the Account to which the Sim resource
366
+ # should belong. The Account SID can only be that of the requesting Account or
367
+ # that of a Subaccount of the requesting Account. Only valid when the Sim
368
+ # resource's status is new.
346
369
  # @return [SimInstance] Updated SimInstance
347
- def update(unique_name: :unset, status: :unset, fleet: :unset)
348
- context.update(unique_name: unique_name, status: status, fleet: fleet, )
370
+ def update(unique_name: :unset, status: :unset, fleet: :unset, callback_url: :unset, callback_method: :unset, account_sid: :unset)
371
+ context.update(
372
+ unique_name: unique_name,
373
+ status: status,
374
+ fleet: fleet,
375
+ callback_url: callback_url,
376
+ callback_method: callback_method,
377
+ account_sid: account_sid,
378
+ )
349
379
  end
350
380
 
351
381
  ##
@@ -29,8 +29,19 @@ module Twilio
29
29
  # Lists UsageRecordInstance records from the API as a list.
30
30
  # Unlike stream(), this operation is eager and will load `limit` records into
31
31
  # memory before returning.
32
- # @param [String] sim SID of a Sim resource. Only show UsageRecords representing
33
- # usage incurred by this Super SIM.
32
+ # @param [String] sim SID or unique name of a Sim resource. Only show UsageRecords
33
+ # representing usage incurred by this Super SIM.
34
+ # @param [String] fleet SID or unique name of a Fleet resource. Only show
35
+ # UsageRecords representing usage for Super SIMs belonging to this Fleet resource
36
+ # at the time the usage occurred.
37
+ # @param [String] network SID of a Network resource. Only show UsageRecords
38
+ # representing usage on this network.
39
+ # @param [String] iso_country Alpha-2 ISO Country Code. Only show UsageRecords
40
+ # representing usage in this country.
41
+ # @param [usage_record.Group] group Dimension over which to aggregate usage
42
+ # records. Can be: `sim`, `fleet`, `network`, `isoCountry`. Default is to not
43
+ # aggregate across any of these dimensions, UsageRecords will be aggregated into
44
+ # the time buckets described by the `Granularity` parameter.
34
45
  # @param [usage_record.Granularity] granularity Time-based grouping that
35
46
  # UsageRecords should be aggregated by. Can be: `hour`, `day`, or `all`. Default
36
47
  # is `all`. `all` returns one UsageRecord that describes the usage for the entire
@@ -48,9 +59,13 @@ module Twilio
48
59
  # but a limit is defined, stream() will attempt to read the limit with the most
49
60
  # efficient page size, i.e. min(limit, 1000)
50
61
  # @return [Array] Array of up to limit results
51
- def list(sim: :unset, granularity: :unset, start_time: :unset, end_time: :unset, limit: nil, page_size: nil)
62
+ def list(sim: :unset, fleet: :unset, network: :unset, iso_country: :unset, group: :unset, granularity: :unset, start_time: :unset, end_time: :unset, limit: nil, page_size: nil)
52
63
  self.stream(
53
64
  sim: sim,
65
+ fleet: fleet,
66
+ network: network,
67
+ iso_country: iso_country,
68
+ group: group,
54
69
  granularity: granularity,
55
70
  start_time: start_time,
56
71
  end_time: end_time,
@@ -63,8 +78,19 @@ module Twilio
63
78
  # Streams UsageRecordInstance records from the API as an Enumerable.
64
79
  # This operation lazily loads records as efficiently as possible until the limit
65
80
  # is reached.
66
- # @param [String] sim SID of a Sim resource. Only show UsageRecords representing
67
- # usage incurred by this Super SIM.
81
+ # @param [String] sim SID or unique name of a Sim resource. Only show UsageRecords
82
+ # representing usage incurred by this Super SIM.
83
+ # @param [String] fleet SID or unique name of a Fleet resource. Only show
84
+ # UsageRecords representing usage for Super SIMs belonging to this Fleet resource
85
+ # at the time the usage occurred.
86
+ # @param [String] network SID of a Network resource. Only show UsageRecords
87
+ # representing usage on this network.
88
+ # @param [String] iso_country Alpha-2 ISO Country Code. Only show UsageRecords
89
+ # representing usage in this country.
90
+ # @param [usage_record.Group] group Dimension over which to aggregate usage
91
+ # records. Can be: `sim`, `fleet`, `network`, `isoCountry`. Default is to not
92
+ # aggregate across any of these dimensions, UsageRecords will be aggregated into
93
+ # the time buckets described by the `Granularity` parameter.
68
94
  # @param [usage_record.Granularity] granularity Time-based grouping that
69
95
  # UsageRecords should be aggregated by. Can be: `hour`, `day`, or `all`. Default
70
96
  # is `all`. `all` returns one UsageRecord that describes the usage for the entire
@@ -82,11 +108,15 @@ module Twilio
82
108
  # but a limit is defined, stream() will attempt to read the limit with the most
83
109
  # efficient page size, i.e. min(limit, 1000)
84
110
  # @return [Enumerable] Enumerable that will yield up to limit results
85
- def stream(sim: :unset, granularity: :unset, start_time: :unset, end_time: :unset, limit: nil, page_size: nil)
111
+ def stream(sim: :unset, fleet: :unset, network: :unset, iso_country: :unset, group: :unset, granularity: :unset, start_time: :unset, end_time: :unset, limit: nil, page_size: nil)
86
112
  limits = @version.read_limits(limit, page_size)
87
113
 
88
114
  page = self.page(
89
115
  sim: sim,
116
+ fleet: fleet,
117
+ network: network,
118
+ iso_country: iso_country,
119
+ group: group,
90
120
  granularity: granularity,
91
121
  start_time: start_time,
92
122
  end_time: end_time,
@@ -113,8 +143,19 @@ module Twilio
113
143
  ##
114
144
  # Retrieve a single page of UsageRecordInstance records from the API.
115
145
  # Request is executed immediately.
116
- # @param [String] sim SID of a Sim resource. Only show UsageRecords representing
117
- # usage incurred by this Super SIM.
146
+ # @param [String] sim SID or unique name of a Sim resource. Only show UsageRecords
147
+ # representing usage incurred by this Super SIM.
148
+ # @param [String] fleet SID or unique name of a Fleet resource. Only show
149
+ # UsageRecords representing usage for Super SIMs belonging to this Fleet resource
150
+ # at the time the usage occurred.
151
+ # @param [String] network SID of a Network resource. Only show UsageRecords
152
+ # representing usage on this network.
153
+ # @param [String] iso_country Alpha-2 ISO Country Code. Only show UsageRecords
154
+ # representing usage in this country.
155
+ # @param [usage_record.Group] group Dimension over which to aggregate usage
156
+ # records. Can be: `sim`, `fleet`, `network`, `isoCountry`. Default is to not
157
+ # aggregate across any of these dimensions, UsageRecords will be aggregated into
158
+ # the time buckets described by the `Granularity` parameter.
118
159
  # @param [usage_record.Granularity] granularity Time-based grouping that
119
160
  # UsageRecords should be aggregated by. Can be: `hour`, `day`, or `all`. Default
120
161
  # is `all`. `all` returns one UsageRecord that describes the usage for the entire
@@ -129,9 +170,13 @@ module Twilio
129
170
  # @param [Integer] page_number Page Number, this value is simply for client state
130
171
  # @param [Integer] page_size Number of records to return, defaults to 50
131
172
  # @return [Page] Page of UsageRecordInstance
132
- def page(sim: :unset, granularity: :unset, start_time: :unset, end_time: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
173
+ def page(sim: :unset, fleet: :unset, network: :unset, iso_country: :unset, group: :unset, granularity: :unset, start_time: :unset, end_time: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
133
174
  params = Twilio::Values.of({
134
175
  'Sim' => sim,
176
+ 'Fleet' => fleet,
177
+ 'Network' => network,
178
+ 'IsoCountry' => iso_country,
179
+ 'Group' => group,
135
180
  'Granularity' => granularity,
136
181
  'StartTime' => Twilio.serialize_iso8601_datetime(start_time),
137
182
  'EndTime' => Twilio.serialize_iso8601_datetime(end_time),
@@ -211,6 +256,9 @@ module Twilio
211
256
  @properties = {
212
257
  'account_sid' => payload['account_sid'],
213
258
  'sim_sid' => payload['sim_sid'],
259
+ 'network_sid' => payload['network_sid'],
260
+ 'fleet_sid' => payload['fleet_sid'],
261
+ 'iso_country' => payload['iso_country'],
214
262
  'period' => payload['period'],
215
263
  'data_upload' => payload['data_upload'].to_i,
216
264
  'data_download' => payload['data_download'].to_i,
@@ -230,6 +278,24 @@ module Twilio
230
278
  @properties['sim_sid']
231
279
  end
232
280
 
281
+ ##
282
+ # @return [String] SID of the Network resource on which the usage occurred.
283
+ def network_sid
284
+ @properties['network_sid']
285
+ end
286
+
287
+ ##
288
+ # @return [String] SID of the Fleet resource on which the usage occurred.
289
+ def fleet_sid
290
+ @properties['fleet_sid']
291
+ end
292
+
293
+ ##
294
+ # @return [String] Alpha-2 ISO Country Code of the country the usage occurred in.
295
+ def iso_country
296
+ @properties['iso_country']
297
+ end
298
+
233
299
  ##
234
300
  # @return [Hash] The time period for which the usage is reported.
235
301
  def period