twilio-ruby 5.49.0 → 5.50.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22d3f1dbff39d52a6ca1bf1359af11445923587ab7b120eaccc70593fd1f9288
4
- data.tar.gz: 4d2a1250feb5d9fb012310ad8412d773fc4b23ffdca3c60d3b8ce2291c74f576
3
+ metadata.gz: f7085537c4bc32f13dec0386382dcc5d1d06d5e54e8d2cb68d248a14333c5cbc
4
+ data.tar.gz: 4040e5e1656acea416f745a91d6bcd7fe804b0bbc48c00c60c6f81d294420d3a
5
5
  SHA512:
6
- metadata.gz: b067c7548e4cd004d6ae454109a539fd5024a9cc79bcfeb55aa1dcedf3b6a64d273259a6501cf1a466b0916fc8f3b480a8830985dca2c635cc66b36a4c11b320
7
- data.tar.gz: 82c65f7a0ab86731ccb3ec20b3350837f21e646ce67c6a08bcd20df135c0f2252ca745f587d58da08cfb39dd956b873d527027e275acf7315e03864f72f540bf
6
+ metadata.gz: e2385b8246c00836a3628f996c8318bcd4314d8987e2792cc48e084627a2cdf2ad9ff1bc3eff48b762d18d3afda374c58d6f8b70ead78b4951082a528dbf98d0
7
+ data.tar.gz: decfc8a842d6e461c3bcfe4cecf8b810b3d78e0daa396b043102c49930bbc2f40d18394a0174834e2cc0a56b52a176970b3c613ee8b5c1ba13028cf08d19db37
data/CHANGES.md CHANGED
@@ -1,6 +1,34 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2021-03-24] Version 5.50.0
5
+ ---------------------------
6
+ **Api**
7
+ - Added optional parameter `CallToken` for create calls api
8
+ - Add optional property `time_limit` in the call create request.
9
+
10
+ **Bulkexports**
11
+ - adding two new fields with job api queue_position and estimated_completion_time
12
+
13
+ **Events**
14
+ - Add new endpoints to manage subscribed_events in subscriptions
15
+
16
+ **Numbers**
17
+ - Remove feature flags for RegulatoryCompliance endpoints
18
+
19
+ **Supersim**
20
+ - Add SmsCommands resource
21
+ - Add fields `SmsCommandsUrl`, `SmsCommandsMethod` and `SmsCommandsEnabled` to a Fleet resource
22
+
23
+ **Taskrouter**
24
+ - Add `If-Match` Header based on ETag for Task Update
25
+ - Add `ETag` as Response Headers to Tasks and Reservations
26
+
27
+ **Video**
28
+ - Recording rule beta flag **(breaking change)**
29
+ - [Rooms] Add RecordingRules param to Rooms
30
+
31
+
4
32
  [2021-03-15] Version 5.49.0
5
33
  ---------------------------
6
34
  **Library - Fix**
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # twilio-ruby
2
2
 
3
- [![Build Status](https://img.shields.io/travis/twilio/twilio-ruby.svg)][travis]
3
+ [![Build Status](https://img.shields.io/travis/com/twilio/twilio-ruby.svg)][travis]
4
4
  [![Gem Version](https://img.shields.io/gem/v/twilio-ruby.svg)](https://rubygems.org/gems/twilio-ruby)
5
5
  [![Learn with TwilioQuest](https://img.shields.io/static/v1?label=TwilioQuest&message=Learn%20to%20contribute%21&color=F22F46&labelColor=1f243c&style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAASFBMVEUAAAAZGRkcHBwjIyMoKCgAAABgYGBoaGiAgICMjIyzs7PJycnMzMzNzc3UoBfd3d3m5ubqrhfrMEDu7u739/f4vSb/3AD///9tbdyEAAAABXRSTlMAAAAAAMJrBrEAAAKoSURBVHgB7ZrRcuI6EESdyxXGYoNFvMD//+l2bSszRgyUYpFAsXOeiJGmj4NkuWx1Qeh+Ekl9DgEXOBwOx+Px5xyQhDykfgq4wG63MxxaR4ddIkg6Ul3g84vCIcjPBA5gmUMeXESrlukuoK33+33uID8TWeLAdOWsKpJYzwVMB7bOzYSGOciyUlXSn0/ABXTosJ1M1SbypZ4O4MbZuIDMU02PMbauhhHMHXbmebmALIiEbbbbbUrpF1gwE9kFfRNAJaP+FQEXCCTGyJ4ngDrjOFo3jEL5JdqjF/pueR4cCeCGgAtwmuRS6gDwaRiGvu+DMFwSBLTE3+jF8JyuV1okPZ+AC4hDFhCHyHQjdjPHUKFDlHSJkHQXMB3KpSwXNGJPcwwTdZiXlRN0gSp0zpWxNtM0beYE0nRH6QIbO7rawwXaBYz0j78gxjokDuv12gVeUuBD0MDi0OQCLvDaAho4juP1Q/jkAncXqIcCfd+7gAu4QLMACCLxpRsSuQh0igu0C9Svhi7weAGZg50L3IE3cai4IfkNZAC8dfdhsUD3CgKBVC9JE5ABAFzg4QL/taYPAAWrHdYcgfLaIgAXWJ7OV38n1LEF8tt2TH29E+QAoDoO5Ve/LtCQDmKM9kPbvCEBApK+IXzbcSJ0cIGF6e8gpcRhUDogWZ8JnaWjPXc/fNnBBUKRngiHgTUSivSzDRDgHZQOLvBQgf8rRt+VdBUUhwkU6VpJ+xcOwQUqZr+mR0kvBUgv6cB4+37hQAkXqE8PwGisGhJtN4xAHMzrsgvI7rccXqSvKh6jltGlrOHA3Xk1At3LC4QiPdX9/0ndHpGVvTjR4bZA1ypAKgVcwE5vx74ulwIugDt8e/X7JgfkucBMIAr26ndnB4UCLnDOqvteQsHlgX9N4A+c4cW3DXSPbwAAAABJRU5ErkJggg==)](https://twil.io/learn-open-source)
6
6
 
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
34
34
  To install using [Bundler][bundler] grab the latest stable version:
35
35
 
36
36
  ```ruby
37
- gem 'twilio-ruby', '~> 5.49.0'
37
+ gem 'twilio-ruby', '~> 5.50.0'
38
38
  ```
39
39
 
40
40
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
41
41
 
42
42
  ```bash
43
- gem install twilio-ruby -v 5.49.0
43
+ gem install twilio-ruby -v 5.50.0
44
44
  ```
45
45
 
46
46
  To build and install the development branch yourself from the latest source:
@@ -95,6 +95,8 @@ To take advantage of Twilio's [Global Infrastructure](https://www.twilio.com/doc
95
95
  @client.edge = 'sydney'
96
96
  ```
97
97
 
98
+ This will result in the `hostname` transforming from `api.twilio.com` to `api.sydney.au1.twilio.com`.
99
+
98
100
  ### Enable Debug logging
99
101
 
100
102
  In order to enable debug logging, pass in a 'logger' instance to the client with the level set to at least 'DEBUG'
@@ -111,8 +113,6 @@ myLogger.level = Logger::DEBUG
111
113
  @client.logger = myLogger
112
114
  ```
113
115
 
114
- This will result in the `hostname` transforming from `api.twilio.com` to `api.sydney.au1.twilio.com`.
115
-
116
116
  ### Make a Call
117
117
 
118
118
  ```ruby
@@ -248,7 +248,7 @@ If you've instead found a bug in the library or would like new features added, g
248
248
  [bundler]: https://bundler.io
249
249
  [rubygems]: https://rubygems.org
250
250
  [gem]: https://rubygems.org/gems/twilio
251
- [travis]: https://travis-ci.org/twilio/twilio-ruby
251
+ [travis]: https://travis-ci.com/twilio/twilio-ruby
252
252
  [upgrade]: https://github.com/twilio/twilio-ruby/wiki/Ruby-Version-5.x-Upgrade-Guide
253
253
  [issues]: https://github.com/twilio/twilio-ruby/issues
254
254
  [faraday]: https://github.com/lostisland/faraday
@@ -142,10 +142,17 @@ module Twilio
142
142
  # @param [String] call_reason The Reason for the outgoing call. Use it to specify
143
143
  # the purpose of the call that is presented on the called party's phone. (Branded
144
144
  # Calls Beta)
145
+ # @param [String] call_token A token string needed to invoke a forwarded call. A
146
+ # call_token is generated when an incoming call is received on a Twilio number.
147
+ # this field should be populated by the incoming call's call_token to make this
148
+ # outgoing call as a forwarded call of incoming call. A forwarded call should bear
149
+ # the same caller-id of incoming call.
145
150
  # @param [String] recording_track The audio track to record for the call. Can be:
146
151
  # `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the
147
152
  # audio that is received by Twilio. `outbound` records the audio that is generated
148
153
  # from Twilio. `both` records the audio that is received and generated by Twilio.
154
+ # @param [String] time_limit The maximum duration of the call in seconds.
155
+ # Constraints depend on account and configuration.
149
156
  # @param [String] url The absolute URL that returns the TwiML instructions for the
150
157
  # call. We will call this URL using the `method` when the call connects. For more
151
158
  # information, see the {Url
@@ -157,7 +164,7 @@ module Twilio
157
164
  # @param [String] application_sid The SID of the Application resource that will
158
165
  # handle the call, if the call will be handled by an application.
159
166
  # @return [CallInstance] Created CallInstance
160
- def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, recording_track: :unset, url: :unset, twiml: :unset, application_sid: :unset)
167
+ def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, call_token: :unset, recording_track: :unset, time_limit: :unset, url: :unset, twiml: :unset, application_sid: :unset)
161
168
  data = Twilio::Values.of({
162
169
  'To' => to,
163
170
  'From' => from,
@@ -191,7 +198,9 @@ module Twilio
191
198
  'AsyncAmdStatusCallbackMethod' => async_amd_status_callback_method,
192
199
  'Byoc' => byoc,
193
200
  'CallReason' => call_reason,
201
+ 'CallToken' => call_token,
194
202
  'RecordingTrack' => recording_track,
203
+ 'TimeLimit' => time_limit,
195
204
  })
196
205
 
197
206
  payload = @version.create('POST', @uri, data: data)
@@ -202,6 +202,8 @@ module Twilio
202
202
  'email' => payload['email'],
203
203
  'job_sid' => payload['job_sid'],
204
204
  'details' => payload['details'],
205
+ 'job_queue_position' => payload['job_queue_position'],
206
+ 'estimated_completion_time' => payload['estimated_completion_time'],
205
207
  }
206
208
  end
207
209
 
@@ -259,6 +261,18 @@ module Twilio
259
261
  @properties['details']
260
262
  end
261
263
 
264
+ ##
265
+ # @return [String] This is the job position from the 1st in line. Your queue position will never increase. As jobs ahead of yours in the queue are processed, the queue position number will decrease
266
+ def job_queue_position
267
+ @properties['job_queue_position']
268
+ end
269
+
270
+ ##
271
+ # @return [String] this is the time estimated until your job is complete. This is calculated each time you request the job list. The time is calculated based on the current rate of job completion (which may vary) and your job queue position
272
+ def estimated_completion_time
273
+ @properties['estimated_completion_time']
274
+ end
275
+
262
276
  ##
263
277
  # Provide a user friendly representation
264
278
  def to_s
@@ -136,6 +136,8 @@ module Twilio
136
136
  'webhook_method' => payload['webhook_method'],
137
137
  'email' => payload['email'],
138
138
  'url' => payload['url'],
139
+ 'job_queue_position' => payload['job_queue_position'],
140
+ 'estimated_completion_time' => payload['estimated_completion_time'],
139
141
  }
140
142
 
141
143
  # Context
@@ -214,6 +216,18 @@ module Twilio
214
216
  @properties['url']
215
217
  end
216
218
 
219
+ ##
220
+ # @return [String] This is the job position from the 1st in line. Your queue position will never increase. As jobs ahead of yours in the queue are processed, the queue position number will decrease
221
+ def job_queue_position
222
+ @properties['job_queue_position']
223
+ end
224
+
225
+ ##
226
+ # @return [String] this is the time estimated until your job is complete. This is calculated each time you request the job list. The time is calculated based on the current rate of job completion (which may vary) and your job queue position
227
+ def estimated_completion_time
228
+ @properties['estimated_completion_time']
229
+ end
230
+
217
231
  ##
218
232
  # Fetch the JobInstance
219
233
  # @return [JobInstance] Fetched JobInstance
@@ -226,8 +226,14 @@ module Twilio
226
226
  ##
227
227
  # Access the subscribed_events
228
228
  # @return [SubscribedEventList]
229
- # @return [SubscribedEventContext]
230
- def subscribed_events
229
+ # @return [SubscribedEventContext] if type was passed.
230
+ def subscribed_events(type=:unset)
231
+ raise ArgumentError, 'type cannot be nil' if type.nil?
232
+
233
+ if type != :unset
234
+ return SubscribedEventContext.new(@version, @solution[:sid], type, )
235
+ end
236
+
231
237
  unless @subscribed_events
232
238
  @subscribed_events = SubscribedEventList.new(@version, subscription_sid: @solution[:sid], )
233
239
  end
@@ -107,6 +107,19 @@ module Twilio
107
107
  SubscribedEventPage.new(@version, response, @solution)
108
108
  end
109
109
 
110
+ ##
111
+ # Create the SubscribedEventInstance
112
+ # @param [String] type Type of event being subscribed to.
113
+ # @param [String] version The schema version that the subscription should use.
114
+ # @return [SubscribedEventInstance] Created SubscribedEventInstance
115
+ def create(type: nil, version: :unset)
116
+ data = Twilio::Values.of({'Type' => type, 'Version' => version, })
117
+
118
+ payload = @version.create('POST', @uri, data: data)
119
+
120
+ SubscribedEventInstance.new(@version, payload, subscription_sid: @solution[:subscription_sid], )
121
+ end
122
+
110
123
  ##
111
124
  # Provide a user friendly representation
112
125
  def to_s
@@ -145,6 +158,76 @@ module Twilio
145
158
  end
146
159
  end
147
160
 
161
+ ##
162
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
163
+ class SubscribedEventContext < InstanceContext
164
+ ##
165
+ # Initialize the SubscribedEventContext
166
+ # @param [Version] version Version that contains the resource
167
+ # @param [String] subscription_sid The unique SID identifier of the Subscription.
168
+ # @param [String] type Type of event being subscribed to.
169
+ # @return [SubscribedEventContext] SubscribedEventContext
170
+ def initialize(version, subscription_sid, type)
171
+ super(version)
172
+
173
+ # Path Solution
174
+ @solution = {subscription_sid: subscription_sid, type: type, }
175
+ @uri = "/Subscriptions/#{@solution[:subscription_sid]}/SubscribedEvents/#{@solution[:type]}"
176
+ end
177
+
178
+ ##
179
+ # Fetch the SubscribedEventInstance
180
+ # @return [SubscribedEventInstance] Fetched SubscribedEventInstance
181
+ def fetch
182
+ payload = @version.fetch('GET', @uri)
183
+
184
+ SubscribedEventInstance.new(
185
+ @version,
186
+ payload,
187
+ subscription_sid: @solution[:subscription_sid],
188
+ type: @solution[:type],
189
+ )
190
+ end
191
+
192
+ ##
193
+ # Update the SubscribedEventInstance
194
+ # @param [String] version The schema version that the subscription should use.
195
+ # @return [SubscribedEventInstance] Updated SubscribedEventInstance
196
+ def update(version: :unset)
197
+ data = Twilio::Values.of({'Version' => version, })
198
+
199
+ payload = @version.update('POST', @uri, data: data)
200
+
201
+ SubscribedEventInstance.new(
202
+ @version,
203
+ payload,
204
+ subscription_sid: @solution[:subscription_sid],
205
+ type: @solution[:type],
206
+ )
207
+ end
208
+
209
+ ##
210
+ # Delete the SubscribedEventInstance
211
+ # @return [Boolean] true if delete succeeds, false otherwise
212
+ def delete
213
+ @version.delete('DELETE', @uri)
214
+ end
215
+
216
+ ##
217
+ # Provide a user friendly representation
218
+ def to_s
219
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
220
+ "#<Twilio.Events.V1.SubscribedEventContext #{context}>"
221
+ end
222
+
223
+ ##
224
+ # Provide a detailed, user friendly representation
225
+ def inspect
226
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
227
+ "#<Twilio.Events.V1.SubscribedEventContext #{context}>"
228
+ end
229
+ end
230
+
148
231
  ##
149
232
  # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
150
233
  class SubscribedEventInstance < InstanceResource
@@ -153,8 +236,9 @@ module Twilio
153
236
  # @param [Version] version Version that contains the resource
154
237
  # @param [Hash] payload payload that contains response from Twilio
155
238
  # @param [String] subscription_sid The unique SID identifier of the Subscription.
239
+ # @param [String] type Type of event being subscribed to.
156
240
  # @return [SubscribedEventInstance] SubscribedEventInstance
157
- def initialize(version, payload, subscription_sid: nil)
241
+ def initialize(version, payload, subscription_sid: nil, type: nil)
158
242
  super(version)
159
243
 
160
244
  # Marshaled Properties
@@ -165,6 +249,25 @@ module Twilio
165
249
  'subscription_sid' => payload['subscription_sid'],
166
250
  'url' => payload['url'],
167
251
  }
252
+
253
+ # Context
254
+ @instance_context = nil
255
+ @params = {'subscription_sid' => subscription_sid, 'type' => type || @properties['type'], }
256
+ end
257
+
258
+ ##
259
+ # Generate an instance context for the instance, the context is capable of
260
+ # performing various actions. All instance actions are proxied to the context
261
+ # @return [SubscribedEventContext] SubscribedEventContext for this SubscribedEventInstance
262
+ def context
263
+ unless @instance_context
264
+ @instance_context = SubscribedEventContext.new(
265
+ @version,
266
+ @params['subscription_sid'],
267
+ @params['type'],
268
+ )
269
+ end
270
+ @instance_context
168
271
  end
169
272
 
170
273
  ##
@@ -197,16 +300,40 @@ module Twilio
197
300
  @properties['url']
198
301
  end
199
302
 
303
+ ##
304
+ # Fetch the SubscribedEventInstance
305
+ # @return [SubscribedEventInstance] Fetched SubscribedEventInstance
306
+ def fetch
307
+ context.fetch
308
+ end
309
+
310
+ ##
311
+ # Update the SubscribedEventInstance
312
+ # @param [String] version The schema version that the subscription should use.
313
+ # @return [SubscribedEventInstance] Updated SubscribedEventInstance
314
+ def update(version: :unset)
315
+ context.update(version: version, )
316
+ end
317
+
318
+ ##
319
+ # Delete the SubscribedEventInstance
320
+ # @return [Boolean] true if delete succeeds, false otherwise
321
+ def delete
322
+ context.delete
323
+ end
324
+
200
325
  ##
201
326
  # Provide a user friendly representation
202
327
  def to_s
203
- "<Twilio.Events.V1.SubscribedEventInstance>"
328
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
329
+ "<Twilio.Events.V1.SubscribedEventInstance #{values}>"
204
330
  end
205
331
 
206
332
  ##
207
333
  # Provide a detailed, user friendly representation
208
334
  def inspect
209
- "<Twilio.Events.V1.SubscribedEventInstance>"
335
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
336
+ "<Twilio.Events.V1.SubscribedEventInstance #{values}>"
210
337
  end
211
338
  end
212
339
  end
@@ -72,6 +72,15 @@ module Twilio
72
72
  self.v1.sims(sid)
73
73
  end
74
74
 
75
+ ##
76
+ # @param [String] sid The unique string that we created to identify the SMS
77
+ # Command resource.
78
+ # @return [Twilio::REST::Supersim::V1::SmsCommandInstance] if sid was passed.
79
+ # @return [Twilio::REST::Supersim::V1::SmsCommandList]
80
+ def sms_commands(sid=:unset)
81
+ self.v1.sms_commands(sid)
82
+ end
83
+
75
84
  ##
76
85
  # @return [Twilio::REST::Supersim::V1::UsageRecordInstance]
77
86
  def usage_records
@@ -20,6 +20,7 @@ module Twilio
20
20
  @networks = nil
21
21
  @network_access_profiles = nil
22
22
  @sims = nil
23
+ @sms_commands = nil
23
24
  @usage_records = nil
24
25
  end
25
26
 
@@ -98,6 +99,21 @@ module Twilio
98
99
  end
99
100
  end
100
101
 
102
+ ##
103
+ # @param [String] sid The SID of the SMS Command resource to fetch.
104
+ # @return [Twilio::REST::Supersim::V1::SmsCommandContext] if sid was passed.
105
+ # @return [Twilio::REST::Supersim::V1::SmsCommandList]
106
+ def sms_commands(sid=:unset)
107
+ if sid.nil?
108
+ raise ArgumentError, 'sid cannot be nil'
109
+ end
110
+ if sid == :unset
111
+ @sms_commands ||= SmsCommandList.new self
112
+ else
113
+ SmsCommandContext.new(self, sid)
114
+ end
115
+ end
116
+
101
117
  ##
102
118
  # @return [Twilio::REST::Supersim::V1::UsageRecordContext]
103
119
  def usage_records
@@ -49,8 +49,18 @@ module Twilio
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)
@@ -238,13 +251,22 @@ module Twilio
238
251
  # @param [String] commands_method A string representing the HTTP method to use
239
252
  # when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults
240
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`.
241
261
  # @return [FleetInstance] Updated FleetInstance
242
- def update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :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)
243
263
  data = Twilio::Values.of({
244
264
  'UniqueName' => unique_name,
245
265
  'NetworkAccessProfile' => network_access_profile,
246
266
  'CommandsUrl' => commands_url,
247
267
  'CommandsMethod' => commands_method,
268
+ 'SmsCommandsUrl' => sms_commands_url,
269
+ 'SmsCommandsMethod' => sms_commands_method,
248
270
  })
249
271
 
250
272
  payload = @version.update('POST', @uri, data: data)
@@ -293,6 +315,9 @@ module Twilio
293
315
  'commands_enabled' => payload['commands_enabled'],
294
316
  'commands_url' => payload['commands_url'],
295
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'],
296
321
  'network_access_profile_sid' => payload['network_access_profile_sid'],
297
322
  }
298
323
 
@@ -384,6 +409,24 @@ module Twilio
384
409
  @properties['commands_method']
385
410
  end
386
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
+
387
430
  ##
388
431
  # @return [String] The SID of the Network Access Profile of the Fleet
389
432
  def network_access_profile_sid
@@ -412,13 +455,22 @@ module Twilio
412
455
  # @param [String] commands_method A string representing the HTTP method to use
413
456
  # when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults
414
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`.
415
465
  # @return [FleetInstance] Updated FleetInstance
416
- def update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :unset)
466
+ def update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
417
467
  context.update(
418
468
  unique_name: unique_name,
419
469
  network_access_profile: network_access_profile,
420
470
  commands_url: commands_url,
421
471
  commands_method: commands_method,
472
+ sms_commands_url: sms_commands_url,
473
+ sms_commands_method: sms_commands_method,
422
474
  )
423
475
  end
424
476