twilio-ruby 5.32.0 → 5.33.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +26 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/jwt/task_router.rb +2 -2
  5. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +22 -3
  6. data/lib/twilio-ruby/rest/authy/v1/service.rb +14 -5
  7. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb +89 -0
  8. data/lib/twilio-ruby/rest/bulkexports.rb +54 -0
  9. data/lib/twilio-ruby/rest/bulkexports/v1.rb +58 -0
  10. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +254 -0
  11. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +316 -0
  12. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +298 -0
  13. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +253 -0
  14. data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +242 -0
  15. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
  16. data/lib/twilio-ruby/rest/client.rb +7 -0
  17. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
  18. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
  19. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +1 -1
  20. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +30 -0
  21. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +247 -0
  22. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +5 -5
  23. data/lib/twilio-ruby/version.rb +1 -1
  24. data/spec/integration/api/v2010/account/sip/domain_spec.rb +8 -4
  25. data/spec/integration/authy/v1/service/entity/factor/challenge_spec.rb +91 -0
  26. data/spec/integration/bulkexports/v1/export/day_spec.rb +117 -0
  27. data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +129 -0
  28. data/spec/integration/bulkexports/v1/export/job_spec.rb +80 -0
  29. data/spec/integration/bulkexports/v1/export_configuration_spec.rb +79 -0
  30. data/spec/integration/bulkexports/v1/export_spec.rb +45 -0
  31. data/spec/integration/flex_api/v1/configuration_spec.rb +150 -0
  32. data/spec/integration/serverless/v1/service/environment/deployment_spec.rb +3 -4
  33. data/spec/integration/serverless/v1/service/function/function_version/function_version_content_spec.rb +52 -0
  34. data/spec/integration/serverless/v1/service/function/function_version_spec.rb +4 -1
  35. metadata +22 -2
@@ -386,7 +386,7 @@ module Twilio
386
386
  end
387
387
 
388
388
  ##
389
- # @return [String] The SID of the assigned to the user
389
+ # @return [String] The SID of the Role assigned to the user
390
390
  def role_sid
391
391
  @properties['role_sid']
392
392
  end
@@ -53,6 +53,7 @@ module Twilio
53
53
  @voice = nil
54
54
  @wireless = nil
55
55
  @supersim = nil
56
+ @bulkexports = nil
56
57
  end
57
58
 
58
59
  ##
@@ -271,6 +272,12 @@ module Twilio
271
272
  @supersim ||= Supersim.new self
272
273
  end
273
274
 
275
+ ##
276
+ # Access the Bulkexports Twilio Domain
277
+ def bulkexports
278
+ @bulkexports ||= Bulkexports.new self
279
+ end
280
+
274
281
  ##
275
282
  # @param [String] sid The unique string that that we created to identify the
276
283
  # Address resource.
@@ -179,6 +179,8 @@ module Twilio
179
179
  'integrations' => payload['integrations'],
180
180
  'outbound_call_flows' => payload['outbound_call_flows'],
181
181
  'serverless_service_sids' => payload['serverless_service_sids'],
182
+ 'wfm_integrations' => payload['wfm_integrations'],
183
+ 'queue_stats_configuration' => payload['queue_stats_configuration'],
182
184
  'url' => payload['url'],
183
185
  }
184
186
 
@@ -402,6 +404,18 @@ module Twilio
402
404
  @properties['serverless_service_sids']
403
405
  end
404
406
 
407
+ ##
408
+ # @return [Hash] A list of objects that contain the configurations for the WFM Integrations supported in this configuration
409
+ def wfm_integrations
410
+ @properties['wfm_integrations']
411
+ end
412
+
413
+ ##
414
+ # @return [Hash] Configurable parameters for Queues Statistics
415
+ def queue_stats_configuration
416
+ @properties['queue_stats_configuration']
417
+ end
418
+
405
419
  ##
406
420
  # @return [String] The absolute URL of the Configuration resource
407
421
  def url
@@ -386,7 +386,7 @@ module Twilio
386
386
  end
387
387
 
388
388
  ##
389
- # @return [String] The SID of the assigned to the user
389
+ # @return [String] The SID of the Role assigned to the user
390
390
  def role_sid
391
391
  @properties['role_sid']
392
392
  end
@@ -117,7 +117,7 @@ module Twilio
117
117
  # Request is executed immediately.
118
118
  # @param [String] build_sid The SID of the build for the deployment.
119
119
  # @return [DeploymentInstance] Newly created DeploymentInstance
120
- def create(build_sid: nil)
120
+ def create(build_sid: :unset)
121
121
  data = Twilio::Values.of({'BuildSid' => build_sid, })
122
122
 
123
123
  payload = @version.create(
@@ -174,6 +174,9 @@ module Twilio
174
174
  # Path Solution
175
175
  @solution = {service_sid: service_sid, function_sid: function_sid, sid: sid, }
176
176
  @uri = "/Services/#{@solution[:service_sid]}/Functions/#{@solution[:function_sid]}/Versions/#{@solution[:sid]}"
177
+
178
+ # Dependents
179
+ @function_version_content = nil
177
180
  end
178
181
 
179
182
  ##
@@ -197,6 +200,19 @@ module Twilio
197
200
  )
198
201
  end
199
202
 
203
+ ##
204
+ # Access the function_version_content
205
+ # @return [FunctionVersionContentList]
206
+ # @return [FunctionVersionContentContext]
207
+ def function_version_content
208
+ FunctionVersionContentContext.new(
209
+ @version,
210
+ @solution[:service_sid],
211
+ @solution[:function_sid],
212
+ @solution[:sid],
213
+ )
214
+ end
215
+
200
216
  ##
201
217
  # Provide a user friendly representation
202
218
  def to_s
@@ -238,6 +254,7 @@ module Twilio
238
254
  'visibility' => payload['visibility'],
239
255
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
240
256
  'url' => payload['url'],
257
+ 'links' => payload['links'],
241
258
  }
242
259
 
243
260
  # Context
@@ -313,6 +330,12 @@ module Twilio
313
330
  @properties['url']
314
331
  end
315
332
 
333
+ ##
334
+ # @return [String] The links
335
+ def links
336
+ @properties['links']
337
+ end
338
+
316
339
  ##
317
340
  # Fetch a FunctionVersionInstance
318
341
  # @return [FunctionVersionInstance] Fetched FunctionVersionInstance
@@ -320,6 +343,13 @@ module Twilio
320
343
  context.fetch
321
344
  end
322
345
 
346
+ ##
347
+ # Access the function_version_content
348
+ # @return [function_version_content] function_version_content
349
+ def function_version_content
350
+ context.function_version_content
351
+ end
352
+
323
353
  ##
324
354
  # Provide a user friendly representation
325
355
  def to_s
@@ -0,0 +1,247 @@
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 Serverless < Domain
12
+ class V1 < Version
13
+ class ServiceContext < InstanceContext
14
+ class FunctionContext < InstanceContext
15
+ class FunctionVersionContext < InstanceContext
16
+ ##
17
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
18
+ class FunctionVersionContentList < ListResource
19
+ ##
20
+ # Initialize the FunctionVersionContentList
21
+ # @param [Version] version Version that contains the resource
22
+ # @param [String] service_sid The SID of the Service that the Function Version
23
+ # resource is associated with.
24
+ # @param [String] function_sid The SID of the Function that is the parent of the
25
+ # Function Version.
26
+ # @param [String] sid The unique string that we created to identify the Function
27
+ # Version resource.
28
+ # @return [FunctionVersionContentList] FunctionVersionContentList
29
+ def initialize(version, service_sid: nil, function_sid: nil, sid: nil)
30
+ super(version)
31
+
32
+ # Path Solution
33
+ @solution = {service_sid: service_sid, function_sid: function_sid, sid: sid}
34
+ end
35
+
36
+ ##
37
+ # Provide a user friendly representation
38
+ def to_s
39
+ '#<Twilio.Serverless.V1.FunctionVersionContentList>'
40
+ end
41
+ end
42
+
43
+ ##
44
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
45
+ class FunctionVersionContentPage < Page
46
+ ##
47
+ # Initialize the FunctionVersionContentPage
48
+ # @param [Version] version Version that contains the resource
49
+ # @param [Response] response Response from the API
50
+ # @param [Hash] solution Path solution for the resource
51
+ # @return [FunctionVersionContentPage] FunctionVersionContentPage
52
+ def initialize(version, response, solution)
53
+ super(version, response)
54
+
55
+ # Path Solution
56
+ @solution = solution
57
+ end
58
+
59
+ ##
60
+ # Build an instance of FunctionVersionContentInstance
61
+ # @param [Hash] payload Payload response from the API
62
+ # @return [FunctionVersionContentInstance] FunctionVersionContentInstance
63
+ def get_instance(payload)
64
+ FunctionVersionContentInstance.new(
65
+ @version,
66
+ payload,
67
+ service_sid: @solution[:service_sid],
68
+ function_sid: @solution[:function_sid],
69
+ sid: @solution[:sid],
70
+ )
71
+ end
72
+
73
+ ##
74
+ # Provide a user friendly representation
75
+ def to_s
76
+ '<Twilio.Serverless.V1.FunctionVersionContentPage>'
77
+ end
78
+ end
79
+
80
+ ##
81
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
82
+ class FunctionVersionContentContext < InstanceContext
83
+ ##
84
+ # Initialize the FunctionVersionContentContext
85
+ # @param [Version] version Version that contains the resource
86
+ # @param [String] service_sid The SID of the Service to fetch the Function Version
87
+ # content from.
88
+ # @param [String] function_sid The SID of the function that is the parent of the
89
+ # Function Version content to fetch.
90
+ # @param [String] sid The SID of the Function Version content to fetch.
91
+ # @return [FunctionVersionContentContext] FunctionVersionContentContext
92
+ def initialize(version, service_sid, function_sid, sid)
93
+ super(version)
94
+
95
+ # Path Solution
96
+ @solution = {service_sid: service_sid, function_sid: function_sid, sid: sid, }
97
+ @uri = "/Services/#{@solution[:service_sid]}/Functions/#{@solution[:function_sid]}/Versions/#{@solution[:sid]}/Content"
98
+ end
99
+
100
+ ##
101
+ # Fetch a FunctionVersionContentInstance
102
+ # @return [FunctionVersionContentInstance] Fetched FunctionVersionContentInstance
103
+ def fetch
104
+ params = Twilio::Values.of({})
105
+
106
+ payload = @version.fetch(
107
+ 'GET',
108
+ @uri,
109
+ params,
110
+ )
111
+
112
+ FunctionVersionContentInstance.new(
113
+ @version,
114
+ payload,
115
+ service_sid: @solution[:service_sid],
116
+ function_sid: @solution[:function_sid],
117
+ sid: @solution[:sid],
118
+ )
119
+ end
120
+
121
+ ##
122
+ # Provide a user friendly representation
123
+ def to_s
124
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
125
+ "#<Twilio.Serverless.V1.FunctionVersionContentContext #{context}>"
126
+ end
127
+
128
+ ##
129
+ # Provide a detailed, user friendly representation
130
+ def inspect
131
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
132
+ "#<Twilio.Serverless.V1.FunctionVersionContentContext #{context}>"
133
+ end
134
+ end
135
+
136
+ ##
137
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
138
+ class FunctionVersionContentInstance < InstanceResource
139
+ ##
140
+ # Initialize the FunctionVersionContentInstance
141
+ # @param [Version] version Version that contains the resource
142
+ # @param [Hash] payload payload that contains response from Twilio
143
+ # @param [String] service_sid The SID of the Service that the Function Version
144
+ # resource is associated with.
145
+ # @param [String] function_sid The SID of the Function that is the parent of the
146
+ # Function Version.
147
+ # @param [String] sid The unique string that we created to identify the Function
148
+ # Version resource.
149
+ # @return [FunctionVersionContentInstance] FunctionVersionContentInstance
150
+ def initialize(version, payload, service_sid: nil, function_sid: nil, sid: nil)
151
+ super(version)
152
+
153
+ # Marshaled Properties
154
+ @properties = {
155
+ 'sid' => payload['sid'],
156
+ 'account_sid' => payload['account_sid'],
157
+ 'service_sid' => payload['service_sid'],
158
+ 'function_sid' => payload['function_sid'],
159
+ 'content' => payload['content'],
160
+ 'url' => payload['url'],
161
+ }
162
+
163
+ # Context
164
+ @instance_context = nil
165
+ @params = {'service_sid' => service_sid, 'function_sid' => function_sid, 'sid' => sid, }
166
+ end
167
+
168
+ ##
169
+ # Generate an instance context for the instance, the context is capable of
170
+ # performing various actions. All instance actions are proxied to the context
171
+ # @return [FunctionVersionContentContext] FunctionVersionContentContext for this FunctionVersionContentInstance
172
+ def context
173
+ unless @instance_context
174
+ @instance_context = FunctionVersionContentContext.new(
175
+ @version,
176
+ @params['service_sid'],
177
+ @params['function_sid'],
178
+ @params['sid'],
179
+ )
180
+ end
181
+ @instance_context
182
+ end
183
+
184
+ ##
185
+ # @return [String] The unique string that identifies the Function Version resource
186
+ def sid
187
+ @properties['sid']
188
+ end
189
+
190
+ ##
191
+ # @return [String] The SID of the Account that created the Function Version resource
192
+ def account_sid
193
+ @properties['account_sid']
194
+ end
195
+
196
+ ##
197
+ # @return [String] The SID of the Service that the Function Version resource is associated with
198
+ def service_sid
199
+ @properties['service_sid']
200
+ end
201
+
202
+ ##
203
+ # @return [String] The SID of the Function that is the parent of the Function Version
204
+ def function_sid
205
+ @properties['function_sid']
206
+ end
207
+
208
+ ##
209
+ # @return [String] The content of the Function Version resource
210
+ def content
211
+ @properties['content']
212
+ end
213
+
214
+ ##
215
+ # @return [String] The url
216
+ def url
217
+ @properties['url']
218
+ end
219
+
220
+ ##
221
+ # Fetch a FunctionVersionContentInstance
222
+ # @return [FunctionVersionContentInstance] Fetched FunctionVersionContentInstance
223
+ def fetch
224
+ context.fetch
225
+ end
226
+
227
+ ##
228
+ # Provide a user friendly representation
229
+ def to_s
230
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
231
+ "<Twilio.Serverless.V1.FunctionVersionContentInstance #{values}>"
232
+ end
233
+
234
+ ##
235
+ # Provide a detailed, user friendly representation
236
+ def inspect
237
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
238
+ "<Twilio.Serverless.V1.FunctionVersionContentInstance #{values}>"
239
+ end
240
+ end
241
+ end
242
+ end
243
+ end
244
+ end
245
+ end
246
+ end
247
+ end
@@ -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`, `deactivated`, `inactive`, or `scheduled`.
33
+ # `new`, `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`, `deactivated`, `inactive`, or `scheduled`.
56
+ # `new`, `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`, `deactivated`, `inactive`, or `scheduled`.
96
+ # `new`, `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
@@ -209,7 +209,7 @@ module Twilio
209
209
  # identifies the resource. It can be used in place of the resource's `sid` in the
210
210
  # URL to address the resource.
211
211
  # @param [sim.StatusUpdate] status The new status of the resource. Can be:
212
- # `active`, `deactivated`, or `inactive`. See the [Super SIM Status
212
+ # `active` or `inactive`. See the [Super SIM Status
213
213
  # Values](https://www.twilio.com/docs/iot/supersim/api/sim-resource#status-values)
214
214
  # for more info.
215
215
  # @param [String] fleet The SID or unique name of the Fleet to which the SIM
@@ -350,7 +350,7 @@ module Twilio
350
350
  # identifies the resource. It can be used in place of the resource's `sid` in the
351
351
  # URL to address the resource.
352
352
  # @param [sim.StatusUpdate] status The new status of the resource. Can be:
353
- # `active`, `deactivated`, or `inactive`. See the [Super SIM Status
353
+ # `active` or `inactive`. See the [Super SIM Status
354
354
  # Values](https://www.twilio.com/docs/iot/supersim/api/sim-resource#status-values)
355
355
  # for more info.
356
356
  # @param [String] fleet The SID or unique name of the Fleet to which the SIM
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.32.0'
2
+ VERSION = '5.33.0'
3
3
  end
@@ -53,7 +53,8 @@ describe 'Domain' do
53
53
  "voice_status_callback_method": "POST",
54
54
  "voice_status_callback_url": null,
55
55
  "voice_url": "https://dundermifflin.example.com/twilio/app.php",
56
- "emergency_calling_enabled": true
56
+ "emergency_calling_enabled": true,
57
+ "secure": true
57
58
  }
58
59
  ],
59
60
  "start": 0,
@@ -143,7 +144,8 @@ describe 'Domain' do
143
144
  "voice_status_callback_method": "POST",
144
145
  "voice_status_callback_url": null,
145
146
  "voice_url": "https://dundermifflin.example.com/twilio/app.php",
146
- "emergency_calling_enabled": true
147
+ "emergency_calling_enabled": true,
148
+ "secure": true
147
149
  }
148
150
  ]
149
151
  ))
@@ -197,7 +199,8 @@ describe 'Domain' do
197
199
  "voice_status_callback_method": "POST",
198
200
  "voice_status_callback_url": null,
199
201
  "voice_url": "https://dundermifflin.example.com/twilio/app.php",
200
- "emergency_calling_enabled": true
202
+ "emergency_calling_enabled": true,
203
+ "secure": true
201
204
  }
202
205
  ]
203
206
  ))
@@ -251,7 +254,8 @@ describe 'Domain' do
251
254
  "voice_status_callback_method": "POST",
252
255
  "voice_status_callback_url": null,
253
256
  "voice_url": "https://dundermifflin.example.com/twilio/app.php",
254
- "emergency_calling_enabled": true
257
+ "emergency_calling_enabled": true,
258
+ "secure": true
255
259
  }
256
260
  ]
257
261
  ))