twilio-ruby 6.8.3 → 6.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +36 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/http/http_client.rb +3 -2
  5. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +0 -14
  6. data/lib/twilio-ruby/rest/client.rb +0 -5
  7. data/lib/twilio-ruby/rest/events/v1/event_type.rb +0 -2
  8. data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +0 -2
  9. data/lib/twilio-ruby/rest/events/v1/schema.rb +0 -2
  10. data/lib/twilio-ruby/rest/events/v1/sink.rb +0 -2
  11. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +4 -6
  12. data/lib/twilio-ruby/rest/events/v1/subscription.rb +0 -2
  13. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +245 -0
  14. data/lib/twilio-ruby/rest/numbers/v1.rb +15 -0
  15. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +27 -27
  16. data/lib/twilio-ruby/rest/preview/sync/service.rb +27 -27
  17. data/lib/twilio-ruby/rest/preview.rb +1 -11
  18. data/lib/twilio-ruby/rest/preview_base.rb +0 -5
  19. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +6 -0
  20. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +6 -0
  21. data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +59 -2
  22. data/lib/twilio-ruby/version.rb +1 -1
  23. metadata +3 -35
  24. data/lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb +0 -241
  25. data/lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb +0 -217
  26. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +0 -389
  27. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +0 -435
  28. data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +0 -409
  29. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +0 -473
  30. data/lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb +0 -241
  31. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +0 -373
  32. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +0 -436
  33. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb +0 -253
  34. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +0 -226
  35. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +0 -525
  36. data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +0 -433
  37. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -683
  38. data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +0 -207
  39. data/lib/twilio-ruby/rest/autopilot/v1.rb +0 -55
  40. data/lib/twilio-ruby/rest/autopilot.rb +0 -22
  41. data/lib/twilio-ruby/rest/autopilot_base.rb +0 -38
  42. data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb +0 -241
  43. data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb +0 -241
  44. data/lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb +0 -217
  45. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +0 -389
  46. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +0 -435
  47. data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +0 -409
  48. data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +0 -463
  49. data/lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb +0 -241
  50. data/lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb +0 -373
  51. data/lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb +0 -436
  52. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb +0 -253
  53. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +0 -226
  54. data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +0 -525
  55. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +0 -663
  56. data/lib/twilio-ruby/rest/preview/understand.rb +0 -49
@@ -167,9 +167,9 @@ module Twilio
167
167
  @uri = "/Services/#{@solution[:sid]}"
168
168
 
169
169
  # Dependents
170
- @sync_lists = nil
171
170
  @sync_maps = nil
172
171
  @documents = nil
172
+ @sync_lists = nil
173
173
  end
174
174
  ##
175
175
  # Delete the ServiceInstance
@@ -221,25 +221,6 @@ module Twilio
221
221
  )
222
222
  end
223
223
 
224
- ##
225
- # Access the sync_lists
226
- # @return [SyncListList]
227
- # @return [SyncListContext] if sid was passed.
228
- def sync_lists(sid=:unset)
229
-
230
- raise ArgumentError, 'sid cannot be nil' if sid.nil?
231
-
232
- if sid != :unset
233
- return SyncListContext.new(@version, @solution[:sid],sid )
234
- end
235
-
236
- unless @sync_lists
237
- @sync_lists = SyncListList.new(
238
- @version, service_sid: @solution[:sid], )
239
- end
240
-
241
- @sync_lists
242
- end
243
224
  ##
244
225
  # Access the sync_maps
245
226
  # @return [SyncMapList]
@@ -278,6 +259,25 @@ module Twilio
278
259
 
279
260
  @documents
280
261
  end
262
+ ##
263
+ # Access the sync_lists
264
+ # @return [SyncListList]
265
+ # @return [SyncListContext] if sid was passed.
266
+ def sync_lists(sid=:unset)
267
+
268
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
269
+
270
+ if sid != :unset
271
+ return SyncListContext.new(@version, @solution[:sid],sid )
272
+ end
273
+
274
+ unless @sync_lists
275
+ @sync_lists = SyncListList.new(
276
+ @version, service_sid: @solution[:sid], )
277
+ end
278
+
279
+ @sync_lists
280
+ end
281
281
 
282
282
  ##
283
283
  # Provide a user friendly representation
@@ -463,13 +463,6 @@ module Twilio
463
463
  )
464
464
  end
465
465
 
466
- ##
467
- # Access the sync_lists
468
- # @return [sync_lists] sync_lists
469
- def sync_lists
470
- context.sync_lists
471
- end
472
-
473
466
  ##
474
467
  # Access the sync_maps
475
468
  # @return [sync_maps] sync_maps
@@ -484,6 +477,13 @@ module Twilio
484
477
  context.documents
485
478
  end
486
479
 
480
+ ##
481
+ # Access the sync_lists
482
+ # @return [sync_lists] sync_lists
483
+ def sync_lists
484
+ context.sync_lists
485
+ end
486
+
487
487
  ##
488
488
  # Provide a user friendly representation
489
489
  def to_s
@@ -61,16 +61,6 @@ module Twilio
61
61
  self.sync.services(sid)
62
62
  end
63
63
 
64
- ##
65
- # @param [String] sid A 34 character string that uniquely identifies this
66
- # resource.
67
- # @return [Twilio::REST::Preview::Understand::AssistantInstance] if sid was passed.
68
- # @return [Twilio::REST::Preview::Understand::AssistantList]
69
- def assistants(sid=:unset)
70
- warn "assistants is deprecated. Use understand.assistants instead."
71
- self.understand.assistants(sid)
72
- end
73
-
74
64
  ##
75
65
  # @param [String] sid The sid
76
66
  # @return [Twilio::REST::Preview::Wireless::CommandInstance] if sid was passed.
@@ -99,4 +89,4 @@ module Twilio
99
89
  end
100
90
  end
101
91
  end
102
- end
92
+ end
@@ -25,7 +25,6 @@ module Twilio
25
25
  @hosted_numbers = nil
26
26
  @sync = nil
27
27
  @marketplace = nil
28
- @understand = nil
29
28
  @wireless = nil
30
29
  end
31
30
 
@@ -45,10 +44,6 @@ module Twilio
45
44
  @marketplace ||= Preview::Marketplace.new self
46
45
  end
47
46
 
48
- def understand
49
- @understand ||= Preview::Understand.new self
50
- end
51
-
52
47
  def wireless
53
48
  @wireless ||= Preview::Wireless.new self
54
49
  end
@@ -225,6 +225,7 @@ module Twilio
225
225
  # @param [String] supervisor The Supervisor SID/URI when executing the Supervise instruction.
226
226
  # @param [Boolean] end_conference_on_customer_exit Whether to end the conference when the customer leaves.
227
227
  # @param [Boolean] beep_on_customer_entrance Whether to play a notification beep when the customer joins.
228
+ # @param [String] jitter_buffer_size The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`.
228
229
  # @param [String] if_match The If-Match HTTP request header
229
230
  # @return [ReservationInstance] Updated ReservationInstance
230
231
  def update(
@@ -281,6 +282,7 @@ module Twilio
281
282
  supervisor: :unset,
282
283
  end_conference_on_customer_exit: :unset,
283
284
  beep_on_customer_entrance: :unset,
285
+ jitter_buffer_size: :unset,
284
286
  if_match: :unset
285
287
  )
286
288
 
@@ -338,6 +340,7 @@ module Twilio
338
340
  'Supervisor' => supervisor,
339
341
  'EndConferenceOnCustomerExit' => end_conference_on_customer_exit,
340
342
  'BeepOnCustomerEntrance' => beep_on_customer_entrance,
343
+ 'JitterBufferSize' => jitter_buffer_size,
341
344
  })
342
345
 
343
346
  headers = Twilio::Values.of({ 'If-Match' => if_match, })
@@ -568,6 +571,7 @@ module Twilio
568
571
  # @param [String] supervisor The Supervisor SID/URI when executing the Supervise instruction.
569
572
  # @param [Boolean] end_conference_on_customer_exit Whether to end the conference when the customer leaves.
570
573
  # @param [Boolean] beep_on_customer_entrance Whether to play a notification beep when the customer joins.
574
+ # @param [String] jitter_buffer_size The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`.
571
575
  # @param [String] if_match The If-Match HTTP request header
572
576
  # @return [ReservationInstance] Updated ReservationInstance
573
577
  def update(
@@ -624,6 +628,7 @@ module Twilio
624
628
  supervisor: :unset,
625
629
  end_conference_on_customer_exit: :unset,
626
630
  beep_on_customer_entrance: :unset,
631
+ jitter_buffer_size: :unset,
627
632
  if_match: :unset
628
633
  )
629
634
 
@@ -681,6 +686,7 @@ module Twilio
681
686
  supervisor: supervisor,
682
687
  end_conference_on_customer_exit: end_conference_on_customer_exit,
683
688
  beep_on_customer_entrance: beep_on_customer_entrance,
689
+ jitter_buffer_size: jitter_buffer_size,
684
690
  if_match: if_match,
685
691
  )
686
692
  end
@@ -217,6 +217,7 @@ module Twilio
217
217
  # @param [String] post_work_activity_sid The new worker activity SID after executing a Conference instruction.
218
218
  # @param [Boolean] end_conference_on_customer_exit Whether to end the conference when the customer leaves.
219
219
  # @param [Boolean] beep_on_customer_entrance Whether to play a notification beep when the customer joins.
220
+ # @param [String] jitter_buffer_size The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`.
220
221
  # @param [String] if_match The If-Match HTTP request header
221
222
  # @return [ReservationInstance] Updated ReservationInstance
222
223
  def update(
@@ -271,6 +272,7 @@ module Twilio
271
272
  post_work_activity_sid: :unset,
272
273
  end_conference_on_customer_exit: :unset,
273
274
  beep_on_customer_entrance: :unset,
275
+ jitter_buffer_size: :unset,
274
276
  if_match: :unset
275
277
  )
276
278
 
@@ -326,6 +328,7 @@ module Twilio
326
328
  'PostWorkActivitySid' => post_work_activity_sid,
327
329
  'EndConferenceOnCustomerExit' => end_conference_on_customer_exit,
328
330
  'BeepOnCustomerEntrance' => beep_on_customer_entrance,
331
+ 'JitterBufferSize' => jitter_buffer_size,
329
332
  })
330
333
 
331
334
  headers = Twilio::Values.of({ 'If-Match' => if_match, })
@@ -554,6 +557,7 @@ module Twilio
554
557
  # @param [String] post_work_activity_sid The new worker activity SID after executing a Conference instruction.
555
558
  # @param [Boolean] end_conference_on_customer_exit Whether to end the conference when the customer leaves.
556
559
  # @param [Boolean] beep_on_customer_entrance Whether to play a notification beep when the customer joins.
560
+ # @param [String] jitter_buffer_size The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`.
557
561
  # @param [String] if_match The If-Match HTTP request header
558
562
  # @return [ReservationInstance] Updated ReservationInstance
559
563
  def update(
@@ -608,6 +612,7 @@ module Twilio
608
612
  post_work_activity_sid: :unset,
609
613
  end_conference_on_customer_exit: :unset,
610
614
  beep_on_customer_entrance: :unset,
615
+ jitter_buffer_size: :unset,
611
616
  if_match: :unset
612
617
  )
613
618
 
@@ -663,6 +668,7 @@ module Twilio
663
668
  post_work_activity_sid: post_work_activity_sid,
664
669
  end_conference_on_customer_exit: end_conference_on_customer_exit,
665
670
  beep_on_customer_entrance: beep_on_customer_entrance,
671
+ jitter_buffer_size: jitter_buffer_size,
666
672
  if_match: if_match,
667
673
  )
668
674
  end
@@ -32,16 +32,73 @@ module Twilio
32
32
  ##
33
33
  # Create the ComplianceTollfreeInquiriesInstance
34
34
  # @param [String] tollfree_phone_number The Tollfree phone number to be verified
35
- # @param [String] notification_email The notification email to be triggered when verification status is changed
35
+ # @param [String] notification_email The email address to receive the notification about the verification result.
36
+ # @param [String] business_name The name of the business or organization using the Tollfree number.
37
+ # @param [String] business_website The website of the business or organization using the Tollfree number.
38
+ # @param [Array[String]] use_case_categories The category of the use case for the Tollfree Number. List as many are applicable..
39
+ # @param [String] use_case_summary Use this to further explain how messaging is used by the business or organization.
40
+ # @param [String] production_message_sample An example of message content, i.e. a sample message.
41
+ # @param [Array[String]] opt_in_image_urls Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.
42
+ # @param [OptInType] opt_in_type
43
+ # @param [String] message_volume Estimate monthly volume of messages from the Tollfree Number.
44
+ # @param [String] business_street_address The address of the business or organization using the Tollfree number.
45
+ # @param [String] business_street_address2 The address of the business or organization using the Tollfree number.
46
+ # @param [String] business_city The city of the business or organization using the Tollfree number.
47
+ # @param [String] business_state_province_region The state/province/region of the business or organization using the Tollfree number.
48
+ # @param [String] business_postal_code The postal code of the business or organization using the Tollfree number.
49
+ # @param [String] business_country The country of the business or organization using the Tollfree number.
50
+ # @param [String] additional_information Additional information to be provided for verification.
51
+ # @param [String] business_contact_first_name The first name of the contact for the business or organization using the Tollfree number.
52
+ # @param [String] business_contact_last_name The last name of the contact for the business or organization using the Tollfree number.
53
+ # @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
54
+ # @param [String] business_contact_phone The phone number of the contact for the business or organization using the Tollfree number.
36
55
  # @return [ComplianceTollfreeInquiriesInstance] Created ComplianceTollfreeInquiriesInstance
37
56
  def create(
38
57
  tollfree_phone_number: nil,
39
- notification_email: nil
58
+ notification_email: nil,
59
+ business_name: :unset,
60
+ business_website: :unset,
61
+ use_case_categories: :unset,
62
+ use_case_summary: :unset,
63
+ production_message_sample: :unset,
64
+ opt_in_image_urls: :unset,
65
+ opt_in_type: :unset,
66
+ message_volume: :unset,
67
+ business_street_address: :unset,
68
+ business_street_address2: :unset,
69
+ business_city: :unset,
70
+ business_state_province_region: :unset,
71
+ business_postal_code: :unset,
72
+ business_country: :unset,
73
+ additional_information: :unset,
74
+ business_contact_first_name: :unset,
75
+ business_contact_last_name: :unset,
76
+ business_contact_email: :unset,
77
+ business_contact_phone: :unset
40
78
  )
41
79
 
42
80
  data = Twilio::Values.of({
43
81
  'TollfreePhoneNumber' => tollfree_phone_number,
44
82
  'NotificationEmail' => notification_email,
83
+ 'BusinessName' => business_name,
84
+ 'BusinessWebsite' => business_website,
85
+ 'UseCaseCategories' => Twilio.serialize_list(use_case_categories) { |e| e },
86
+ 'UseCaseSummary' => use_case_summary,
87
+ 'ProductionMessageSample' => production_message_sample,
88
+ 'OptInImageUrls' => Twilio.serialize_list(opt_in_image_urls) { |e| e },
89
+ 'OptInType' => opt_in_type,
90
+ 'MessageVolume' => message_volume,
91
+ 'BusinessStreetAddress' => business_street_address,
92
+ 'BusinessStreetAddress2' => business_street_address2,
93
+ 'BusinessCity' => business_city,
94
+ 'BusinessStateProvinceRegion' => business_state_province_region,
95
+ 'BusinessPostalCode' => business_postal_code,
96
+ 'BusinessCountry' => business_country,
97
+ 'AdditionalInformation' => additional_information,
98
+ 'BusinessContactFirstName' => business_contact_first_name,
99
+ 'BusinessContactLastName' => business_contact_last_name,
100
+ 'BusinessContactEmail' => business_contact_email,
101
+ 'BusinessContactPhone' => business_contact_phone,
45
102
  })
46
103
 
47
104
  payload = @version.create('POST', @uri, data: data)
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '6.8.3'
2
+ VERSION = '6.9.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.8.3
4
+ version: 6.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twilio API Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-01 00:00:00.000000000 Z
11
+ date: 2024-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -334,24 +334,6 @@ files:
334
334
  - lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb
335
335
  - lib/twilio-ruby/rest/api/v2010/account/validation_request.rb
336
336
  - lib/twilio-ruby/rest/api_base.rb
337
- - lib/twilio-ruby/rest/autopilot.rb
338
- - lib/twilio-ruby/rest/autopilot/v1.rb
339
- - lib/twilio-ruby/rest/autopilot/v1/assistant.rb
340
- - lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb
341
- - lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb
342
- - lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb
343
- - lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb
344
- - lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb
345
- - lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb
346
- - lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb
347
- - lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb
348
- - lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb
349
- - lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb
350
- - lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb
351
- - lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb
352
- - lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb
353
- - lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb
354
- - lib/twilio-ruby/rest/autopilot_base.rb
355
337
  - lib/twilio-ruby/rest/bulkexports.rb
356
338
  - lib/twilio-ruby/rest/bulkexports/v1.rb
357
339
  - lib/twilio-ruby/rest/bulkexports/v1/export.rb
@@ -573,6 +555,7 @@ files:
573
555
  - lib/twilio-ruby/rest/numbers/v1.rb
574
556
  - lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb
575
557
  - lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb
558
+ - lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb
576
559
  - lib/twilio-ruby/rest/numbers/v1/porting_portability.rb
577
560
  - lib/twilio-ruby/rest/numbers/v2.rb
578
561
  - lib/twilio-ruby/rest/numbers/v2/authorization_document.rb
@@ -617,21 +600,6 @@ files:
617
600
  - lib/twilio-ruby/rest/preview/sync/service/sync_map.rb
618
601
  - lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb
619
602
  - lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb
620
- - lib/twilio-ruby/rest/preview/understand.rb
621
- - lib/twilio-ruby/rest/preview/understand/assistant.rb
622
- - lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb
623
- - lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb
624
- - lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb
625
- - lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb
626
- - lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb
627
- - lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb
628
- - lib/twilio-ruby/rest/preview/understand/assistant/query.rb
629
- - lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb
630
- - lib/twilio-ruby/rest/preview/understand/assistant/task.rb
631
- - lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb
632
- - lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb
633
- - lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb
634
- - lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb
635
603
  - lib/twilio-ruby/rest/preview/wireless.rb
636
604
  - lib/twilio-ruby/rest/preview/wireless/command.rb
637
605
  - lib/twilio-ruby/rest/preview/wireless/rate_plan.rb
@@ -1,241 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # Twilio - Autopilot
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 Autopilot < AutopilotBase
19
- class V1 < Version
20
- class AssistantContext < InstanceContext
21
-
22
- class DefaultsList < ListResource
23
- ##
24
- # Initialize the DefaultsList
25
- # @param [Version] version Version that contains the resource
26
- # @return [DefaultsList] DefaultsList
27
- def initialize(version, assistant_sid: nil)
28
- super(version)
29
- # Path Solution
30
- @solution = { assistant_sid: assistant_sid }
31
-
32
-
33
- end
34
-
35
-
36
-
37
- # Provide a user friendly representation
38
- def to_s
39
- '#<Twilio.Autopilot.V1.DefaultsList>'
40
- end
41
- end
42
-
43
-
44
- ##
45
- #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.
46
- class DefaultsContext < InstanceContext
47
- ##
48
- # Initialize the DefaultsContext
49
- # @param [Version] version Version that contains the resource
50
- # @param [String] assistant_sid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
51
- # @return [DefaultsContext] DefaultsContext
52
- def initialize(version, assistant_sid)
53
- super(version)
54
-
55
- # Path Solution
56
- @solution = { assistant_sid: assistant_sid, }
57
- @uri = "/Assistants/#{@solution[:assistant_sid]}/Defaults"
58
-
59
-
60
- end
61
- ##
62
- # Fetch the DefaultsInstance
63
- # @return [DefaultsInstance] Fetched DefaultsInstance
64
- def fetch
65
-
66
- payload = @version.fetch('GET', @uri)
67
- DefaultsInstance.new(
68
- @version,
69
- payload,
70
- assistant_sid: @solution[:assistant_sid],
71
- )
72
- end
73
-
74
- ##
75
- # Update the DefaultsInstance
76
- # @param [Object] defaults A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.
77
- # @return [DefaultsInstance] Updated DefaultsInstance
78
- def update(
79
- defaults: :unset
80
- )
81
-
82
- data = Twilio::Values.of({
83
- 'Defaults' => Twilio.serialize_object(defaults),
84
- })
85
-
86
- payload = @version.update('POST', @uri, data: data)
87
- DefaultsInstance.new(
88
- @version,
89
- payload,
90
- assistant_sid: @solution[:assistant_sid],
91
- )
92
- end
93
-
94
-
95
- ##
96
- # Provide a user friendly representation
97
- def to_s
98
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
99
- "#<Twilio.Autopilot.V1.DefaultsContext #{context}>"
100
- end
101
-
102
- ##
103
- # Provide a detailed, user friendly representation
104
- def inspect
105
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
106
- "#<Twilio.Autopilot.V1.DefaultsContext #{context}>"
107
- end
108
- end
109
-
110
- class DefaultsPage < Page
111
- ##
112
- # Initialize the DefaultsPage
113
- # @param [Version] version Version that contains the resource
114
- # @param [Response] response Response from the API
115
- # @param [Hash] solution Path solution for the resource
116
- # @return [DefaultsPage] DefaultsPage
117
- def initialize(version, response, solution)
118
- super(version, response)
119
-
120
- # Path Solution
121
- @solution = solution
122
- end
123
-
124
- ##
125
- # Build an instance of DefaultsInstance
126
- # @param [Hash] payload Payload response from the API
127
- # @return [DefaultsInstance] DefaultsInstance
128
- def get_instance(payload)
129
- DefaultsInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid])
130
- end
131
-
132
- ##
133
- # Provide a user friendly representation
134
- def to_s
135
- '<Twilio.Autopilot.V1.DefaultsPage>'
136
- end
137
- end
138
- class DefaultsInstance < InstanceResource
139
- ##
140
- # Initialize the DefaultsInstance
141
- # @param [Version] version Version that contains the resource
142
- # @param [Hash] payload payload that contains response from Twilio
143
- # @param [String] account_sid The SID of the
144
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Defaults
145
- # resource.
146
- # @param [String] sid The SID of the Call resource to fetch.
147
- # @return [DefaultsInstance] DefaultsInstance
148
- def initialize(version, payload , assistant_sid: nil)
149
- super(version)
150
-
151
- # Marshaled Properties
152
- @properties = {
153
- 'account_sid' => payload['account_sid'],
154
- 'assistant_sid' => payload['assistant_sid'],
155
- 'url' => payload['url'],
156
- 'data' => payload['data'],
157
- }
158
-
159
- # Context
160
- @instance_context = nil
161
- @params = { 'assistant_sid' => assistant_sid || @properties['assistant_sid'] , }
162
- end
163
-
164
- ##
165
- # Generate an instance context for the instance, the context is capable of
166
- # performing various actions. All instance actions are proxied to the context
167
- # @return [DefaultsContext] CallContext for this CallInstance
168
- def context
169
- unless @instance_context
170
- @instance_context = DefaultsContext.new(@version , @params['assistant_sid'])
171
- end
172
- @instance_context
173
- end
174
-
175
- ##
176
- # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Defaults resource.
177
- def account_sid
178
- @properties['account_sid']
179
- end
180
-
181
- ##
182
- # @return [String] The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource.
183
- def assistant_sid
184
- @properties['assistant_sid']
185
- end
186
-
187
- ##
188
- # @return [String] The absolute URL of the Defaults resource.
189
- def url
190
- @properties['url']
191
- end
192
-
193
- ##
194
- # @return [Hash] The JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.
195
- def data
196
- @properties['data']
197
- end
198
-
199
- ##
200
- # Fetch the DefaultsInstance
201
- # @return [DefaultsInstance] Fetched DefaultsInstance
202
- def fetch
203
-
204
- context.fetch
205
- end
206
-
207
- ##
208
- # Update the DefaultsInstance
209
- # @param [Object] defaults A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.
210
- # @return [DefaultsInstance] Updated DefaultsInstance
211
- def update(
212
- defaults: :unset
213
- )
214
-
215
- context.update(
216
- defaults: defaults,
217
- )
218
- end
219
-
220
- ##
221
- # Provide a user friendly representation
222
- def to_s
223
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
224
- "<Twilio.Autopilot.V1.DefaultsInstance #{values}>"
225
- end
226
-
227
- ##
228
- # Provide a detailed, user friendly representation
229
- def inspect
230
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
231
- "<Twilio.Autopilot.V1.DefaultsInstance #{values}>"
232
- end
233
- end
234
-
235
- end
236
- end
237
- end
238
- end
239
- end
240
-
241
-