twilio-ruby 6.6.0 → 6.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +15 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +7 -7
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +8 -8
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/safelist.rb +169 -0
- data/lib/twilio-ruby/rest/api/v2010.rb +6 -0
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +4 -4
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +3 -3
- data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +3 -3
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +10 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +22 -4
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +10 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +25 -7
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +6 -6
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +4 -4
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +4 -4
- data/lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +3 -3
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +4 -4
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +3 -3
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -2
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +2 -2
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +2 -2
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +3 -3
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +4 -4
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/participant.rb +3 -3
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 129f3f488da064d58d4cc92b0f152ac957fb345a
|
4
|
+
data.tar.gz: 72729eea0c5b03eb3fb1631db76e8ea3ee320667
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c652832fc2dff52251346d42d0f34dac860c3bb47cebb08012b4e49905e87a84d727cf35ff0e9255665aa1393f7fb28a2c85d72f035d234746ef381a9ab5302
|
7
|
+
data.tar.gz: ceee9433dc8c8d706c85d31b5c40cbe10fba6575a9543b37ccb121a44e4d4ab93d6148ab03fea0e0184c02ec430f0579485c26f256bb7b30204103128905d022
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,21 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2023-09-21] Version 6.7.0
|
5
|
+
--------------------------
|
6
|
+
**Conversations**
|
7
|
+
- Enable conversation email bindings, email address configurations and email message subjects
|
8
|
+
|
9
|
+
**Flex**
|
10
|
+
- Adding `console_errors_included` to Flex Configuration field `debugger_integrations`
|
11
|
+
- Introducing new channel status as `inactive` in modify channel endpoint for leave functionality **(breaking change)**
|
12
|
+
- Adding `citrix_voice_vdi` to Flex Configuration
|
13
|
+
|
14
|
+
**Taskrouter**
|
15
|
+
- Add Update Queues, Workers, Workflow Real Time Statistics API to flex-rt-data-api-v2 endpoint
|
16
|
+
- Add Update Workspace Real Time Statistics API to flex-rt-data-api-v2 endpoint
|
17
|
+
|
18
|
+
|
4
19
|
[2023-09-07] Version 6.6.0
|
5
20
|
--------------------------
|
6
21
|
**Api**
|
data/README.md
CHANGED
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
|
|
39
39
|
To install using [Bundler][bundler] grab the latest stable version:
|
40
40
|
|
41
41
|
```ruby
|
42
|
-
gem 'twilio-ruby', '~> 6.
|
42
|
+
gem 'twilio-ruby', '~> 6.7.0'
|
43
43
|
```
|
44
44
|
|
45
45
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
46
46
|
|
47
47
|
```bash
|
48
|
-
gem install twilio-ruby -v 6.
|
48
|
+
gem install twilio-ruby -v 6.7.0
|
49
49
|
```
|
50
50
|
|
51
51
|
To build and install the development branch yourself from the latest source:
|
@@ -281,7 +281,7 @@ module Twilio
|
|
281
281
|
def dependent_phone_numbers
|
282
282
|
unless @dependent_phone_numbers
|
283
283
|
@dependent_phone_numbers = DependentPhoneNumberList.new(
|
284
|
-
@version, account_sid: @solution[:account_sid],
|
284
|
+
@version, account_sid: @solution[:account_sid], address_sid: @solution[:sid], )
|
285
285
|
end
|
286
286
|
@dependent_phone_numbers
|
287
287
|
end
|
@@ -169,7 +169,7 @@ module Twilio
|
|
169
169
|
def voip
|
170
170
|
unless @voip
|
171
171
|
@voip = VoipList.new(
|
172
|
-
@version, account_sid: @solution[:account_sid],
|
172
|
+
@version, account_sid: @solution[:account_sid], country_code: @solution[:country_code], )
|
173
173
|
end
|
174
174
|
@voip
|
175
175
|
end
|
@@ -180,7 +180,7 @@ module Twilio
|
|
180
180
|
def national
|
181
181
|
unless @national
|
182
182
|
@national = NationalList.new(
|
183
|
-
@version, account_sid: @solution[:account_sid],
|
183
|
+
@version, account_sid: @solution[:account_sid], country_code: @solution[:country_code], )
|
184
184
|
end
|
185
185
|
@national
|
186
186
|
end
|
@@ -191,7 +191,7 @@ module Twilio
|
|
191
191
|
def mobile
|
192
192
|
unless @mobile
|
193
193
|
@mobile = MobileList.new(
|
194
|
-
@version, account_sid: @solution[:account_sid],
|
194
|
+
@version, account_sid: @solution[:account_sid], country_code: @solution[:country_code], )
|
195
195
|
end
|
196
196
|
@mobile
|
197
197
|
end
|
@@ -202,7 +202,7 @@ module Twilio
|
|
202
202
|
def machine_to_machine
|
203
203
|
unless @machine_to_machine
|
204
204
|
@machine_to_machine = MachineToMachineList.new(
|
205
|
-
@version, account_sid: @solution[:account_sid],
|
205
|
+
@version, account_sid: @solution[:account_sid], country_code: @solution[:country_code], )
|
206
206
|
end
|
207
207
|
@machine_to_machine
|
208
208
|
end
|
@@ -213,7 +213,7 @@ module Twilio
|
|
213
213
|
def toll_free
|
214
214
|
unless @toll_free
|
215
215
|
@toll_free = TollFreeList.new(
|
216
|
-
@version, account_sid: @solution[:account_sid],
|
216
|
+
@version, account_sid: @solution[:account_sid], country_code: @solution[:country_code], )
|
217
217
|
end
|
218
218
|
@toll_free
|
219
219
|
end
|
@@ -224,7 +224,7 @@ module Twilio
|
|
224
224
|
def shared_cost
|
225
225
|
unless @shared_cost
|
226
226
|
@shared_cost = SharedCostList.new(
|
227
|
-
@version, account_sid: @solution[:account_sid],
|
227
|
+
@version, account_sid: @solution[:account_sid], country_code: @solution[:country_code], )
|
228
228
|
end
|
229
229
|
@shared_cost
|
230
230
|
end
|
@@ -235,7 +235,7 @@ module Twilio
|
|
235
235
|
def local
|
236
236
|
unless @local
|
237
237
|
@local = LocalList.new(
|
238
|
-
@version, account_sid: @solution[:account_sid],
|
238
|
+
@version, account_sid: @solution[:account_sid], country_code: @solution[:country_code], )
|
239
239
|
end
|
240
240
|
@local
|
241
241
|
end
|
@@ -420,7 +420,7 @@ module Twilio
|
|
420
420
|
def events
|
421
421
|
unless @events
|
422
422
|
@events = EventList.new(
|
423
|
-
@version, account_sid: @solution[:account_sid],
|
423
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
424
424
|
end
|
425
425
|
@events
|
426
426
|
end
|
@@ -431,7 +431,7 @@ module Twilio
|
|
431
431
|
def user_defined_messages
|
432
432
|
unless @user_defined_messages
|
433
433
|
@user_defined_messages = UserDefinedMessageList.new(
|
434
|
-
@version, account_sid: @solution[:account_sid],
|
434
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
435
435
|
end
|
436
436
|
@user_defined_messages
|
437
437
|
end
|
@@ -449,7 +449,7 @@ module Twilio
|
|
449
449
|
|
450
450
|
unless @siprec
|
451
451
|
@siprec = SiprecList.new(
|
452
|
-
@version, account_sid: @solution[:account_sid],
|
452
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
453
453
|
end
|
454
454
|
|
455
455
|
@siprec
|
@@ -468,7 +468,7 @@ module Twilio
|
|
468
468
|
|
469
469
|
unless @user_defined_message_subscriptions
|
470
470
|
@user_defined_message_subscriptions = UserDefinedMessageSubscriptionList.new(
|
471
|
-
@version, account_sid: @solution[:account_sid],
|
471
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
472
472
|
end
|
473
473
|
|
474
474
|
@user_defined_message_subscriptions
|
@@ -487,7 +487,7 @@ module Twilio
|
|
487
487
|
|
488
488
|
unless @payments
|
489
489
|
@payments = PaymentList.new(
|
490
|
-
@version, account_sid: @solution[:account_sid],
|
490
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
491
491
|
end
|
492
492
|
|
493
493
|
@payments
|
@@ -506,7 +506,7 @@ module Twilio
|
|
506
506
|
|
507
507
|
unless @recordings
|
508
508
|
@recordings = RecordingList.new(
|
509
|
-
@version, account_sid: @solution[:account_sid],
|
509
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
510
510
|
end
|
511
511
|
|
512
512
|
@recordings
|
@@ -525,7 +525,7 @@ module Twilio
|
|
525
525
|
|
526
526
|
unless @notifications
|
527
527
|
@notifications = NotificationList.new(
|
528
|
-
@version, account_sid: @solution[:account_sid],
|
528
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
529
529
|
end
|
530
530
|
|
531
531
|
@notifications
|
@@ -555,7 +555,7 @@ module Twilio
|
|
555
555
|
|
556
556
|
unless @streams
|
557
557
|
@streams = StreamList.new(
|
558
|
-
@version, account_sid: @solution[:account_sid],
|
558
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
559
559
|
end
|
560
560
|
|
561
561
|
@streams
|
@@ -246,7 +246,7 @@ module Twilio
|
|
246
246
|
|
247
247
|
unless @recordings
|
248
248
|
@recordings = RecordingList.new(
|
249
|
-
@version, account_sid: @solution[:account_sid],
|
249
|
+
@version, account_sid: @solution[:account_sid], conference_sid: @solution[:sid], )
|
250
250
|
end
|
251
251
|
|
252
252
|
@recordings
|
@@ -265,7 +265,7 @@ module Twilio
|
|
265
265
|
|
266
266
|
unless @participants
|
267
267
|
@participants = ParticipantList.new(
|
268
|
-
@version, account_sid: @solution[:account_sid],
|
268
|
+
@version, account_sid: @solution[:account_sid], conference_sid: @solution[:sid], )
|
269
269
|
end
|
270
270
|
|
271
271
|
@participants
|
@@ -204,7 +204,7 @@ module Twilio
|
|
204
204
|
|
205
205
|
unless @extensions
|
206
206
|
@extensions = AssignedAddOnExtensionList.new(
|
207
|
-
@version, account_sid: @solution[:account_sid],
|
207
|
+
@version, account_sid: @solution[:account_sid], resource_sid: @solution[:resource_sid], assigned_add_on_sid: @solution[:sid], )
|
208
208
|
end
|
209
209
|
|
210
210
|
@extensions
|
@@ -402,7 +402,7 @@ module Twilio
|
|
402
402
|
|
403
403
|
unless @assigned_add_ons
|
404
404
|
@assigned_add_ons = AssignedAddOnList.new(
|
405
|
-
@version, account_sid: @solution[:account_sid],
|
405
|
+
@version, account_sid: @solution[:account_sid], resource_sid: @solution[:sid], )
|
406
406
|
end
|
407
407
|
|
408
408
|
@assigned_add_ons
|
@@ -52,7 +52,7 @@ module Twilio
|
|
52
52
|
# @param [String] content_variables For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used.
|
53
53
|
# @param [String] tags A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length.
|
54
54
|
# @param [RiskCheck] risk_check
|
55
|
-
# @param [String] from The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and
|
55
|
+
# @param [String] from The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
|
56
56
|
# @param [String] messaging_service_sid The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool.
|
57
57
|
# @param [String] body The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages).
|
58
58
|
# @param [Array[String]] media_url The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply.
|
@@ -315,7 +315,7 @@ module Twilio
|
|
315
315
|
def feedback
|
316
316
|
unless @feedback
|
317
317
|
@feedback = FeedbackList.new(
|
318
|
-
@version, account_sid: @solution[:account_sid],
|
318
|
+
@version, account_sid: @solution[:account_sid], message_sid: @solution[:sid], )
|
319
319
|
end
|
320
320
|
@feedback
|
321
321
|
end
|
@@ -333,7 +333,7 @@ module Twilio
|
|
333
333
|
|
334
334
|
unless @media
|
335
335
|
@media = MediaList.new(
|
336
|
-
@version, account_sid: @solution[:account_sid],
|
336
|
+
@version, account_sid: @solution[:account_sid], message_sid: @solution[:sid], )
|
337
337
|
end
|
338
338
|
|
339
339
|
@media
|
@@ -225,7 +225,7 @@ module Twilio
|
|
225
225
|
|
226
226
|
unless @members
|
227
227
|
@members = MemberList.new(
|
228
|
-
@version, account_sid: @solution[:account_sid],
|
228
|
+
@version, account_sid: @solution[:account_sid], queue_sid: @solution[:sid], )
|
229
229
|
end
|
230
230
|
|
231
231
|
@members
|
@@ -181,7 +181,7 @@ module Twilio
|
|
181
181
|
|
182
182
|
unless @payloads
|
183
183
|
@payloads = PayloadList.new(
|
184
|
-
@version, account_sid: @solution[:account_sid],
|
184
|
+
@version, account_sid: @solution[:account_sid], reference_sid: @solution[:reference_sid], add_on_result_sid: @solution[:sid], )
|
185
185
|
end
|
186
186
|
|
187
187
|
@payloads
|
@@ -221,7 +221,7 @@ module Twilio
|
|
221
221
|
|
222
222
|
unless @add_on_results
|
223
223
|
@add_on_results = AddOnResultList.new(
|
224
|
-
@version, account_sid: @solution[:account_sid],
|
224
|
+
@version, account_sid: @solution[:account_sid], reference_sid: @solution[:sid], )
|
225
225
|
end
|
226
226
|
|
227
227
|
@add_on_results
|
@@ -240,7 +240,7 @@ module Twilio
|
|
240
240
|
|
241
241
|
unless @transcriptions
|
242
242
|
@transcriptions = TranscriptionList.new(
|
243
|
-
@version, account_sid: @solution[:account_sid],
|
243
|
+
@version, account_sid: @solution[:account_sid], recording_sid: @solution[:sid], )
|
244
244
|
end
|
245
245
|
|
246
246
|
@transcriptions
|
@@ -220,7 +220,7 @@ module Twilio
|
|
220
220
|
|
221
221
|
unless @credentials
|
222
222
|
@credentials = CredentialList.new(
|
223
|
-
@version, account_sid: @solution[:account_sid],
|
223
|
+
@version, account_sid: @solution[:account_sid], credential_list_sid: @solution[:sid], )
|
224
224
|
end
|
225
225
|
|
226
226
|
@credentials
|
@@ -287,7 +287,7 @@ module Twilio
|
|
287
287
|
def auth
|
288
288
|
unless @auth
|
289
289
|
@auth = AuthTypesList.new(
|
290
|
-
@version, account_sid: @solution[:account_sid],
|
290
|
+
@version, account_sid: @solution[:account_sid], domain_sid: @solution[:sid], )
|
291
291
|
end
|
292
292
|
@auth
|
293
293
|
end
|
@@ -305,7 +305,7 @@ module Twilio
|
|
305
305
|
|
306
306
|
unless @ip_access_control_list_mappings
|
307
307
|
@ip_access_control_list_mappings = IpAccessControlListMappingList.new(
|
308
|
-
@version, account_sid: @solution[:account_sid],
|
308
|
+
@version, account_sid: @solution[:account_sid], domain_sid: @solution[:sid], )
|
309
309
|
end
|
310
310
|
|
311
311
|
@ip_access_control_list_mappings
|
@@ -324,7 +324,7 @@ module Twilio
|
|
324
324
|
|
325
325
|
unless @credential_list_mappings
|
326
326
|
@credential_list_mappings = CredentialListMappingList.new(
|
327
|
-
@version, account_sid: @solution[:account_sid],
|
327
|
+
@version, account_sid: @solution[:account_sid], domain_sid: @solution[:sid], )
|
328
328
|
end
|
329
329
|
|
330
330
|
@credential_list_mappings
|
@@ -220,7 +220,7 @@ module Twilio
|
|
220
220
|
|
221
221
|
unless @ip_addresses
|
222
222
|
@ip_addresses = IpAddressList.new(
|
223
|
-
@version, account_sid: @solution[:account_sid],
|
223
|
+
@version, account_sid: @solution[:account_sid], ip_access_control_list_sid: @solution[:sid], )
|
224
224
|
end
|
225
225
|
|
226
226
|
@ip_addresses
|
@@ -0,0 +1,169 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Api
|
8
|
+
# This is the public Twilio REST API.
|
9
|
+
#
|
10
|
+
# NOTE: This class is auto generated by OpenAPI Generator.
|
11
|
+
# https://openapi-generator.tech
|
12
|
+
# Do not edit the class manually.
|
13
|
+
#
|
14
|
+
|
15
|
+
|
16
|
+
module Twilio
|
17
|
+
module REST
|
18
|
+
class Api < ApiBase
|
19
|
+
class V2010 < Version
|
20
|
+
class SafelistList < ListResource
|
21
|
+
##
|
22
|
+
# Initialize the SafelistList
|
23
|
+
# @param [Version] version Version that contains the resource
|
24
|
+
# @return [SafelistList] SafelistList
|
25
|
+
def initialize(version)
|
26
|
+
super(version)
|
27
|
+
# Path Solution
|
28
|
+
@solution = { }
|
29
|
+
@uri = "/SafeList/Numbers.json"
|
30
|
+
|
31
|
+
end
|
32
|
+
##
|
33
|
+
# Create the SafelistInstance
|
34
|
+
# @param [String] phone_number The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
|
35
|
+
# @return [SafelistInstance] Created SafelistInstance
|
36
|
+
def create(
|
37
|
+
phone_number: nil
|
38
|
+
)
|
39
|
+
|
40
|
+
data = Twilio::Values.of({
|
41
|
+
'PhoneNumber' => phone_number,
|
42
|
+
})
|
43
|
+
|
44
|
+
payload = @version.create('POST', @uri, data: data)
|
45
|
+
SafelistInstance.new(
|
46
|
+
@version,
|
47
|
+
payload,
|
48
|
+
)
|
49
|
+
end
|
50
|
+
|
51
|
+
##
|
52
|
+
# Delete the SafelistInstance
|
53
|
+
# @param [String] phone_number The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
|
54
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
55
|
+
def delete(
|
56
|
+
phone_number: :unset
|
57
|
+
)
|
58
|
+
|
59
|
+
params = Twilio::Values.of({
|
60
|
+
'PhoneNumber' => phone_number,
|
61
|
+
})
|
62
|
+
@version.delete('DELETE', @uri, params: params)
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# Fetch the SafelistInstance
|
67
|
+
# @param [String] phone_number The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
|
68
|
+
# @return [SafelistInstance] Fetched SafelistInstance
|
69
|
+
def fetch(
|
70
|
+
phone_number: :unset
|
71
|
+
)
|
72
|
+
|
73
|
+
params = Twilio::Values.of({
|
74
|
+
'PhoneNumber' => phone_number,
|
75
|
+
})
|
76
|
+
payload = @version.fetch('GET', @uri, params: params)
|
77
|
+
SafelistInstance.new(
|
78
|
+
@version,
|
79
|
+
payload,
|
80
|
+
)
|
81
|
+
end
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
# Provide a user friendly representation
|
87
|
+
def to_s
|
88
|
+
'#<Twilio.Api.V2010.SafelistList>'
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
class SafelistPage < Page
|
93
|
+
##
|
94
|
+
# Initialize the SafelistPage
|
95
|
+
# @param [Version] version Version that contains the resource
|
96
|
+
# @param [Response] response Response from the API
|
97
|
+
# @param [Hash] solution Path solution for the resource
|
98
|
+
# @return [SafelistPage] SafelistPage
|
99
|
+
def initialize(version, response, solution)
|
100
|
+
super(version, response)
|
101
|
+
|
102
|
+
# Path Solution
|
103
|
+
@solution = solution
|
104
|
+
end
|
105
|
+
|
106
|
+
##
|
107
|
+
# Build an instance of SafelistInstance
|
108
|
+
# @param [Hash] payload Payload response from the API
|
109
|
+
# @return [SafelistInstance] SafelistInstance
|
110
|
+
def get_instance(payload)
|
111
|
+
SafelistInstance.new(@version, payload)
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# Provide a user friendly representation
|
116
|
+
def to_s
|
117
|
+
'<Twilio.Api.V2010.SafelistPage>'
|
118
|
+
end
|
119
|
+
end
|
120
|
+
class SafelistInstance < InstanceResource
|
121
|
+
##
|
122
|
+
# Initialize the SafelistInstance
|
123
|
+
# @param [Version] version Version that contains the resource
|
124
|
+
# @param [Hash] payload payload that contains response from Twilio
|
125
|
+
# @param [String] account_sid The SID of the
|
126
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Safelist
|
127
|
+
# resource.
|
128
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
129
|
+
# @return [SafelistInstance] SafelistInstance
|
130
|
+
def initialize(version, payload )
|
131
|
+
super(version)
|
132
|
+
|
133
|
+
# Marshaled Properties
|
134
|
+
@properties = {
|
135
|
+
'sid' => payload['sid'],
|
136
|
+
'phone_number' => payload['phone_number'],
|
137
|
+
}
|
138
|
+
end
|
139
|
+
|
140
|
+
|
141
|
+
##
|
142
|
+
# @return [String] The unique string that we created to identify the SafeList resource.
|
143
|
+
def sid
|
144
|
+
@properties['sid']
|
145
|
+
end
|
146
|
+
|
147
|
+
##
|
148
|
+
# @return [String] The phone number in SafeList.
|
149
|
+
def phone_number
|
150
|
+
@properties['phone_number']
|
151
|
+
end
|
152
|
+
|
153
|
+
##
|
154
|
+
# Provide a user friendly representation
|
155
|
+
def to_s
|
156
|
+
"<Twilio.Api.V2010.SafelistInstance>"
|
157
|
+
end
|
158
|
+
|
159
|
+
##
|
160
|
+
# Provide a detailed, user friendly representation
|
161
|
+
def inspect
|
162
|
+
"<Twilio.Api.V2010.SafelistInstance>"
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
@@ -22,6 +22,7 @@ module Twilio
|
|
22
22
|
super
|
23
23
|
@version = '2010-04-01'
|
24
24
|
@accounts = nil
|
25
|
+
@safelist = nil
|
25
26
|
end
|
26
27
|
|
27
28
|
##
|
@@ -122,6 +123,11 @@ module Twilio
|
|
122
123
|
end
|
123
124
|
end
|
124
125
|
##
|
126
|
+
# @return [Twilio::REST::Api::V2010::SafelistList]
|
127
|
+
def safelist
|
128
|
+
@safelist ||= SafelistList.new self
|
129
|
+
end
|
130
|
+
##
|
125
131
|
# Provide a user friendly representation
|
126
132
|
def to_s
|
127
133
|
'<Twilio::REST::Api::V2010>';
|
@@ -227,7 +227,7 @@ module Twilio
|
|
227
227
|
|
228
228
|
unless @field_values
|
229
229
|
@field_values = FieldValueList.new(
|
230
|
-
@version, assistant_sid: @solution[:assistant_sid],
|
230
|
+
@version, assistant_sid: @solution[:assistant_sid], field_type_sid: @solution[:sid], )
|
231
231
|
end
|
232
232
|
|
233
233
|
@field_values
|
@@ -242,7 +242,7 @@ module Twilio
|
|
242
242
|
|
243
243
|
unless @samples
|
244
244
|
@samples = SampleList.new(
|
245
|
-
@version, assistant_sid: @solution[:assistant_sid],
|
245
|
+
@version, assistant_sid: @solution[:assistant_sid], task_sid: @solution[:sid], )
|
246
246
|
end
|
247
247
|
|
248
248
|
@samples
|
@@ -283,7 +283,7 @@ module Twilio
|
|
283
283
|
|
284
284
|
unless @fields
|
285
285
|
@fields = FieldList.new(
|
286
|
-
@version, assistant_sid: @solution[:assistant_sid],
|
286
|
+
@version, assistant_sid: @solution[:assistant_sid], task_sid: @solution[:sid], )
|
287
287
|
end
|
288
288
|
|
289
289
|
@fields
|
@@ -243,7 +243,7 @@ module Twilio
|
|
243
243
|
|
244
244
|
unless @members
|
245
245
|
@members = MemberList.new(
|
246
|
-
@version, service_sid: @solution[:service_sid],
|
246
|
+
@version, service_sid: @solution[:service_sid], channel_sid: @solution[:sid], )
|
247
247
|
end
|
248
248
|
|
249
249
|
@members
|
@@ -262,7 +262,7 @@ module Twilio
|
|
262
262
|
|
263
263
|
unless @messages
|
264
264
|
@messages = MessageList.new(
|
265
|
-
@version, service_sid: @solution[:service_sid],
|
265
|
+
@version, service_sid: @solution[:service_sid], channel_sid: @solution[:sid], )
|
266
266
|
end
|
267
267
|
|
268
268
|
@messages
|
@@ -281,7 +281,7 @@ module Twilio
|
|
281
281
|
|
282
282
|
unless @invites
|
283
283
|
@invites = InviteList.new(
|
284
|
-
@version, service_sid: @solution[:service_sid],
|
284
|
+
@version, service_sid: @solution[:service_sid], channel_sid: @solution[:sid], )
|
285
285
|
end
|
286
286
|
|
287
287
|
@invites
|
@@ -227,7 +227,7 @@ module Twilio
|
|
227
227
|
def user_channels
|
228
228
|
unless @user_channels
|
229
229
|
@user_channels = UserChannelList.new(
|
230
|
-
@version, service_sid: @solution[:service_sid],
|
230
|
+
@version, service_sid: @solution[:service_sid], user_sid: @solution[:sid], )
|
231
231
|
end
|
232
232
|
@user_channels
|
233
233
|
end
|
@@ -272,7 +272,7 @@ module Twilio
|
|
272
272
|
|
273
273
|
unless @webhooks
|
274
274
|
@webhooks = WebhookList.new(
|
275
|
-
@version, service_sid: @solution[:service_sid],
|
275
|
+
@version, service_sid: @solution[:service_sid], channel_sid: @solution[:sid], )
|
276
276
|
end
|
277
277
|
|
278
278
|
@webhooks
|
@@ -291,7 +291,7 @@ module Twilio
|
|
291
291
|
|
292
292
|
unless @members
|
293
293
|
@members = MemberList.new(
|
294
|
-
@version, service_sid: @solution[:service_sid],
|
294
|
+
@version, service_sid: @solution[:service_sid], channel_sid: @solution[:sid], )
|
295
295
|
end
|
296
296
|
|
297
297
|
@members
|
@@ -310,7 +310,7 @@ module Twilio
|
|
310
310
|
|
311
311
|
unless @messages
|
312
312
|
@messages = MessageList.new(
|
313
|
-
@version, service_sid: @solution[:service_sid],
|
313
|
+
@version, service_sid: @solution[:service_sid], channel_sid: @solution[:sid], )
|
314
314
|
end
|
315
315
|
|
316
316
|
@messages
|
@@ -329,7 +329,7 @@ module Twilio
|
|
329
329
|
|
330
330
|
unless @invites
|
331
331
|
@invites = InviteList.new(
|
332
|
-
@version, service_sid: @solution[:service_sid],
|
332
|
+
@version, service_sid: @solution[:service_sid], channel_sid: @solution[:sid], )
|
333
333
|
end
|
334
334
|
|
335
335
|
@invites
|