twilio-ruby 6.12.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test-and-deploy.yml +5 -5
  3. data/CHANGES.md +47 -1
  4. data/README.md +2 -2
  5. data/UPGRADE.md +11 -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 +22 -22
  10. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +7 -0
  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/client.rb +8 -3
  14. data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +184 -0
  15. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +11 -13
  16. data/lib/twilio-ruby/rest/content/v1/content.rb +422 -3
  17. data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +1 -1
  18. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +1 -1
  19. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +6 -6
  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/plugin.rb +6 -0
  28. data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +0 -2
  29. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +0 -2
  30. data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +0 -2
  31. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +0 -2
  32. data/lib/twilio-ruby/rest/insights/v1/room.rb +0 -2
  33. data/lib/twilio-ruby/rest/intelligence/v2/service.rb +0 -2
  34. data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +0 -2
  35. data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +0 -2
  36. data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +0 -2
  37. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +0 -2
  38. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +0 -2
  39. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +0 -2
  40. data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +0 -2
  41. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +0 -2
  42. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +0 -2
  43. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +0 -2
  44. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +0 -2
  45. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +0 -2
  46. data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +0 -2
  47. data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +0 -2
  48. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +0 -2
  49. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +0 -2
  50. data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -2
  51. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +0 -2
  52. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +0 -2
  53. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +0 -2
  54. data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +0 -2
  55. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +0 -2
  56. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +0 -2
  57. data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +0 -2
  58. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +0 -2
  59. data/lib/twilio-ruby/rest/notify/v1/credential.rb +0 -2
  60. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +0 -2
  61. data/lib/twilio-ruby/rest/notify/v1/service.rb +0 -2
  62. data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +16 -3
  63. data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +127 -0
  64. data/lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb +0 -2
  65. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +134 -0
  66. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +7 -2
  67. data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +0 -2
  68. data/lib/twilio-ruby/rest/numbers/v1.rb +12 -0
  69. data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +0 -2
  70. data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +16 -3
  71. data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +0 -2
  72. data/lib/twilio-ruby/rest/oauth/v1/authorize.rb +143 -0
  73. data/lib/twilio-ruby/rest/oauth/v1/token.rb +181 -0
  74. data/lib/twilio-ruby/rest/oauth/v1.rb +46 -0
  75. data/lib/twilio-ruby/rest/{media.rb → oauth.rb} +1 -1
  76. data/lib/twilio-ruby/rest/{media_base.rb → oauth_base.rb} +6 -6
  77. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +0 -2
  78. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +0 -2
  79. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +0 -2
  80. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +0 -2
  81. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +0 -2
  82. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +0 -2
  83. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +0 -2
  84. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +0 -2
  85. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +0 -2
  86. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +0 -2
  87. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +0 -2
  88. data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -2
  89. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -2
  90. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -2
  91. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -2
  92. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -2
  93. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -2
  94. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -2
  95. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -2
  96. data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -2
  97. data/lib/twilio-ruby/rest/preview/wireless/command.rb +0 -2
  98. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +0 -2
  99. data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +0 -2
  100. data/lib/twilio-ruby/rest/preview/wireless/sim.rb +0 -2
  101. data/lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb +164 -0
  102. data/lib/twilio-ruby/rest/preview_messaging/v1/message.rb +235 -0
  103. data/lib/twilio-ruby/rest/preview_messaging/v1.rb +46 -0
  104. data/lib/twilio-ruby/rest/preview_messaging.rb +12 -0
  105. data/lib/twilio-ruby/rest/preview_messaging_base.rb +38 -0
  106. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +0 -2
  107. data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +0 -2
  108. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +0 -2
  109. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +0 -2
  110. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +0 -2
  111. data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +0 -2
  112. data/lib/twilio-ruby/rest/proxy/v1/service.rb +0 -2
  113. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +0 -2
  114. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +0 -2
  115. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +0 -2
  116. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +0 -2
  117. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +0 -2
  118. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +0 -2
  119. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +0 -2
  120. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +0 -2
  121. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +0 -2
  122. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +0 -2
  123. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +0 -2
  124. data/lib/twilio-ruby/rest/serverless/v1/service.rb +0 -2
  125. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +0 -2
  126. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +0 -2
  127. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +0 -2
  128. data/lib/twilio-ruby/rest/supersim/v1/network.rb +0 -2
  129. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +0 -2
  130. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +0 -2
  131. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +0 -2
  132. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +0 -2
  133. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +163 -0
  134. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +8 -8
  135. data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +95 -4
  136. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +9 -3
  137. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +9 -3
  138. data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +18 -18
  139. data/lib/twilio-ruby/rest/trusthub/v1.rb +12 -3
  140. data/lib/twilio-ruby/rest/verify/v2/form.rb +0 -2
  141. data/lib/twilio-ruby/rest/verify/v2/safelist.rb +0 -2
  142. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +0 -2
  143. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +0 -2
  144. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +0 -2
  145. data/lib/twilio-ruby/version.rb +1 -1
  146. metadata +16 -9
  147. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +0 -424
  148. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +0 -407
  149. data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +0 -255
  150. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +0 -436
  151. data/lib/twilio-ruby/rest/media/v1.rb +0 -79
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ee4da7ce236e476901cca417a590ffbcc5dd90d
4
- data.tar.gz: 7e0d20132c3cb96f03f2c6e3d42a9074ebf357fc
3
+ metadata.gz: 5a4a38fd0b06c066f1abfd88ed48d87b6851d097
4
+ data.tar.gz: 31af551dd25aef5f129dc1c8d27046bb4431ca7b
5
5
  SHA512:
6
- metadata.gz: 4a7a0c2959b45c56f2ee701ecca64a21a6ec596e2a8b36c1761b32ce58e0669fecd3f2c61d0f749b5bcd8bea34c52e3e898231e3dad8eec421cd8b1637807575
7
- data.tar.gz: 529e0dd106814e77a1b0b8588da5b7077dbe12a18ccfd69383e7caa7df23e75e41ba3bb7172c24c67bbd167a6aac101b19fc3f70785be0d31c09c231c3304627
6
+ metadata.gz: 7bbd9b7c5ad4e884713d782cf99b7fca4db1e0dbcd70f6031e47b4f46eddbe9d5ccbf6a6133c2ba1158de4a395195d8b7d9510008afb6b9f73db5809fe921c27
7
+ data.tar.gz: 4972f0169ad698d82348b659a6c50b5e59374e7537f40b99c48f0993a0b24d44ed022928a3379ada39c95c7e347e4d9cb953755cfe281ca8e5660c448b2e4ea0
@@ -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,5 +1,51 @@
1
1
  twilio-ruby changelog
2
- =====================
2
+ =====================
3
+
4
+ [2024-04-01] Version 7.0.0
5
+ --------------------------
6
+ **Note:** This release contains breaking changes, check our [upgrade guide](./UPGRADE.md#2024-01-19-6xx-to-7xx) for detailed migration notes.
7
+
8
+ **Library - Feature**
9
+ - [PR #719](https://github.com/twilio/twilio-ruby/pull/719): Merge '7.0.0-rc' into main. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)! **(breaking change)**
10
+
11
+ **Library - Chore**
12
+ - [PR #715](https://github.com/twilio/twilio-ruby/pull/715): remove media endpoint. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
13
+
14
+ **Api**
15
+ - Add property `queue_time` to conference participant resource
16
+ - Update RiskCheck documentation
17
+ - Correct call filtering by start and end time documentation, clarifying that times are UTC.
18
+
19
+ **Flex**
20
+ - Adding optional parameter to `plugins`
21
+
22
+ **Media**
23
+ - Remove API: MediaProcessor
24
+
25
+ **Messaging**
26
+ - Remove Sending-Window due to test failure
27
+ - Add Sending-Window as a response property to Messaging Services, gated by a beta feature flag
28
+
29
+ **Numbers**
30
+ - Correct valid_until_date field to be visible in Bundles resource
31
+ - Adding port_in_status field to the Port In resource and phone_number_status and sid fields to the Port In Phone Number resource
32
+
33
+ **Oauth**
34
+ - Modified token endpoint response
35
+ - Added refresh_token and scope as optional parameter to token endpoint
36
+ - Add new APIs for vendor authorize and token endpoints
37
+
38
+ **Trusthub**
39
+ - Add update inquiry endpoint in compliance_registration.
40
+ - Add new field in themeSetId in compliance_registration.
41
+
42
+ **Voice**
43
+ - Correct call filtering by start and end time documentation, clarifying that times are UTC.
44
+
45
+ **Twiml**
46
+ - Add support for new Google voices (Q1 2024) for `Say` verb - gu-IN voices
47
+ - Add support for new Amazon Polly and Google voices (Q1 2024) for `Say` verb - Niamh (en-IE) and Sofie (da-DK) voices
48
+
3
49
 
4
50
  [2024-03-12] Version 6.12.1
5
51
  ---------------------------
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'
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
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,17 @@
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 is now available. We ensured that you can upgrade to Ruby helper Library 7.0.0 version without any breaking changes of existing apis
11
+
12
+ Behind the scenes Ruby Helper is now auto-generated via OpenAPI with this release. This enables us to rapidly add new features and enhance consistency across versions and languages.
13
+ We're pleased to inform you that version 7.0.0 adds support for the application/json content type in the request body.
14
+
15
+ To learn more about the Ruby Helper Library, check out [our docs](https://www.twilio.com/docs/libraries/ruby).
16
+
6
17
  [2023-05-03] 5.x.x to 6.x.x
7
18
  -----------------------------
8
19
  ### 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
@@ -164,12 +164,12 @@ module Twilio
164
164
  # @param [String] from Only include calls from this phone number, SIP address, Client identifier or SIM SID.
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
- # @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
- # @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.
167
+ # @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, 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 UTC, 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 UTC, 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
+ # @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, 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 UTC, 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 UTC, 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
173
  # @param [Integer] limit Upper limit for the number of records to return. stream()
174
174
  # guarantees to never return more than limit. Default is no limit
175
175
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -202,12 +202,12 @@ module Twilio
202
202
  # @param [String] from Only include calls from this phone number, SIP address, Client identifier or SIM SID.
203
203
  # @param [String] parent_call_sid Only include calls spawned by calls with this SID.
204
204
  # @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
205
- # @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
- # @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.
205
+ # @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, 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 UTC, 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 UTC, 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
+ # @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, 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 UTC, 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 UTC, 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
211
  # @param [Integer] limit Upper limit for the number of records to return. stream()
212
212
  # guarantees to never return more than limit. Default is no limit
213
213
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -255,12 +255,12 @@ module Twilio
255
255
  # @param [String] from Only include calls from this phone number, SIP address, Client identifier or SIM SID.
256
256
  # @param [String] parent_call_sid Only include calls spawned by calls with this SID.
257
257
  # @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
258
- # @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
- # @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.
258
+ # @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, 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 UTC, 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 UTC, 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
+ # @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, 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 UTC, 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 UTC, 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
264
  # @param [String] page_token PageToken provided by the API
265
265
  # @param [Integer] page_number Page Number, this value is simply for client state
266
266
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -649,13 +649,13 @@ module Twilio
649
649
  end
650
650
 
651
651
  ##
652
- # @return [Time] The date and time in GMT that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
652
+ # @return [Time] The date and time in UTC that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
653
653
  def date_created
654
654
  @properties['date_created']
655
655
  end
656
656
 
657
657
  ##
658
- # @return [Time] The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
658
+ # @return [Time] The date and time in UTC that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
659
659
  def date_updated
660
660
  @properties['date_updated']
661
661
  end
@@ -709,13 +709,13 @@ module Twilio
709
709
  end
710
710
 
711
711
  ##
712
- # @return [Time] The start time of the call, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call has not yet been dialed.
712
+ # @return [Time] The start time of the call, given as UTC in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call has not yet been dialed.
713
713
  def start_time
714
714
  @properties['start_time']
715
715
  end
716
716
 
717
717
  ##
718
- # @return [Time] The time the call ended, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call did not complete successfully.
718
+ # @return [Time] The time the call ended, given as UTC in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call did not complete successfully.
719
719
  def end_time
720
720
  @properties['end_time']
721
721
  end
@@ -478,6 +478,7 @@ module Twilio
478
478
  'hold' => payload['hold'],
479
479
  'start_conference_on_enter' => payload['start_conference_on_enter'],
480
480
  'status' => payload['status'],
481
+ 'queue_time' => payload['queue_time'],
481
482
  'uri' => payload['uri'],
482
483
  }
483
484
 
@@ -575,6 +576,12 @@ module Twilio
575
576
  @properties['status']
576
577
  end
577
578
 
579
+ ##
580
+ # @return [String] The wait time in milliseconds before participant's call is placed. Only available in the response to a create participant request.
581
+ def queue_time
582
+ @properties['queue_time']
583
+ end
584
+
578
585
  ##
579
586
  # @return [String] The URI of the resource, relative to `https://api.twilio.com`.
580
587
  def uri
@@ -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
@@ -82,9 +82,9 @@ module Twilio
82
82
  @lookups ||= Lookups.new self
83
83
  end
84
84
  ##
85
- # Access the Media Twilio Domain
86
- def media
87
- @media ||= Media.new self
85
+ # Access the PreviewMessaging Twilio Domain
86
+ def preview_messaging
87
+ @preview_messaging ||= PreviewMessaging.new self
88
88
  end
89
89
  ##
90
90
  # Access the Messaging Twilio Domain
@@ -112,6 +112,11 @@ module Twilio
112
112
  @numbers ||= Numbers.new self
113
113
  end
114
114
  ##
115
+ # Access the Oauth Twilio Domain
116
+ def oauth
117
+ @oauth ||= Oauth.new self
118
+ end
119
+ ##
115
120
  # Access the Preview Twilio Domain
116
121
  def preview
117
122
  @preview ||= Preview.new self
@@ -0,0 +1,184 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Content
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 Content < ContentBase
19
+ class V1 < Version
20
+ class ContentContext < InstanceContext
21
+
22
+ class ApprovalCreateList < ListResource
23
+
24
+ class ContentApprovalRequest
25
+ # @param [name]: [String] Name of the template.
26
+ # @param [category]: [String] A WhatsApp recognized template category.
27
+ attr_accessor :name, :category
28
+ def initialize(payload)
29
+ @name = payload["name"]
30
+ @category = payload["category"]
31
+ end
32
+ def to_json(options = {})
33
+ {
34
+ name: @name,
35
+ category: @category,
36
+ }.to_json(options)
37
+ end
38
+ end
39
+
40
+ ##
41
+ # Initialize the ApprovalCreateList
42
+ # @param [Version] version Version that contains the resource
43
+ # @return [ApprovalCreateList] ApprovalCreateList
44
+ def initialize(version, content_sid: nil)
45
+ super(version)
46
+ # Path Solution
47
+ @solution = { content_sid: content_sid }
48
+ @uri = "/Content/#{@solution[:content_sid]}/ApprovalRequests/whatsapp"
49
+
50
+ end
51
+ ##
52
+ # Create the ApprovalCreateInstance
53
+ # @param [ContentApprovalRequest] content_approval_request
54
+ # @return [ApprovalCreateInstance] Created ApprovalCreateInstance
55
+ def create(content_approval_request: nil
56
+ )
57
+
58
+ headers = Twilio::Values.of({"Content-Type"=> "application/json"})
59
+ payload = @version.create('POST', @uri, data: content_approval_request.to_json, headers: headers)
60
+ ApprovalCreateInstance.new(
61
+ @version,
62
+ payload,
63
+ content_sid: @solution[:content_sid],
64
+ )
65
+ end
66
+
67
+
68
+
69
+
70
+ # Provide a user friendly representation
71
+ def to_s
72
+ '#<Twilio.Content.V1.ApprovalCreateList>'
73
+ end
74
+ end
75
+
76
+ class ApprovalCreatePage < Page
77
+ ##
78
+ # Initialize the ApprovalCreatePage
79
+ # @param [Version] version Version that contains the resource
80
+ # @param [Response] response Response from the API
81
+ # @param [Hash] solution Path solution for the resource
82
+ # @return [ApprovalCreatePage] ApprovalCreatePage
83
+ def initialize(version, response, solution)
84
+ super(version, response)
85
+
86
+ # Path Solution
87
+ @solution = solution
88
+ end
89
+
90
+ ##
91
+ # Build an instance of ApprovalCreateInstance
92
+ # @param [Hash] payload Payload response from the API
93
+ # @return [ApprovalCreateInstance] ApprovalCreateInstance
94
+ def get_instance(payload)
95
+ ApprovalCreateInstance.new(@version, payload, content_sid: @solution[:content_sid])
96
+ end
97
+
98
+ ##
99
+ # Provide a user friendly representation
100
+ def to_s
101
+ '<Twilio.Content.V1.ApprovalCreatePage>'
102
+ end
103
+ end
104
+ class ApprovalCreateInstance < InstanceResource
105
+ ##
106
+ # Initialize the ApprovalCreateInstance
107
+ # @param [Version] version Version that contains the resource
108
+ # @param [Hash] payload payload that contains response from Twilio
109
+ # @param [String] account_sid The SID of the
110
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this ApprovalCreate
111
+ # resource.
112
+ # @param [String] sid The SID of the Call resource to fetch.
113
+ # @return [ApprovalCreateInstance] ApprovalCreateInstance
114
+ def initialize(version, payload , content_sid: nil)
115
+ super(version)
116
+
117
+ # Marshaled Properties
118
+ @properties = {
119
+ 'name' => payload['name'],
120
+ 'category' => payload['category'],
121
+ 'content_type' => payload['content_type'],
122
+ 'status' => payload['status'],
123
+ 'rejection_reason' => payload['rejection_reason'],
124
+ 'allow_category_change' => payload['allow_category_change'],
125
+ }
126
+ end
127
+
128
+
129
+ ##
130
+ # @return [String]
131
+ def name
132
+ @properties['name']
133
+ end
134
+
135
+ ##
136
+ # @return [String]
137
+ def category
138
+ @properties['category']
139
+ end
140
+
141
+ ##
142
+ # @return [String]
143
+ def content_type
144
+ @properties['content_type']
145
+ end
146
+
147
+ ##
148
+ # @return [String]
149
+ def status
150
+ @properties['status']
151
+ end
152
+
153
+ ##
154
+ # @return [String]
155
+ def rejection_reason
156
+ @properties['rejection_reason']
157
+ end
158
+
159
+ ##
160
+ # @return [Boolean]
161
+ def allow_category_change
162
+ @properties['allow_category_change']
163
+ end
164
+
165
+ ##
166
+ # Provide a user friendly representation
167
+ def to_s
168
+ "<Twilio.Content.V1.ApprovalCreateInstance>"
169
+ end
170
+
171
+ ##
172
+ # Provide a detailed, user friendly representation
173
+ def inspect
174
+ "<Twilio.Content.V1.ApprovalCreateInstance>"
175
+ end
176
+ end
177
+
178
+ end
179
+ end
180
+ end
181
+ end
182
+ end
183
+
184
+
@@ -25,10 +25,10 @@ module Twilio
25
25
  # Initialize the ApprovalFetchList
26
26
  # @param [Version] version Version that contains the resource
27
27
  # @return [ApprovalFetchList] ApprovalFetchList
28
- def initialize(version, sid: nil)
28
+ def initialize(version, content_sid: nil)
29
29
  super(version)
30
30
  # Path Solution
31
- @solution = { sid: sid }
31
+ @solution = { content_sid: content_sid }
32
32
 
33
33
 
34
34
  end
@@ -42,20 +42,18 @@ module Twilio
42
42
  end
43
43
 
44
44
 
45
- ##
46
- #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.
47
45
  class ApprovalFetchContext < InstanceContext
48
46
  ##
49
47
  # Initialize the ApprovalFetchContext
50
48
  # @param [Version] version Version that contains the resource
51
- # @param [String] sid The Twilio-provided string that uniquely identifies the Content resource whose approval information to fetch.
49
+ # @param [String] content_sid The Twilio-provided string that uniquely identifies the Content resource whose approval information to fetch.
52
50
  # @return [ApprovalFetchContext] ApprovalFetchContext
53
- def initialize(version, sid)
51
+ def initialize(version, content_sid)
54
52
  super(version)
55
53
 
56
54
  # Path Solution
57
- @solution = { sid: sid, }
58
- @uri = "/Content/#{@solution[:sid]}/ApprovalRequests"
55
+ @solution = { content_sid: content_sid, }
56
+ @uri = "/Content/#{@solution[:content_sid]}/ApprovalRequests"
59
57
 
60
58
 
61
59
  end
@@ -69,7 +67,7 @@ module Twilio
69
67
  ApprovalFetchInstance.new(
70
68
  @version,
71
69
  payload,
72
- sid: @solution[:sid],
70
+ content_sid: @solution[:content_sid],
73
71
  )
74
72
  end
75
73
 
@@ -108,7 +106,7 @@ module Twilio
108
106
  # @param [Hash] payload Payload response from the API
109
107
  # @return [ApprovalFetchInstance] ApprovalFetchInstance
110
108
  def get_instance(payload)
111
- ApprovalFetchInstance.new(@version, payload, sid: @solution[:sid])
109
+ ApprovalFetchInstance.new(@version, payload, content_sid: @solution[:content_sid])
112
110
  end
113
111
 
114
112
  ##
@@ -127,7 +125,7 @@ module Twilio
127
125
  # resource.
128
126
  # @param [String] sid The SID of the Call resource to fetch.
129
127
  # @return [ApprovalFetchInstance] ApprovalFetchInstance
130
- def initialize(version, payload , sid: nil)
128
+ def initialize(version, payload , content_sid: nil)
131
129
  super(version)
132
130
 
133
131
  # Marshaled Properties
@@ -140,7 +138,7 @@ module Twilio
140
138
 
141
139
  # Context
142
140
  @instance_context = nil
143
- @params = { 'sid' => sid || @properties['sid'] , }
141
+ @params = { 'content_sid' => content_sid || @properties['content_sid'] , }
144
142
  end
145
143
 
146
144
  ##
@@ -149,7 +147,7 @@ module Twilio
149
147
  # @return [ApprovalFetchContext] CallContext for this CallInstance
150
148
  def context
151
149
  unless @instance_context
152
- @instance_context = ApprovalFetchContext.new(@version , @params['sid'])
150
+ @instance_context = ApprovalFetchContext.new(@version , @params['content_sid'])
153
151
  end
154
152
  @instance_context
155
153
  end