twilio-ruby 6.12.1 → 7.0.0.pre.rc.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test-and-deploy.yml +5 -5
  3. data/CHANGES.md +24 -31
  4. data/README.md +2 -2
  5. data/UPGRADE.md +10 -0
  6. data/lib/twilio-ruby/framework/request.rb +8 -1
  7. data/lib/twilio-ruby/http/http_client.rb +10 -3
  8. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +0 -2
  9. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +3 -27
  10. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +3 -27
  11. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +0 -2
  12. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +0 -2
  13. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +3 -15
  14. data/lib/twilio-ruby/rest/client.rb +5 -0
  15. data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +184 -0
  16. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +0 -2
  17. data/lib/twilio-ruby/rest/content/v1/content.rb +363 -3
  18. data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +1 -1
  19. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +1 -1
  20. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +0 -2
  21. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +26 -0
  22. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +0 -2
  23. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +0 -2
  24. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +0 -2
  25. data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +0 -2
  26. data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +0 -2
  27. data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +0 -2
  28. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +0 -2
  29. data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +0 -2
  30. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +0 -2
  31. data/lib/twilio-ruby/rest/insights/v1/room.rb +0 -2
  32. data/lib/twilio-ruby/rest/intelligence/v2/service.rb +0 -2
  33. data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +0 -2
  34. data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +0 -2
  35. data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +0 -2
  36. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +0 -2
  37. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +0 -2
  38. data/lib/twilio-ruby/rest/media.rb +32 -3
  39. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +0 -2
  40. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +0 -2
  41. data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +0 -2
  42. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +0 -2
  43. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +0 -2
  44. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +0 -2
  45. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +0 -2
  46. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +0 -2
  47. data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +0 -2
  48. data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +0 -2
  49. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +0 -2
  50. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +0 -2
  51. data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -2
  52. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +0 -2
  53. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +0 -2
  54. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +0 -2
  55. data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +0 -2
  56. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +0 -2
  57. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +0 -2
  58. data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +0 -2
  59. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +0 -2
  60. data/lib/twilio-ruby/rest/notify/v1/credential.rb +0 -2
  61. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +0 -2
  62. data/lib/twilio-ruby/rest/notify/v1/service.rb +0 -2
  63. data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +16 -3
  64. data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +127 -0
  65. data/lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb +0 -2
  66. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +134 -0
  67. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +0 -2
  68. data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +0 -2
  69. data/lib/twilio-ruby/rest/numbers/v1.rb +12 -0
  70. data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +0 -2
  71. data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +16 -3
  72. data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +0 -2
  73. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +3 -15
  74. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +0 -2
  75. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +0 -2
  76. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +0 -2
  77. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +0 -2
  78. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +0 -2
  79. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +0 -2
  80. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +0 -2
  81. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +0 -2
  82. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +0 -2
  83. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +0 -2
  84. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +0 -2
  85. data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -2
  86. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -2
  87. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -2
  88. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -2
  89. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -2
  90. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -2
  91. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -2
  92. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -2
  93. data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -2
  94. data/lib/twilio-ruby/rest/preview/wireless/command.rb +0 -2
  95. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +0 -2
  96. data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +0 -2
  97. data/lib/twilio-ruby/rest/preview/wireless/sim.rb +0 -2
  98. data/lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb +164 -0
  99. data/lib/twilio-ruby/rest/preview_messaging/v1/message.rb +235 -0
  100. data/lib/twilio-ruby/rest/preview_messaging/v1.rb +46 -0
  101. data/lib/twilio-ruby/rest/preview_messaging.rb +12 -0
  102. data/lib/twilio-ruby/rest/preview_messaging_base.rb +38 -0
  103. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +0 -2
  104. data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +0 -2
  105. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +0 -2
  106. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +0 -2
  107. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +0 -2
  108. data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +0 -2
  109. data/lib/twilio-ruby/rest/proxy/v1/service.rb +0 -2
  110. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +0 -2
  111. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +0 -2
  112. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +0 -2
  113. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +0 -2
  114. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +0 -2
  115. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +0 -2
  116. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +0 -2
  117. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +0 -2
  118. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +0 -2
  119. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +0 -2
  120. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +0 -2
  121. data/lib/twilio-ruby/rest/serverless/v1/service.rb +0 -2
  122. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +0 -2
  123. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +0 -2
  124. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +0 -2
  125. data/lib/twilio-ruby/rest/supersim/v1/network.rb +0 -2
  126. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +0 -2
  127. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +0 -2
  128. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +0 -2
  129. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +0 -2
  130. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +163 -0
  131. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +8 -8
  132. data/lib/twilio-ruby/rest/verify/v2/form.rb +0 -2
  133. data/lib/twilio-ruby/rest/verify/v2/safelist.rb +0 -2
  134. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +0 -2
  135. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +0 -2
  136. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +0 -2
  137. data/lib/twilio-ruby/version.rb +1 -1
  138. metadata +12 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ee4da7ce236e476901cca417a590ffbcc5dd90d
4
- data.tar.gz: 7e0d20132c3cb96f03f2c6e3d42a9074ebf357fc
3
+ metadata.gz: 1730c85dbb2c0da063c2c73ea90bc28b87fb5015
4
+ data.tar.gz: 70485b2a857f7076f8c2d05c4c4a43286688392c
5
5
  SHA512:
6
- metadata.gz: 4a7a0c2959b45c56f2ee701ecca64a21a6ec596e2a8b36c1761b32ce58e0669fecd3f2c61d0f749b5bcd8bea34c52e3e898231e3dad8eec421cd8b1637807575
7
- data.tar.gz: 529e0dd106814e77a1b0b8588da5b7077dbe12a18ccfd69383e7caa7df23e75e41ba3bb7172c24c67bbd167a6aac101b19fc3f70785be0d31c09c231c3304627
6
+ metadata.gz: abbb783d2713dc054fcb827acdbf12a772764d0bcfff66432033c9eaedb6a60750986ae1afcf43164f653130e51df07976d49f9943632cad5c9e472a190c53ec
7
+ data.tar.gz: 8cfbd2b13dad2fe85106abdb37cbded08d7828e961d9e2f87782240f11c75101fa39031a7b5a4ff4284d8b0fff9dc139f622c3e28144cc8afcfdf7ef4e8a4039
@@ -48,11 +48,11 @@ jobs:
48
48
  - name: Run Cluster Test
49
49
  if: (!github.event.pull_request.head.repo.fork)
50
50
  env:
51
- TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
52
- TWILIO_API_KEY: ${{ secrets.TWILIO_CLUSTER_TEST_API_KEY}}
53
- TWILIO_API_SECRET: ${{ secrets.TWILIO_CLUSTER_TEST_API_KEY_SECRET }}
54
- TWILIO_FROM_NUMBER: ${{ secrets.TWILIO_FROM_NUMBER }}
55
- TWILIO_TO_NUMBER: ${{ secrets.TWILIO_TO_NUMBER }}
51
+ TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
52
+ TWILIO_API_KEY: ${{ secrets.TWILIO_CLUSTER_TEST_API_KEY}}
53
+ TWILIO_API_SECRET: ${{ secrets.TWILIO_CLUSTER_TEST_API_KEY_SECRET }}
54
+ TWILIO_FROM_NUMBER: ${{ secrets.TWILIO_FROM_NUMBER }}
55
+ TWILIO_TO_NUMBER: ${{ secrets.TWILIO_TO_NUMBER }}
56
56
  run: make cluster-test
57
57
 
58
58
  - name: Fix code coverage paths
data/CHANGES.md CHANGED
@@ -1,20 +1,31 @@
1
1
  twilio-ruby changelog
2
- =====================
2
+ =====================
3
+
4
+
5
+ [2024-03-12] Version 7.0.0-rc.2
6
+ -------------------------------
7
+ **Library - Chore**
8
+ - [PR #714](https://github.com/twilio/twilio-ruby/pull/714): enable cluster test. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
3
9
 
4
- [2024-03-12] Version 6.12.1
5
- ---------------------------
6
10
  **Api**
7
11
  - Correct precedence documentation for application_sid vs status_callback in message creation
8
12
  - Mark MaxPrice as deprecated
13
+ - remove feedback and feedback summary from call resource
9
14
 
10
15
  **Flex**
11
16
  - Making `plugins` visibility to public
17
+ - Adding `routing_properties` to Interactions Channels Participant
18
+
19
+ **Lookups**
20
+ - Add new `line_status` package to the lookup response
21
+ - Remove `live_activity` package from the lookup response **(breaking change)**
12
22
 
13
23
  **Messaging**
14
24
  - Add new `errors` attribute to the Brand Registration resource.
15
25
  - Mark `brand_feedback` attribute as deprecated.
16
26
  - Mark `failure_reason` attribute as deprecated.
17
27
  - The new `errors` attribute is expected to provide additional information about Brand registration failures and feedback (if any has been provided by The Campaign Registry). Consumers should use this attribute instead of `brand_feedback` and `failure_reason`.
28
+ - Add tollfree multiple rejection reasons response array
18
29
 
19
30
  **Numbers**
20
31
  - Correcting mount_name for porting port in fetch API
@@ -22,43 +33,20 @@ twilio-ruby changelog
22
33
  **Trusthub**
23
34
  - Add new field in statusCallbackUrl in compliance_registration.
24
35
  - Add new field in isvRegisteringForSelfOrTenant in compliance_registration.
25
-
26
- **Twiml**
27
- - Expanded description of Action parameter for Message verb
28
-
29
-
30
- [2024-02-27] Version 6.12.0
31
- ---------------------------
32
- **Library - Chore**
33
- - [PR #712](https://github.com/twilio/twilio-ruby/pull/712): cluster tests enabled. Thanks to [@sbansla](https://github.com/sbansla)!
34
-
35
- **Api**
36
- - remove feedback and feedback summary from call resource
37
-
38
- **Flex**
39
- - Adding `routing_properties` to Interactions Channels Participant
40
-
41
- **Lookups**
42
- - Add new `line_status` package to the lookup response
43
- - Remove `live_activity` package from the lookup response **(breaking change)**
44
-
45
- **Messaging**
46
- - Add tollfree multiple rejection reasons response array
47
-
48
- **Trusthub**
49
36
  - Add ENUM for businessRegistrationAuthority in compliance_registration. **(breaking change)**
50
37
  - Add new field in isIsvEmbed in compliance_registration.
51
38
  - Add additional optional fields in compliance_registration for Individual business type.
52
39
 
53
40
  **Twiml**
41
+ - Expanded description of Action parameter for Message verb
54
42
  - Add support for new Amazon Polly and Google voices (Q1 2024) for `Say` verb
55
43
 
56
44
 
57
- [2024-02-09] Version 6.11.0
58
- ---------------------------
45
+ [2024-02-09] Version 7.0.0-rc.1
46
+ -------------------------------
59
47
  **Library - Chore**
60
- - [PR #710](https://github.com/twilio/twilio-ruby/pull/710): remove live media endpoint. Thanks to [@califlower](https://github.com/califlower)!
61
- - [PR #708](https://github.com/twilio/twilio-ruby/pull/708): removing oauth and autopilot references. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
48
+ - [PR #711](https://github.com/twilio/twilio-ruby/pull/711): disable-cluster-test. Thanks to [@sbansla](https://github.com/sbansla)!
49
+ - [PR #709](https://github.com/twilio/twilio-ruby/pull/709): removed ssl ca file from http client. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
62
50
 
63
51
  **Api**
64
52
  - Updated service base url for connect apps and authorized connect apps APIs **(breaking change)**
@@ -118,6 +106,11 @@ twilio-ruby changelog
118
106
  - Update Verify TOTP maturity to GA.
119
107
 
120
108
 
109
+ [2024-01-26] Version 7.0.0-rc.0
110
+ --------------------------
111
+ - Release Candidate preparation
112
+
113
+
121
114
  [2024-01-25] Version 6.10.0
122
115
  ---------------------------
123
116
  **Oauth**
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.12.1'
42
+ gem 'twilio-ruby', '~> 7.0.0-rc.2'
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.12.1
48
+ gem install twilio-ruby -v 7.0.0-rc.2
49
49
  ```
50
50
 
51
51
  To build and install the development branch yourself from the latest source:
data/UPGRADE.md CHANGED
@@ -3,6 +3,16 @@
3
3
  _After `5.0.0` all `MINOR` and `MAJOR` version bumps will have upgrade notes
4
4
  posted here._
5
5
 
6
+ [2024-01-19] 6.x.x to 7.x.x
7
+ -----------------------------
8
+ ### Overview
9
+
10
+ ##### Twilio Ruby Helper Library’s major version 7.0.0-rc.x is now available. We ensured that you can upgrade to Ruby helper Library 7.0.0-rc.x version without any breaking changes
11
+
12
+ Twilio Helper libraries now support nested json body while sending requests.
13
+
14
+ To learn more about the Ruby Helper Library, check out [our docs](https://www.twilio.com/docs/libraries/ruby).
15
+
6
16
  [2023-05-03] 5.x.x to 6.x.x
7
17
  -----------------------------
8
18
  ### Overview
@@ -32,7 +32,14 @@ module Twilio
32
32
  data = ''
33
33
  unless @data.nil? || @data.empty?
34
34
  data = @method.equal?('GET') ? "\n -G" : "\n"
35
- data += @data.each.map { |key, value| "-d \"#{key}\"=\"#{value}\"" }.join("\n")
35
+ data += case @headers['Content-Type']
36
+ when 'application/x-www-form-urlencoded'
37
+ @data.each.map { |key, value| "-d \"#{key}\"=\"#{value}\"" }.join("\n")
38
+ when 'application/json'
39
+ "-d '#{JSON.generate(@data)}'"
40
+ else
41
+ @data.each.map { |key, value| "-d \"#{key}\"=\"#{value}\"" }.join("\n")
42
+ end
36
43
  end
37
44
 
38
45
  "#{auth} #{@method} #{@url}#{params}#{data}#{headers}"
@@ -9,11 +9,10 @@ module Twilio
9
9
  attr_reader :timeout, :last_response, :last_request, :connection
10
10
 
11
11
  def initialize(proxy_prot = nil, proxy_addr = nil, proxy_port = nil, proxy_user = nil, proxy_pass = nil,
12
- ssl_ca_file = nil, timeout: nil)
12
+ timeout: nil)
13
13
  @proxy_prot = proxy_prot
14
14
  @proxy_path = "#{proxy_addr}:#{proxy_port}" if proxy_addr && proxy_port
15
15
  @proxy_auth = "#{proxy_user}:#{proxy_pass}@" if proxy_pass && proxy_user
16
- @ssl_ca_file = ssl_ca_file
17
16
  @timeout = timeout
18
17
  @adapter = Faraday.default_adapter
19
18
  @configure_connection_blocks = []
@@ -27,9 +26,17 @@ module Twilio
27
26
  end
28
27
 
29
28
  def _request(request) # rubocop:disable Metrics/MethodLength
29
+ middle_ware = case request.headers['Content-Type']
30
+ when 'application/json'
31
+ :json
32
+ when 'application/x-www-form-urlencoded'
33
+ :url_encoded
34
+ else
35
+ :url_encoded
36
+ end
30
37
  @connection = Faraday.new(url: request.host + ':' + request.port.to_s, ssl: { verify: true }) do |f|
31
38
  f.options.params_encoder = Faraday::FlatParamsEncoder
32
- f.request :url_encoded
39
+ f.request(middle_ware)
33
40
  f.headers = request.headers
34
41
  if Faraday::VERSION.start_with?('2.')
35
42
  f.request(:authorization, :basic, request.auth[0], request.auth[1])
@@ -110,8 +110,6 @@ module Twilio
110
110
  end
111
111
 
112
112
 
113
- ##
114
- #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.
115
113
  class PaymentContext < InstanceContext
116
114
  ##
117
115
  # Initialize the PaymentContext
@@ -165,11 +165,7 @@ module Twilio
165
165
  # @param [String] parent_call_sid Only include calls spawned by calls with this SID.
166
166
  # @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
167
167
  # @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
168
- # @param [Time] start_time_before Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
169
- # @param [Time] start_time_after Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
170
168
  # @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
171
- # @param [Time] end_time_before Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
172
- # @param [Time] end_time_after Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
173
169
  # @param [Integer] limit Upper limit for the number of records to return. stream()
174
170
  # guarantees to never return more than limit. Default is no limit
175
171
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -177,18 +173,14 @@ module Twilio
177
173
  # but a limit is defined, stream() will attempt to read the limit with the most
178
174
  # efficient page size, i.e. min(limit, 1000)
179
175
  # @return [Array] Array of up to limit results
180
- def list(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, start_time_before: :unset, start_time_after: :unset, end_time: :unset, end_time_before: :unset, end_time_after: :unset, limit: nil, page_size: nil)
176
+ def list(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, end_time: :unset, limit: nil, page_size: nil)
181
177
  self.stream(
182
178
  to: to,
183
179
  from: from,
184
180
  parent_call_sid: parent_call_sid,
185
181
  status: status,
186
182
  start_time: start_time,
187
- start_time_before: start_time_before,
188
- start_time_after: start_time_after,
189
183
  end_time: end_time,
190
- end_time_before: end_time_before,
191
- end_time_after: end_time_after,
192
184
  limit: limit,
193
185
  page_size: page_size
194
186
  ).entries
@@ -203,11 +195,7 @@ module Twilio
203
195
  # @param [String] parent_call_sid Only include calls spawned by calls with this SID.
204
196
  # @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
205
197
  # @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
206
- # @param [Time] start_time_before Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
207
- # @param [Time] start_time_after Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
208
198
  # @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
209
- # @param [Time] end_time_before Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
210
- # @param [Time] end_time_after Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
211
199
  # @param [Integer] limit Upper limit for the number of records to return. stream()
212
200
  # guarantees to never return more than limit. Default is no limit
213
201
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -215,7 +203,7 @@ module Twilio
215
203
  # but a limit is defined, stream() will attempt to read the limit with the most
216
204
  # efficient page size, i.e. min(limit, 1000)
217
205
  # @return [Enumerable] Enumerable that will yield up to limit results
218
- def stream(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, start_time_before: :unset, start_time_after: :unset, end_time: :unset, end_time_before: :unset, end_time_after: :unset, limit: nil, page_size: nil)
206
+ def stream(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, end_time: :unset, limit: nil, page_size: nil)
219
207
  limits = @version.read_limits(limit, page_size)
220
208
 
221
209
  page = self.page(
@@ -224,11 +212,7 @@ module Twilio
224
212
  parent_call_sid: parent_call_sid,
225
213
  status: status,
226
214
  start_time: start_time,
227
- start_time_before: start_time_before,
228
- start_time_after: start_time_after,
229
215
  end_time: end_time,
230
- end_time_before: end_time_before,
231
- end_time_after: end_time_after,
232
216
  page_size: limits[:page_size], )
233
217
 
234
218
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
@@ -256,27 +240,19 @@ module Twilio
256
240
  # @param [String] parent_call_sid Only include calls spawned by calls with this SID.
257
241
  # @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
258
242
  # @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
259
- # @param [Time] start_time_before Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
260
- # @param [Time] start_time_after Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
261
243
  # @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
262
- # @param [Time] end_time_before Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
263
- # @param [Time] end_time_after Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
264
244
  # @param [String] page_token PageToken provided by the API
265
245
  # @param [Integer] page_number Page Number, this value is simply for client state
266
246
  # @param [Integer] page_size Number of records to return, defaults to 50
267
247
  # @return [Page] Page of CallInstance
268
- def page(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, start_time_before: :unset, start_time_after: :unset, end_time: :unset, end_time_before: :unset, end_time_after: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
248
+ def page(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, end_time: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
269
249
  params = Twilio::Values.of({
270
250
  'To' => to,
271
251
  'From' => from,
272
252
  'ParentCallSid' => parent_call_sid,
273
253
  'Status' => status,
274
254
  'StartTime' => Twilio.serialize_iso8601_datetime(start_time),
275
- 'StartTime<' => Twilio.serialize_iso8601_datetime(start_time_before),
276
- 'StartTime>' => Twilio.serialize_iso8601_datetime(start_time_after),
277
255
  'EndTime' => Twilio.serialize_iso8601_datetime(end_time),
278
- 'EndTime<' => Twilio.serialize_iso8601_datetime(end_time_before),
279
- 'EndTime>' => Twilio.serialize_iso8601_datetime(end_time_after),
280
256
  'PageToken' => page_token,
281
257
  'Page' => page_number,
282
258
  'PageSize' => page_size,
@@ -38,11 +38,7 @@ module Twilio
38
38
  # Unlike stream(), this operation is eager and will load `limit` records into
39
39
  # memory before returning.
40
40
  # @param [Date] date_created The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
41
- # @param [Date] date_created_before The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
42
- # @param [Date] date_created_after The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
43
41
  # @param [Date] date_updated The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
44
- # @param [Date] date_updated_before The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
45
- # @param [Date] date_updated_after The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
46
42
  # @param [String] friendly_name The string that identifies the Conference resources to read.
47
43
  # @param [Status] status The status of the resources to read. Can be: `init`, `in-progress`, or `completed`.
48
44
  # @param [Integer] limit Upper limit for the number of records to return. stream()
@@ -52,14 +48,10 @@ module Twilio
52
48
  # but a limit is defined, stream() will attempt to read the limit with the most
53
49
  # efficient page size, i.e. min(limit, 1000)
54
50
  # @return [Array] Array of up to limit results
55
- def list(date_created: :unset, date_created_before: :unset, date_created_after: :unset, date_updated: :unset, date_updated_before: :unset, date_updated_after: :unset, friendly_name: :unset, status: :unset, limit: nil, page_size: nil)
51
+ def list(date_created: :unset, date_updated: :unset, friendly_name: :unset, status: :unset, limit: nil, page_size: nil)
56
52
  self.stream(
57
53
  date_created: date_created,
58
- date_created_before: date_created_before,
59
- date_created_after: date_created_after,
60
54
  date_updated: date_updated,
61
- date_updated_before: date_updated_before,
62
- date_updated_after: date_updated_after,
63
55
  friendly_name: friendly_name,
64
56
  status: status,
65
57
  limit: limit,
@@ -72,11 +64,7 @@ module Twilio
72
64
  # This operation lazily loads records as efficiently as possible until the limit
73
65
  # is reached.
74
66
  # @param [Date] date_created The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
75
- # @param [Date] date_created_before The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
76
- # @param [Date] date_created_after The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
77
67
  # @param [Date] date_updated The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
78
- # @param [Date] date_updated_before The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
79
- # @param [Date] date_updated_after The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
80
68
  # @param [String] friendly_name The string that identifies the Conference resources to read.
81
69
  # @param [Status] status The status of the resources to read. Can be: `init`, `in-progress`, or `completed`.
82
70
  # @param [Integer] limit Upper limit for the number of records to return. stream()
@@ -86,16 +74,12 @@ module Twilio
86
74
  # but a limit is defined, stream() will attempt to read the limit with the most
87
75
  # efficient page size, i.e. min(limit, 1000)
88
76
  # @return [Enumerable] Enumerable that will yield up to limit results
89
- def stream(date_created: :unset, date_created_before: :unset, date_created_after: :unset, date_updated: :unset, date_updated_before: :unset, date_updated_after: :unset, friendly_name: :unset, status: :unset, limit: nil, page_size: nil)
77
+ def stream(date_created: :unset, date_updated: :unset, friendly_name: :unset, status: :unset, limit: nil, page_size: nil)
90
78
  limits = @version.read_limits(limit, page_size)
91
79
 
92
80
  page = self.page(
93
81
  date_created: date_created,
94
- date_created_before: date_created_before,
95
- date_created_after: date_created_after,
96
82
  date_updated: date_updated,
97
- date_updated_before: date_updated_before,
98
- date_updated_after: date_updated_after,
99
83
  friendly_name: friendly_name,
100
84
  status: status,
101
85
  page_size: limits[:page_size], )
@@ -121,25 +105,17 @@ module Twilio
121
105
  # Retrieve a single page of ConferenceInstance records from the API.
122
106
  # Request is executed immediately.
123
107
  # @param [Date] date_created The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
124
- # @param [Date] date_created_before The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
125
- # @param [Date] date_created_after The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
126
108
  # @param [Date] date_updated The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
127
- # @param [Date] date_updated_before The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
128
- # @param [Date] date_updated_after The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
129
109
  # @param [String] friendly_name The string that identifies the Conference resources to read.
130
110
  # @param [Status] status The status of the resources to read. Can be: `init`, `in-progress`, or `completed`.
131
111
  # @param [String] page_token PageToken provided by the API
132
112
  # @param [Integer] page_number Page Number, this value is simply for client state
133
113
  # @param [Integer] page_size Number of records to return, defaults to 50
134
114
  # @return [Page] Page of ConferenceInstance
135
- def page(date_created: :unset, date_created_before: :unset, date_created_after: :unset, date_updated: :unset, date_updated_before: :unset, date_updated_after: :unset, friendly_name: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
115
+ def page(date_created: :unset, date_updated: :unset, friendly_name: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
136
116
  params = Twilio::Values.of({
137
117
  'DateCreated' => Twilio.serialize_iso8601_date(date_created),
138
- 'DateCreated<' => Twilio.serialize_iso8601_date(date_created_before),
139
- 'DateCreated>' => Twilio.serialize_iso8601_date(date_created_after),
140
118
  'DateUpdated' => Twilio.serialize_iso8601_date(date_updated),
141
- 'DateUpdated<' => Twilio.serialize_iso8601_date(date_updated_before),
142
- 'DateUpdated>' => Twilio.serialize_iso8601_date(date_updated_after),
143
119
  'FriendlyName' => friendly_name,
144
120
  'Status' => status,
145
121
  'PageToken' => page_token,
@@ -128,8 +128,6 @@ module Twilio
128
128
  end
129
129
 
130
130
 
131
- ##
132
- #PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
133
131
  class AssignedAddOnExtensionContext < InstanceContext
134
132
  ##
135
133
  # Initialize the AssignedAddOnExtensionContext
@@ -149,8 +149,6 @@ module Twilio
149
149
  end
150
150
 
151
151
 
152
- ##
153
- #PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
154
152
  class AssignedAddOnContext < InstanceContext
155
153
  ##
156
154
  # Initialize the AssignedAddOnContext
@@ -127,8 +127,6 @@ module Twilio
127
127
  # @param [String] to Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
128
128
  # @param [String] from Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
129
129
  # @param [Time] date_sent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
130
- # @param [Time] date_sent_before Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
131
- # @param [Time] date_sent_after Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
132
130
  # @param [Integer] limit Upper limit for the number of records to return. stream()
133
131
  # guarantees to never return more than limit. Default is no limit
134
132
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -136,13 +134,11 @@ module Twilio
136
134
  # but a limit is defined, stream() will attempt to read the limit with the most
137
135
  # efficient page size, i.e. min(limit, 1000)
138
136
  # @return [Array] Array of up to limit results
139
- def list(to: :unset, from: :unset, date_sent: :unset, date_sent_before: :unset, date_sent_after: :unset, limit: nil, page_size: nil)
137
+ def list(to: :unset, from: :unset, date_sent: :unset, limit: nil, page_size: nil)
140
138
  self.stream(
141
139
  to: to,
142
140
  from: from,
143
141
  date_sent: date_sent,
144
- date_sent_before: date_sent_before,
145
- date_sent_after: date_sent_after,
146
142
  limit: limit,
147
143
  page_size: page_size
148
144
  ).entries
@@ -155,8 +151,6 @@ module Twilio
155
151
  # @param [String] to Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
156
152
  # @param [String] from Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
157
153
  # @param [Time] date_sent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
158
- # @param [Time] date_sent_before Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
159
- # @param [Time] date_sent_after Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
160
154
  # @param [Integer] limit Upper limit for the number of records to return. stream()
161
155
  # guarantees to never return more than limit. Default is no limit
162
156
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -164,15 +158,13 @@ module Twilio
164
158
  # but a limit is defined, stream() will attempt to read the limit with the most
165
159
  # efficient page size, i.e. min(limit, 1000)
166
160
  # @return [Enumerable] Enumerable that will yield up to limit results
167
- def stream(to: :unset, from: :unset, date_sent: :unset, date_sent_before: :unset, date_sent_after: :unset, limit: nil, page_size: nil)
161
+ def stream(to: :unset, from: :unset, date_sent: :unset, limit: nil, page_size: nil)
168
162
  limits = @version.read_limits(limit, page_size)
169
163
 
170
164
  page = self.page(
171
165
  to: to,
172
166
  from: from,
173
167
  date_sent: date_sent,
174
- date_sent_before: date_sent_before,
175
- date_sent_after: date_sent_after,
176
168
  page_size: limits[:page_size], )
177
169
 
178
170
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
@@ -198,19 +190,15 @@ module Twilio
198
190
  # @param [String] to Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
199
191
  # @param [String] from Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
200
192
  # @param [Time] date_sent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
201
- # @param [Time] date_sent_before Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
202
- # @param [Time] date_sent_after Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
203
193
  # @param [String] page_token PageToken provided by the API
204
194
  # @param [Integer] page_number Page Number, this value is simply for client state
205
195
  # @param [Integer] page_size Number of records to return, defaults to 50
206
196
  # @return [Page] Page of MessageInstance
207
- def page(to: :unset, from: :unset, date_sent: :unset, date_sent_before: :unset, date_sent_after: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
197
+ def page(to: :unset, from: :unset, date_sent: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
208
198
  params = Twilio::Values.of({
209
199
  'To' => to,
210
200
  'From' => from,
211
201
  'DateSent' => Twilio.serialize_iso8601_datetime(date_sent),
212
- 'DateSent<' => Twilio.serialize_iso8601_datetime(date_sent_before),
213
- 'DateSent>' => Twilio.serialize_iso8601_datetime(date_sent_after),
214
202
  'PageToken' => page_token,
215
203
  'Page' => page_number,
216
204
  'PageSize' => page_size,
@@ -87,6 +87,11 @@ module Twilio
87
87
  @media ||= Media.new self
88
88
  end
89
89
  ##
90
+ # Access the PreviewMessaging Twilio Domain
91
+ def preview_messaging
92
+ @preview_messaging ||= PreviewMessaging.new self
93
+ end
94
+ ##
90
95
  # Access the Messaging Twilio Domain
91
96
  def messaging
92
97
  @messaging ||= Messaging.new self