twilio-ruby 5.61.2 → 5.64.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test-and-deploy.yml +124 -0
  3. data/.rubocop.yml +1 -1
  4. data/.rubocop_todo.yml +84 -21
  5. data/CHANGES.md +99 -0
  6. data/Makefile +3 -6
  7. data/README.md +5 -4
  8. data/lib/rack/twilio_webhook_authentication.rb +25 -1
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +667 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -0
  11. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +19 -5
  12. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +435 -0
  13. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +20 -20
  14. data/lib/twilio-ruby/rest/conversations/v1.rb +17 -0
  15. data/lib/twilio-ruby/rest/conversations.rb +9 -0
  16. data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -77
  17. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +33 -18
  18. data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +474 -0
  19. data/lib/twilio-ruby/rest/insights/v1/conference.rb +512 -0
  20. data/lib/twilio-ruby/rest/insights/v1/setting.rb +215 -0
  21. data/lib/twilio-ruby/rest/insights/v1.rb +23 -0
  22. data/lib/twilio-ruby/rest/insights.rb +14 -0
  23. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +14 -1
  24. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +23 -0
  25. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +80 -0
  26. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +75 -18
  27. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +372 -0
  28. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +71 -30
  29. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +1 -1
  30. data/lib/twilio-ruby/rest/supersim/v1.rb +16 -0
  31. data/lib/twilio-ruby/rest/supersim.rb +9 -0
  32. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +130 -8
  33. data/lib/twilio-ruby/rest/verify/v2/service.rb +8 -2
  34. data/lib/twilio-ruby/rest/verify/v2/template.rb +1 -1
  35. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +89 -21
  36. data/lib/twilio-ruby/rest/verify.rb +2 -2
  37. data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -0
  38. data/lib/twilio-ruby/rest/video/v1/recording.rb +7 -0
  39. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +7 -0
  40. data/lib/twilio-ruby/rest/video/v1/room.rb +30 -5
  41. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +184 -0
  42. data/lib/twilio-ruby/rest/voice/v1.rb +21 -0
  43. data/lib/twilio-ruby/rest/voice.rb +8 -0
  44. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +4 -4
  45. data/lib/twilio-ruby/version.rb +1 -1
  46. data/sonar-project.properties +1 -1
  47. data/twilio-ruby.gemspec +0 -1
  48. metadata +10 -18
  49. data/.github/workflows/deploy.yml +0 -65
  50. data/.github/workflows/test.yml +0 -52
@@ -0,0 +1,372 @@
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 EsimProfileList < ListResource
16
+ ##
17
+ # Initialize the EsimProfileList
18
+ # @param [Version] version Version that contains the resource
19
+ # @return [EsimProfileList] EsimProfileList
20
+ def initialize(version)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {}
25
+ @uri = "/ESimProfiles"
26
+ end
27
+
28
+ ##
29
+ # Create the EsimProfileInstance
30
+ # @param [String] eid Identifier of the eUICC that will claim the eSIM Profile.
31
+ # @param [String] callback_url The URL we should call using the `callback_method`
32
+ # when the status of the eSIM Profile changes. At this stage of the eSIM Profile
33
+ # pilot, the a request to the URL will only be called when the ESimProfile
34
+ # resource changes from `reserving` to `available`.
35
+ # @param [String] callback_method The HTTP method we should use to call
36
+ # `callback_url`. Can be: `GET` or `POST` and the default is POST.
37
+ # @return [EsimProfileInstance] Created EsimProfileInstance
38
+ def create(eid: nil, callback_url: :unset, callback_method: :unset)
39
+ data = Twilio::Values.of({
40
+ 'Eid' => eid,
41
+ 'CallbackUrl' => callback_url,
42
+ 'CallbackMethod' => callback_method,
43
+ })
44
+
45
+ payload = @version.create('POST', @uri, data: data)
46
+
47
+ EsimProfileInstance.new(@version, payload, )
48
+ end
49
+
50
+ ##
51
+ # Lists EsimProfileInstance records from the API as a list.
52
+ # Unlike stream(), this operation is eager and will load `limit` records into
53
+ # memory before returning.
54
+ # @param [String] eid List the eSIM Profiles that have been associated with an
55
+ # EId.
56
+ # @param [String] sim_sid Find the eSIM Profile resource related to a
57
+ # {Sim}[https://www.twilio.com/docs/wireless/api/sim-resource] resource by
58
+ # providing the SIM SID. Will always return an array with either 1 or 0 records.
59
+ # @param [esim_profile.Status] status List the eSIM Profiles that are in a given
60
+ # status.
61
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
62
+ # guarantees to never return more than limit. Default is no limit
63
+ # @param [Integer] page_size Number of records to fetch per request, when
64
+ # not set will use the default value of 50 records. If no page_size is defined
65
+ # but a limit is defined, stream() will attempt to read the limit with the most
66
+ # efficient page size, i.e. min(limit, 1000)
67
+ # @return [Array] Array of up to limit results
68
+ def list(eid: :unset, sim_sid: :unset, status: :unset, limit: nil, page_size: nil)
69
+ self.stream(eid: eid, sim_sid: sim_sid, status: status, limit: limit, page_size: page_size).entries
70
+ end
71
+
72
+ ##
73
+ # Streams EsimProfileInstance records from the API as an Enumerable.
74
+ # This operation lazily loads records as efficiently as possible until the limit
75
+ # is reached.
76
+ # @param [String] eid List the eSIM Profiles that have been associated with an
77
+ # EId.
78
+ # @param [String] sim_sid Find the eSIM Profile resource related to a
79
+ # {Sim}[https://www.twilio.com/docs/wireless/api/sim-resource] resource by
80
+ # providing the SIM SID. Will always return an array with either 1 or 0 records.
81
+ # @param [esim_profile.Status] status List the eSIM Profiles that are in a given
82
+ # status.
83
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
84
+ # guarantees to never return more than limit. Default is no limit.
85
+ # @param [Integer] page_size Number of records to fetch per request, when
86
+ # not set will use the default value of 50 records. If no page_size is defined
87
+ # but a limit is defined, stream() will attempt to read the limit with the most
88
+ # efficient page size, i.e. min(limit, 1000)
89
+ # @return [Enumerable] Enumerable that will yield up to limit results
90
+ def stream(eid: :unset, sim_sid: :unset, status: :unset, limit: nil, page_size: nil)
91
+ limits = @version.read_limits(limit, page_size)
92
+
93
+ page = self.page(eid: eid, sim_sid: sim_sid, status: status, page_size: limits[:page_size], )
94
+
95
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
96
+ end
97
+
98
+ ##
99
+ # When passed a block, yields EsimProfileInstance records from the API.
100
+ # This operation lazily loads records as efficiently as possible until the limit
101
+ # is reached.
102
+ def each
103
+ limits = @version.read_limits
104
+
105
+ page = self.page(page_size: limits[:page_size], )
106
+
107
+ @version.stream(page,
108
+ limit: limits[:limit],
109
+ page_limit: limits[:page_limit]).each {|x| yield x}
110
+ end
111
+
112
+ ##
113
+ # Retrieve a single page of EsimProfileInstance records from the API.
114
+ # Request is executed immediately.
115
+ # @param [String] eid List the eSIM Profiles that have been associated with an
116
+ # EId.
117
+ # @param [String] sim_sid Find the eSIM Profile resource related to a
118
+ # {Sim}[https://www.twilio.com/docs/wireless/api/sim-resource] resource by
119
+ # providing the SIM SID. Will always return an array with either 1 or 0 records.
120
+ # @param [esim_profile.Status] status List the eSIM Profiles that are in a given
121
+ # status.
122
+ # @param [String] page_token PageToken provided by the API
123
+ # @param [Integer] page_number Page Number, this value is simply for client state
124
+ # @param [Integer] page_size Number of records to return, defaults to 50
125
+ # @return [Page] Page of EsimProfileInstance
126
+ def page(eid: :unset, sim_sid: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
127
+ params = Twilio::Values.of({
128
+ 'Eid' => eid,
129
+ 'SimSid' => sim_sid,
130
+ 'Status' => status,
131
+ 'PageToken' => page_token,
132
+ 'Page' => page_number,
133
+ 'PageSize' => page_size,
134
+ })
135
+
136
+ response = @version.page('GET', @uri, params: params)
137
+
138
+ EsimProfilePage.new(@version, response, @solution)
139
+ end
140
+
141
+ ##
142
+ # Retrieve a single page of EsimProfileInstance records from the API.
143
+ # Request is executed immediately.
144
+ # @param [String] target_url API-generated URL for the requested results page
145
+ # @return [Page] Page of EsimProfileInstance
146
+ def get_page(target_url)
147
+ response = @version.domain.request(
148
+ 'GET',
149
+ target_url
150
+ )
151
+ EsimProfilePage.new(@version, response, @solution)
152
+ end
153
+
154
+ ##
155
+ # Provide a user friendly representation
156
+ def to_s
157
+ '#<Twilio.Supersim.V1.EsimProfileList>'
158
+ end
159
+ end
160
+
161
+ ##
162
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
163
+ class EsimProfilePage < Page
164
+ ##
165
+ # Initialize the EsimProfilePage
166
+ # @param [Version] version Version that contains the resource
167
+ # @param [Response] response Response from the API
168
+ # @param [Hash] solution Path solution for the resource
169
+ # @return [EsimProfilePage] EsimProfilePage
170
+ def initialize(version, response, solution)
171
+ super(version, response)
172
+
173
+ # Path Solution
174
+ @solution = solution
175
+ end
176
+
177
+ ##
178
+ # Build an instance of EsimProfileInstance
179
+ # @param [Hash] payload Payload response from the API
180
+ # @return [EsimProfileInstance] EsimProfileInstance
181
+ def get_instance(payload)
182
+ EsimProfileInstance.new(@version, payload, )
183
+ end
184
+
185
+ ##
186
+ # Provide a user friendly representation
187
+ def to_s
188
+ '<Twilio.Supersim.V1.EsimProfilePage>'
189
+ end
190
+ end
191
+
192
+ ##
193
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
194
+ class EsimProfileContext < InstanceContext
195
+ ##
196
+ # Initialize the EsimProfileContext
197
+ # @param [Version] version Version that contains the resource
198
+ # @param [String] sid The SID of the eSIM Profile resource to fetch.
199
+ # @return [EsimProfileContext] EsimProfileContext
200
+ def initialize(version, sid)
201
+ super(version)
202
+
203
+ # Path Solution
204
+ @solution = {sid: sid, }
205
+ @uri = "/ESimProfiles/#{@solution[:sid]}"
206
+ end
207
+
208
+ ##
209
+ # Fetch the EsimProfileInstance
210
+ # @return [EsimProfileInstance] Fetched EsimProfileInstance
211
+ def fetch
212
+ payload = @version.fetch('GET', @uri)
213
+
214
+ EsimProfileInstance.new(@version, payload, sid: @solution[:sid], )
215
+ end
216
+
217
+ ##
218
+ # Provide a user friendly representation
219
+ def to_s
220
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
221
+ "#<Twilio.Supersim.V1.EsimProfileContext #{context}>"
222
+ end
223
+
224
+ ##
225
+ # Provide a detailed, user friendly representation
226
+ def inspect
227
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
228
+ "#<Twilio.Supersim.V1.EsimProfileContext #{context}>"
229
+ end
230
+ end
231
+
232
+ ##
233
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
234
+ class EsimProfileInstance < InstanceResource
235
+ ##
236
+ # Initialize the EsimProfileInstance
237
+ # @param [Version] version Version that contains the resource
238
+ # @param [Hash] payload payload that contains response from Twilio
239
+ # @param [String] sid The SID of the eSIM Profile resource to fetch.
240
+ # @return [EsimProfileInstance] EsimProfileInstance
241
+ def initialize(version, payload, sid: nil)
242
+ super(version)
243
+
244
+ # Marshaled Properties
245
+ @properties = {
246
+ 'sid' => payload['sid'],
247
+ 'account_sid' => payload['account_sid'],
248
+ 'iccid' => payload['iccid'],
249
+ 'sim_sid' => payload['sim_sid'],
250
+ 'status' => payload['status'],
251
+ 'eid' => payload['eid'],
252
+ 'smdp_plus_address' => payload['smdp_plus_address'],
253
+ 'error_code' => payload['error_code'],
254
+ 'error_message' => payload['error_message'],
255
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
256
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
257
+ 'url' => payload['url'],
258
+ }
259
+
260
+ # Context
261
+ @instance_context = nil
262
+ @params = {'sid' => sid || @properties['sid'], }
263
+ end
264
+
265
+ ##
266
+ # Generate an instance context for the instance, the context is capable of
267
+ # performing various actions. All instance actions are proxied to the context
268
+ # @return [EsimProfileContext] EsimProfileContext for this EsimProfileInstance
269
+ def context
270
+ unless @instance_context
271
+ @instance_context = EsimProfileContext.new(@version, @params['sid'], )
272
+ end
273
+ @instance_context
274
+ end
275
+
276
+ ##
277
+ # @return [String] The unique string that identifies the resource
278
+ def sid
279
+ @properties['sid']
280
+ end
281
+
282
+ ##
283
+ # @return [String] The SID of the Account to which the eSIM Profile resource belongs
284
+ def account_sid
285
+ @properties['account_sid']
286
+ end
287
+
288
+ ##
289
+ # @return [String] The ICCID associated with the Sim resource
290
+ def iccid
291
+ @properties['iccid']
292
+ end
293
+
294
+ ##
295
+ # @return [String] The SID of the Sim resource that this eSIM Profile controls
296
+ def sim_sid
297
+ @properties['sim_sid']
298
+ end
299
+
300
+ ##
301
+ # @return [esim_profile.Status] The status of the eSIM Profile
302
+ def status
303
+ @properties['status']
304
+ end
305
+
306
+ ##
307
+ # @return [String] Identifier of the eUICC that can claim the eSIM Profile
308
+ def eid
309
+ @properties['eid']
310
+ end
311
+
312
+ ##
313
+ # @return [String] Address of the SM-DP+ server from which the Profile will be downloaded
314
+ def smdp_plus_address
315
+ @properties['smdp_plus_address']
316
+ end
317
+
318
+ ##
319
+ # @return [String] Code indicating the failure if the download of the SIM Profile failed and the eSIM Profile is in `failed` state
320
+ def error_code
321
+ @properties['error_code']
322
+ end
323
+
324
+ ##
325
+ # @return [String] Error message describing the failure if the download of the SIM Profile failed and the eSIM Profile is in `failed` state
326
+ def error_message
327
+ @properties['error_message']
328
+ end
329
+
330
+ ##
331
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was created
332
+ def date_created
333
+ @properties['date_created']
334
+ end
335
+
336
+ ##
337
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
338
+ def date_updated
339
+ @properties['date_updated']
340
+ end
341
+
342
+ ##
343
+ # @return [String] The absolute URL of the eSIM Profile resource
344
+ def url
345
+ @properties['url']
346
+ end
347
+
348
+ ##
349
+ # Fetch the EsimProfileInstance
350
+ # @return [EsimProfileInstance] Fetched EsimProfileInstance
351
+ def fetch
352
+ context.fetch
353
+ end
354
+
355
+ ##
356
+ # Provide a user friendly representation
357
+ def to_s
358
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
359
+ "<Twilio.Supersim.V1.EsimProfileInstance #{values}>"
360
+ end
361
+
362
+ ##
363
+ # Provide a detailed, user friendly representation
364
+ def inspect
365
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
366
+ "<Twilio.Supersim.V1.EsimProfileInstance #{values}>"
367
+ end
368
+ end
369
+ end
370
+ end
371
+ end
372
+ end
@@ -39,16 +39,23 @@ module Twilio
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
41
  # 2TB (2,000,000). Defaults to 1GB (1,000).
42
- # @param [Boolean] commands_enabled Defines whether SIMs in the Fleet are capable
43
- # of sending and receiving machine-to-machine SMS via Commands. Defaults to
44
- # `true`.
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
- # @param [String] commands_method A string representing the HTTP method to use
50
- # when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults
51
- # to `POST`.
42
+ # @param [Boolean] commands_enabled Deprecated. Use `sms_commands_enabled`
43
+ # instead. Defines whether SIMs in the Fleet are capable of sending and receiving
44
+ # machine-to-machine SMS via Commands. Defaults to `true`.
45
+ # @param [String] commands_url Deprecated. Use `sms_commands_url` instead. The URL
46
+ # that will receive a webhook when a Super SIM in the Fleet is used to send an SMS
47
+ # from your device to the Commands number. Your server should respond with an HTTP
48
+ # status code in the 200 range; any response body will be ignored.
49
+ # @param [String] commands_method Deprecated. Use `sms_commands_method` instead. A
50
+ # string representing the HTTP method to use when making a request to
51
+ # `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`.
52
+ # @param [String] ip_commands_url The URL that will receive a webhook when a Super
53
+ # SIM in the Fleet is used to send an IP Command from your device to a special IP
54
+ # address. Your server should respond with an HTTP status code in the 200 range;
55
+ # any response body will be ignored.
56
+ # @param [String] ip_commands_method A string representing the HTTP method to use
57
+ # when making a request to `ip_commands_url`. Can be one of `POST` or `GET`.
58
+ # Defaults to `POST`.
52
59
  # @param [Boolean] sms_commands_enabled Defines whether SIMs in the Fleet are
53
60
  # capable of sending and receiving machine-to-machine SMS via Commands. Defaults
54
61
  # to `true`.
@@ -60,7 +67,7 @@ module Twilio
60
67
  # when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
61
68
  # Defaults to `POST`.
62
69
  # @return [FleetInstance] Created FleetInstance
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)
70
+ def create(network_access_profile: nil, unique_name: :unset, data_enabled: :unset, data_limit: :unset, commands_enabled: :unset, commands_url: :unset, commands_method: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_enabled: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
64
71
  data = Twilio::Values.of({
65
72
  'NetworkAccessProfile' => network_access_profile,
66
73
  'UniqueName' => unique_name,
@@ -69,6 +76,8 @@ module Twilio
69
76
  'CommandsEnabled' => commands_enabled,
70
77
  'CommandsUrl' => commands_url,
71
78
  'CommandsMethod' => commands_method,
79
+ 'IpCommandsUrl' => ip_commands_url,
80
+ 'IpCommandsMethod' => ip_commands_method,
72
81
  'SmsCommandsEnabled' => sms_commands_enabled,
73
82
  'SmsCommandsUrl' => sms_commands_url,
74
83
  'SmsCommandsMethod' => sms_commands_method,
@@ -244,13 +253,20 @@ module Twilio
244
253
  # @param [String] network_access_profile The SID or unique name of the Network
245
254
  # Access Profile that will control which cellular networks the Fleet's SIMs can
246
255
  # 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`.
256
+ # @param [String] commands_url Deprecated. Use `sms_commands_url` instead. The URL
257
+ # that will receive a webhook when a Super SIM in the Fleet is used to send an SMS
258
+ # from your device to the Commands number. Your server should respond with an HTTP
259
+ # status code in the 200 range; any response body will be ignored.
260
+ # @param [String] commands_method Deprecated. Use `sms_commands_method` instead. A
261
+ # string representing the HTTP method to use when making a request to
262
+ # `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`.
263
+ # @param [String] ip_commands_url The URL that will receive a webhook when a Super
264
+ # SIM in the Fleet is used to send an IP Command from your device to a special IP
265
+ # address. Your server should respond with an HTTP status code in the 200 range;
266
+ # any response body will be ignored.
267
+ # @param [String] ip_commands_method A string representing the HTTP method to use
268
+ # when making a request to `ip_commands_url`. Can be one of `POST` or `GET`.
269
+ # Defaults to `POST`.
254
270
  # @param [String] sms_commands_url The URL that will receive a webhook when a
255
271
  # Super SIM in the Fleet is used to send an SMS from your device to the SMS
256
272
  # Commands number. Your server should respond with an HTTP status code in the 200
@@ -259,12 +275,14 @@ module Twilio
259
275
  # when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
260
276
  # Defaults to `POST`.
261
277
  # @return [FleetInstance] Updated FleetInstance
262
- def update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
278
+ def update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
263
279
  data = Twilio::Values.of({
264
280
  'UniqueName' => unique_name,
265
281
  'NetworkAccessProfile' => network_access_profile,
266
282
  'CommandsUrl' => commands_url,
267
283
  'CommandsMethod' => commands_method,
284
+ 'IpCommandsUrl' => ip_commands_url,
285
+ 'IpCommandsMethod' => ip_commands_method,
268
286
  'SmsCommandsUrl' => sms_commands_url,
269
287
  'SmsCommandsMethod' => sms_commands_method,
270
288
  })
@@ -319,6 +337,8 @@ module Twilio
319
337
  'sms_commands_url' => payload['sms_commands_url'],
320
338
  'sms_commands_method' => payload['sms_commands_method'],
321
339
  'network_access_profile_sid' => payload['network_access_profile_sid'],
340
+ 'ip_commands_url' => payload['ip_commands_url'],
341
+ 'ip_commands_method' => payload['ip_commands_method'],
322
342
  }
323
343
 
324
344
  # Context
@@ -392,19 +412,19 @@ module Twilio
392
412
  end
393
413
 
394
414
  ##
395
- # @return [Boolean] Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands
415
+ # @return [Boolean] Deprecated
396
416
  def commands_enabled
397
417
  @properties['commands_enabled']
398
418
  end
399
419
 
400
420
  ##
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
421
+ # @return [String] Deprecated
402
422
  def commands_url
403
423
  @properties['commands_url']
404
424
  end
405
425
 
406
426
  ##
407
- # @return [String] A string representing the HTTP method to use when making a request to `commands_url`
427
+ # @return [String] Deprecated
408
428
  def commands_method
409
429
  @properties['commands_method']
410
430
  end
@@ -433,6 +453,18 @@ module Twilio
433
453
  @properties['network_access_profile_sid']
434
454
  end
435
455
 
456
+ ##
457
+ # @return [String] The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device
458
+ def ip_commands_url
459
+ @properties['ip_commands_url']
460
+ end
461
+
462
+ ##
463
+ # @return [String] A string representing the HTTP method to use when making a request to `ip_commands_url`
464
+ def ip_commands_method
465
+ @properties['ip_commands_method']
466
+ end
467
+
436
468
  ##
437
469
  # Fetch the FleetInstance
438
470
  # @return [FleetInstance] Fetched FleetInstance
@@ -448,13 +480,20 @@ module Twilio
448
480
  # @param [String] network_access_profile The SID or unique name of the Network
449
481
  # Access Profile that will control which cellular networks the Fleet's SIMs can
450
482
  # 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`.
483
+ # @param [String] commands_url Deprecated. Use `sms_commands_url` instead. The URL
484
+ # that will receive a webhook when a Super SIM in the Fleet is used to send an SMS
485
+ # from your device to the Commands number. Your server should respond with an HTTP
486
+ # status code in the 200 range; any response body will be ignored.
487
+ # @param [String] commands_method Deprecated. Use `sms_commands_method` instead. A
488
+ # string representing the HTTP method to use when making a request to
489
+ # `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`.
490
+ # @param [String] ip_commands_url The URL that will receive a webhook when a Super
491
+ # SIM in the Fleet is used to send an IP Command from your device to a special IP
492
+ # address. Your server should respond with an HTTP status code in the 200 range;
493
+ # any response body will be ignored.
494
+ # @param [String] ip_commands_method A string representing the HTTP method to use
495
+ # when making a request to `ip_commands_url`. Can be one of `POST` or `GET`.
496
+ # Defaults to `POST`.
458
497
  # @param [String] sms_commands_url The URL that will receive a webhook when a
459
498
  # Super SIM in the Fleet is used to send an SMS from your device to the SMS
460
499
  # Commands number. Your server should respond with an HTTP status code in the 200
@@ -463,12 +502,14 @@ module Twilio
463
502
  # when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
464
503
  # Defaults to `POST`.
465
504
  # @return [FleetInstance] Updated FleetInstance
466
- def update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
505
+ def update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
467
506
  context.update(
468
507
  unique_name: unique_name,
469
508
  network_access_profile: network_access_profile,
470
509
  commands_url: commands_url,
471
510
  commands_method: commands_method,
511
+ ip_commands_url: ip_commands_url,
512
+ ip_commands_method: ip_commands_method,
472
513
  sms_commands_url: sms_commands_url,
473
514
  sms_commands_method: sms_commands_method,
474
515
  )
@@ -28,7 +28,7 @@ module Twilio
28
28
  ##
29
29
  # Create the SmsCommandInstance
30
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
31
+ # {SIM}[https://www.twilio.com/docs/iot/supersim/api/sim-resource] to send the SMS
32
32
  # Command to.
33
33
  # @param [String] payload The message body of the SMS Command.
34
34
  # @param [String] callback_method The HTTP method we should use to call
@@ -16,6 +16,7 @@ module Twilio
16
16
  super
17
17
  @version = 'v1'
18
18
  @commands = nil
19
+ @esim_profiles = nil
19
20
  @fleets = nil
20
21
  @ip_commands = nil
21
22
  @networks = nil
@@ -40,6 +41,21 @@ module Twilio
40
41
  end
41
42
  end
42
43
 
44
+ ##
45
+ # @param [String] sid The SID of the eSIM Profile resource to fetch.
46
+ # @return [Twilio::REST::Supersim::V1::EsimProfileContext] if sid was passed.
47
+ # @return [Twilio::REST::Supersim::V1::EsimProfileList]
48
+ def esim_profiles(sid=:unset)
49
+ if sid.nil?
50
+ raise ArgumentError, 'sid cannot be nil'
51
+ end
52
+ if sid == :unset
53
+ @esim_profiles ||= EsimProfileList.new self
54
+ else
55
+ EsimProfileContext.new(self, sid)
56
+ end
57
+ end
58
+
43
59
  ##
44
60
  # @param [String] sid The SID of the Fleet resource to fetch.
45
61
  # @return [Twilio::REST::Supersim::V1::FleetContext] if sid was passed.
@@ -37,6 +37,15 @@ module Twilio
37
37
  self.v1.commands(sid)
38
38
  end
39
39
 
40
+ ##
41
+ # @param [String] sid The unique string that we created to identify the eSIM
42
+ # Profile resource.
43
+ # @return [Twilio::REST::Supersim::V1::EsimProfileInstance] if sid was passed.
44
+ # @return [Twilio::REST::Supersim::V1::EsimProfileList]
45
+ def esim_profiles(sid=:unset)
46
+ self.v1.esim_profiles(sid)
47
+ end
48
+
40
49
  ##
41
50
  # @param [String] sid The unique string that we created to identify the Fleet
42
51
  # resource.