twilio-ruby 5.46.0 → 5.50.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +112 -0
  3. data/README.md +20 -6
  4. data/lib/twilio-ruby/rest/api.rb +1 -1
  5. data/lib/twilio-ruby/rest/api/v2010.rb +5 -4
  6. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +10 -1
  7. data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +4 -4
  8. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +4 -4
  9. data/lib/twilio-ruby/rest/autopilot/v1.rb +5 -4
  10. data/lib/twilio-ruby/rest/bulkexports/v1.rb +10 -8
  11. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +14 -0
  12. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +14 -0
  13. data/lib/twilio-ruby/rest/chat/v1.rb +10 -8
  14. data/lib/twilio-ruby/rest/chat/v2.rb +10 -8
  15. data/lib/twilio-ruby/rest/client.rb +8 -1
  16. data/lib/twilio-ruby/rest/conversations/v1.rb +25 -20
  17. data/lib/twilio-ruby/rest/events/v1.rb +20 -16
  18. data/lib/twilio-ruby/rest/events/v1/event_type.rb +4 -4
  19. data/lib/twilio-ruby/rest/events/v1/schema.rb +4 -4
  20. data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +4 -4
  21. data/lib/twilio-ruby/rest/events/v1/sink.rb +6 -5
  22. data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +3 -3
  23. data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +3 -3
  24. data/lib/twilio-ruby/rest/events/v1/subscription.rb +15 -8
  25. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +133 -6
  26. data/lib/twilio-ruby/rest/fax/v1.rb +5 -4
  27. data/lib/twilio-ruby/rest/flex_api/v1.rb +15 -12
  28. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
  29. data/lib/twilio-ruby/rest/insights.rb +1 -1
  30. data/lib/twilio-ruby/rest/insights/v1.rb +11 -9
  31. data/lib/twilio-ruby/rest/insights/v1/room.rb +55 -43
  32. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +22 -22
  33. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +10 -8
  34. data/lib/twilio-ruby/rest/ip_messaging/v2.rb +10 -8
  35. data/lib/twilio-ruby/rest/lookups/v1.rb +5 -4
  36. data/lib/twilio-ruby/rest/messaging.rb +8 -0
  37. data/lib/twilio-ruby/rest/messaging/v1.rb +21 -4
  38. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +328 -0
  39. data/lib/twilio-ruby/rest/monitor/v1.rb +10 -8
  40. data/lib/twilio-ruby/rest/notify/v1.rb +10 -8
  41. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +10 -8
  42. data/lib/twilio-ruby/rest/preview/deployed_devices.rb +5 -4
  43. data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +10 -8
  44. data/lib/twilio-ruby/rest/preview/marketplace.rb +10 -8
  45. data/lib/twilio-ruby/rest/preview/sync.rb +5 -4
  46. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +4 -8
  47. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +5 -4
  48. data/lib/twilio-ruby/rest/preview/understand.rb +5 -4
  49. data/lib/twilio-ruby/rest/preview/wireless.rb +15 -12
  50. data/lib/twilio-ruby/rest/proxy/v1.rb +5 -4
  51. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -1
  52. data/lib/twilio-ruby/rest/serverless/v1.rb +5 -4
  53. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +11 -1
  54. data/lib/twilio-ruby/rest/studio/v1.rb +5 -4
  55. data/lib/twilio-ruby/rest/studio/v2.rb +5 -4
  56. data/lib/twilio-ruby/rest/studio/v2/flow.rb +4 -12
  57. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +0 -8
  58. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +0 -8
  59. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +0 -8
  60. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +0 -8
  61. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -9
  62. data/lib/twilio-ruby/rest/studio/v2/flow/test_user.rb +10 -16
  63. data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +6 -11
  64. data/lib/twilio-ruby/rest/supersim.rb +9 -0
  65. data/lib/twilio-ruby/rest/supersim/v1.rb +41 -20
  66. data/lib/twilio-ruby/rest/supersim/v1/command.rb +4 -4
  67. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +86 -13
  68. data/lib/twilio-ruby/rest/supersim/v1/network.rb +4 -4
  69. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +4 -4
  70. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +4 -4
  71. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +4 -4
  72. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +371 -0
  73. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +3 -3
  74. data/lib/twilio-ruby/rest/sync/v1.rb +5 -4
  75. data/lib/twilio-ruby/rest/sync/v1/service.rb +0 -8
  76. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +13 -32
  77. data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +0 -8
  78. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +9 -23
  79. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +38 -45
  80. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +0 -8
  81. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +9 -23
  82. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +38 -47
  83. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +0 -8
  84. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +9 -23
  85. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +0 -6
  86. data/lib/twilio-ruby/rest/taskrouter/v1.rb +5 -4
  87. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +12 -8
  88. data/lib/twilio-ruby/rest/trunking/v1.rb +5 -4
  89. data/lib/twilio-ruby/rest/trusthub.rb +100 -0
  90. data/lib/twilio-ruby/rest/trusthub/v1.rb +146 -0
  91. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +523 -0
  92. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb +359 -0
  93. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +330 -0
  94. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb +328 -0
  95. data/lib/twilio-ruby/rest/trusthub/v1/end_user.rb +356 -0
  96. data/lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb +271 -0
  97. data/lib/twilio-ruby/rest/trusthub/v1/policies.rb +262 -0
  98. data/lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb +369 -0
  99. data/lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb +271 -0
  100. data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +523 -0
  101. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb +359 -0
  102. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +330 -0
  103. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb +328 -0
  104. data/lib/twilio-ruby/rest/verify.rb +9 -0
  105. data/lib/twilio-ruby/rest/verify/v2.rb +26 -8
  106. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +4 -3
  107. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +64 -13
  108. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +329 -0
  109. data/lib/twilio-ruby/rest/video/v1.rb +20 -16
  110. data/lib/twilio-ruby/rest/video/v1/room.rb +4 -1
  111. data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +0 -6
  112. data/lib/twilio-ruby/rest/voice/v1.rb +20 -16
  113. data/lib/twilio-ruby/rest/wireless/v1.rb +15 -12
  114. data/lib/twilio-ruby/twiml/voice_response.rb +38 -8
  115. data/lib/twilio-ruby/version.rb +1 -1
  116. data/spec/integration/api/v2010/account/conference_spec.rb +302 -44
  117. data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +4 -16
  118. data/spec/integration/api/v2010/account/message_spec.rb +37 -0
  119. data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +6 -2
  120. data/spec/integration/bulkexports/v1/export/job_spec.rb +3 -1
  121. data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +134 -0
  122. data/spec/integration/flex_api/v1/configuration_spec.rb +24 -0
  123. data/spec/integration/messaging/v1/brand_registration_spec.rb +143 -0
  124. data/spec/integration/preview/sync/service/document_spec.rb +1 -3
  125. data/spec/integration/serverless/v1/service/build_spec.rb +12 -2
  126. data/spec/integration/supersim/v1/fleet_spec.rb +20 -0
  127. data/spec/integration/supersim/v1/sms_command_spec.rb +184 -0
  128. data/spec/integration/sync/v1/service/document_spec.rb +1 -3
  129. data/spec/integration/taskrouter/v1/workspace/task_spec.rb +3 -1
  130. data/spec/integration/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment_spec.rb +192 -0
  131. data/spec/integration/trusthub/v1/customer_profiles/customer_profiles_entity_assignments_spec.rb +186 -0
  132. data/spec/integration/trusthub/v1/customer_profiles/customer_profiles_evaluations_spec.rb +615 -0
  133. data/spec/integration/trusthub/v1/customer_profiles_spec.rb +255 -0
  134. data/spec/integration/trusthub/v1/end_user_spec.rb +247 -0
  135. data/spec/integration/trusthub/v1/end_user_type_spec.rb +176 -0
  136. data/spec/integration/trusthub/v1/policies_spec.rb +252 -0
  137. data/spec/integration/trusthub/v1/supporting_document_spec.rb +235 -0
  138. data/spec/integration/trusthub/v1/supporting_document_type_spec.rb +159 -0
  139. data/spec/integration/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment_spec.rb +192 -0
  140. data/spec/integration/trusthub/v1/trust_products/trust_products_entity_assignments_spec.rb +186 -0
  141. data/spec/integration/trusthub/v1/trust_products/trust_products_evaluations_spec.rb +615 -0
  142. data/spec/integration/trusthub/v1/trust_products_spec.rb +255 -0
  143. data/spec/integration/verify/v2/service/entity/factor_spec.rb +3 -3
  144. data/spec/integration/verify/v2/verification_attempt_spec.rb +146 -0
  145. data/spec/integration/video/v1/room_spec.rb +39 -0
  146. metadata +52 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec2f94329e022fb33cd55a694e8ef8638b465b3b1b9f336b392308a30ff4b6c0
4
- data.tar.gz: 5cae812b5d92082cc9f1f5d9c00c4cb87e2cf07daf1f9cf53539d5be8b4dde77
3
+ metadata.gz: f7085537c4bc32f13dec0386382dcc5d1d06d5e54e8d2cb68d248a14333c5cbc
4
+ data.tar.gz: 4040e5e1656acea416f745a91d6bcd7fe804b0bbc48c00c60c6f81d294420d3a
5
5
  SHA512:
6
- metadata.gz: 4a4d102e1238ceffe7b22101af1e23573a90e47ff8accead506f303794791e9d6adbd48b302583e5ae15ddcf2d5fc2336ccfeba3676cf8f2767e2c0a10388141
7
- data.tar.gz: 86eb8eb1f84acc4f13c8574430a5e86ea63b150b537263c3af0fbb878a7d0dcf2c4d7de998e94356cb8c171a8f029bef66866ef3f2973981e2e519730b2cfe1f
6
+ metadata.gz: e2385b8246c00836a3628f996c8318bcd4314d8987e2792cc48e084627a2cdf2ad9ff1bc3eff48b762d18d3afda374c58d6f8b70ead78b4951082a528dbf98d0
7
+ data.tar.gz: decfc8a842d6e461c3bcfe4cecf8b810b3d78e0daa396b043102c49930bbc2f40d18394a0174834e2cc0a56b52a176970b3c613ee8b5c1ba13028cf08d19db37
data/CHANGES.md CHANGED
@@ -1,6 +1,118 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2021-03-24] Version 5.50.0
5
+ ---------------------------
6
+ **Api**
7
+ - Added optional parameter `CallToken` for create calls api
8
+ - Add optional property `time_limit` in the call create request.
9
+
10
+ **Bulkexports**
11
+ - adding two new fields with job api queue_position and estimated_completion_time
12
+
13
+ **Events**
14
+ - Add new endpoints to manage subscribed_events in subscriptions
15
+
16
+ **Numbers**
17
+ - Remove feature flags for RegulatoryCompliance endpoints
18
+
19
+ **Supersim**
20
+ - Add SmsCommands resource
21
+ - Add fields `SmsCommandsUrl`, `SmsCommandsMethod` and `SmsCommandsEnabled` to a Fleet resource
22
+
23
+ **Taskrouter**
24
+ - Add `If-Match` Header based on ETag for Task Update
25
+ - Add `ETag` as Response Headers to Tasks and Reservations
26
+
27
+ **Video**
28
+ - Recording rule beta flag **(breaking change)**
29
+ - [Rooms] Add RecordingRules param to Rooms
30
+
31
+
32
+ [2021-03-15] Version 5.49.0
33
+ ---------------------------
34
+ **Library - Fix**
35
+ - [PR #550](https://github.com/twilio/twilio-ruby/pull/550): regenerating with the path parameter fix. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!
36
+
37
+ **Events**
38
+ - Set maturity to beta
39
+
40
+ **Messaging**
41
+ - Adjust A2P brand registration status enum **(breaking change)**
42
+
43
+ **Studio**
44
+ - Remove internal safeguards for Studio V2 API usage now that it's GA
45
+
46
+ **Verify**
47
+ - Add support for creating and verifying totp factors. Support for totp factors is behind the `api.verify.totp` beta feature.
48
+
49
+ **Twiml**
50
+ - Add support for `<VirtualAgent>` noun
51
+
52
+
53
+ [2021-02-24] Version 5.48.0
54
+ ---------------------------
55
+ **Events**
56
+ - Update description of types in the create sink resource
57
+
58
+ **Messaging**
59
+ - Add WA template header and footer
60
+ - Remove A2P campaign and use cases API **(breaking change)**
61
+ - Add number_registration_status field to read and fetch campaign responses
62
+
63
+ **Trusthub**
64
+ - Make all resources public
65
+
66
+ **Verify**
67
+ - Verify List Attempts API endpoints added.
68
+
69
+
70
+ [2021-02-10] Version 5.47.0
71
+ ---------------------------
72
+ **Library - Fix**
73
+ - [PR #548](https://github.com/twilio/twilio-ruby/pull/548): shortcut syntax for new non-GA versions. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
74
+
75
+ **Api**
76
+ - Revert change that conference participant create `from` and `to` param to be endpoint type for supporting client identifier and sip address
77
+ - Update the conference participant create `from` and `to` param to be endpoint type for supporting client identifier and sip address
78
+
79
+ **Events**
80
+ - Documentation should state that no fields are PII
81
+
82
+ **Flex**
83
+ - Adding `notifications` and `markdown` to Flex Configuration
84
+
85
+ **Messaging**
86
+ - Add A2P use cases API
87
+ - Add Brand Registrations API
88
+ - Add Campaigns API
89
+
90
+ **Serverless**
91
+ - Add runtime field to Build response and as an optional parameter to the Build create endpoint.
92
+ - Add @twilio/runtime-handler dependency to Build response example.
93
+
94
+ **Sync**
95
+ - Remove If-Match header for Document **(breaking change)**
96
+
97
+ **Twiml**
98
+ - Add `refer_url` and `refer_method` to `Dial`.
99
+
100
+
101
+ [2021-01-27] Version 5.46.1
102
+ ---------------------------
103
+ **Library - Docs**
104
+ - [PR #547](https://github.com/twilio/twilio-ruby/pull/547): Document how to use an API Key. Thanks to [@davetron5000](https://github.com/davetron5000)!
105
+
106
+ **Studio**
107
+ - Studio V2 API is now GA
108
+
109
+ **Supersim**
110
+ - Allow updating `CommandsUrl` and `CommandsMethod` on a Fleet
111
+
112
+ **Twiml**
113
+ - Add `status_callback` and `status_callback_method` to `Stream`.
114
+
115
+
4
116
  [2021-01-13] Version 5.46.0
5
117
  ---------------------------
6
118
  **Library - Docs**
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # twilio-ruby
2
2
 
3
- [![Build Status](https://img.shields.io/travis/twilio/twilio-ruby.svg)][travis]
3
+ [![Build Status](https://img.shields.io/travis/com/twilio/twilio-ruby.svg)][travis]
4
4
  [![Gem Version](https://img.shields.io/gem/v/twilio-ruby.svg)](https://rubygems.org/gems/twilio-ruby)
5
5
  [![Learn with TwilioQuest](https://img.shields.io/static/v1?label=TwilioQuest&message=Learn%20to%20contribute%21&color=F22F46&labelColor=1f243c&style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAASFBMVEUAAAAZGRkcHBwjIyMoKCgAAABgYGBoaGiAgICMjIyzs7PJycnMzMzNzc3UoBfd3d3m5ubqrhfrMEDu7u739/f4vSb/3AD///9tbdyEAAAABXRSTlMAAAAAAMJrBrEAAAKoSURBVHgB7ZrRcuI6EESdyxXGYoNFvMD//+l2bSszRgyUYpFAsXOeiJGmj4NkuWx1Qeh+Ekl9DgEXOBwOx+Px5xyQhDykfgq4wG63MxxaR4ddIkg6Ul3g84vCIcjPBA5gmUMeXESrlukuoK33+33uID8TWeLAdOWsKpJYzwVMB7bOzYSGOciyUlXSn0/ABXTosJ1M1SbypZ4O4MbZuIDMU02PMbauhhHMHXbmebmALIiEbbbbbUrpF1gwE9kFfRNAJaP+FQEXCCTGyJ4ngDrjOFo3jEL5JdqjF/pueR4cCeCGgAtwmuRS6gDwaRiGvu+DMFwSBLTE3+jF8JyuV1okPZ+AC4hDFhCHyHQjdjPHUKFDlHSJkHQXMB3KpSwXNGJPcwwTdZiXlRN0gSp0zpWxNtM0beYE0nRH6QIbO7rawwXaBYz0j78gxjokDuv12gVeUuBD0MDi0OQCLvDaAho4juP1Q/jkAncXqIcCfd+7gAu4QLMACCLxpRsSuQh0igu0C9Svhi7weAGZg50L3IE3cai4IfkNZAC8dfdhsUD3CgKBVC9JE5ABAFzg4QL/taYPAAWrHdYcgfLaIgAXWJ7OV38n1LEF8tt2TH29E+QAoDoO5Ve/LtCQDmKM9kPbvCEBApK+IXzbcSJ0cIGF6e8gpcRhUDogWZ8JnaWjPXc/fNnBBUKRngiHgTUSivSzDRDgHZQOLvBQgf8rRt+VdBUUhwkU6VpJ+xcOwQUqZr+mR0kvBUgv6cB4+37hQAkXqE8PwGisGhJtN4xAHMzrsgvI7rccXqSvKh6jltGlrOHA3Xk1At3LC4QiPdX9/0ndHpGVvTjR4bZA1ypAKgVcwE5vx74ulwIugDt8e/X7JgfkucBMIAr26ndnB4UCLnDOqvteQsHlgX9N4A+c4cW3DXSPbwAAAABJRU5ErkJggg==)](https://twil.io/learn-open-source)
6
6
 
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
34
34
  To install using [Bundler][bundler] grab the latest stable version:
35
35
 
36
36
  ```ruby
37
- gem 'twilio-ruby', '~> 5.46.0'
37
+ gem 'twilio-ruby', '~> 5.50.0'
38
38
  ```
39
39
 
40
40
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
41
41
 
42
42
  ```bash
43
- gem install twilio-ruby -v 5.46.0
43
+ gem install twilio-ruby -v 5.50.0
44
44
  ```
45
45
 
46
46
  To build and install the development branch yourself from the latest source:
@@ -66,6 +66,20 @@ auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'
66
66
  @client = Twilio::REST::Client.new account_sid, auth_token
67
67
  ```
68
68
 
69
+ ### Use An API Key
70
+
71
+ ```ruby
72
+ require 'twilio-ruby'
73
+
74
+ # put your own credentials here
75
+ account_sid = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
76
+ api_key_sid = 'zzzzzzzzzzzzzzzzzzzzzz'
77
+ api_key_secret = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'
78
+
79
+ # set up a client to talk to the Twilio REST API using an API Key
80
+ @client = Twilio::REST::Client.new api_key_sid, api_key_secret, account_sid
81
+ ```
82
+
69
83
  ### Specify a Region and/or Edge
70
84
 
71
85
  To take advantage of Twilio's [Global Infrastructure](https://www.twilio.com/docs/global-infrastructure), specify the target Region and/or Edge for the client:
@@ -81,6 +95,8 @@ To take advantage of Twilio's [Global Infrastructure](https://www.twilio.com/doc
81
95
  @client.edge = 'sydney'
82
96
  ```
83
97
 
98
+ This will result in the `hostname` transforming from `api.twilio.com` to `api.sydney.au1.twilio.com`.
99
+
84
100
  ### Enable Debug logging
85
101
 
86
102
  In order to enable debug logging, pass in a 'logger' instance to the client with the level set to at least 'DEBUG'
@@ -97,8 +113,6 @@ myLogger.level = Logger::DEBUG
97
113
  @client.logger = myLogger
98
114
  ```
99
115
 
100
- This will result in the `hostname` transforming from `api.twilio.com` to `api.sydney.au1.twilio.com`.
101
-
102
116
  ### Make a Call
103
117
 
104
118
  ```ruby
@@ -234,7 +248,7 @@ If you've instead found a bug in the library or would like new features added, g
234
248
  [bundler]: https://bundler.io
235
249
  [rubygems]: https://rubygems.org
236
250
  [gem]: https://rubygems.org/gems/twilio
237
- [travis]: https://travis-ci.org/twilio/twilio-ruby
251
+ [travis]: https://travis-ci.com/twilio/twilio-ruby
238
252
  [upgrade]: https://github.com/twilio/twilio-ruby/wiki/Ruby-Version-5.x-Upgrade-Guide
239
253
  [issues]: https://github.com/twilio/twilio-ruby/issues
240
254
  [faraday]: https://github.com/lostisland/faraday
@@ -86,7 +86,7 @@ module Twilio
86
86
  end
87
87
 
88
88
  ##
89
- # @param [String] sid The unique string that that we created to identify this Call
89
+ # @param [String] sid The unique string that we created to identify this Call
90
90
  # resource.
91
91
  # @return [Twilio::REST::Api::V2010::AccountContext::CallInstance] if sid was passed.
92
92
  # @return [Twilio::REST::Api::V2010::AccountContext::CallList]
@@ -26,11 +26,12 @@ module Twilio
26
26
  # @return [Twilio::REST::Api::V2010::AccountList]
27
27
  def accounts(sid=:unset)
28
28
  if sid.nil?
29
- raise ArgumentError, 'sid cannot be nil'
30
- elsif sid == :unset
31
- @accounts ||= AccountList.new self
29
+ raise ArgumentError, 'sid cannot be nil'
30
+ end
31
+ if sid == :unset
32
+ @accounts ||= AccountList.new self
32
33
  else
33
- AccountContext.new(self, sid)
34
+ AccountContext.new(self, sid)
34
35
  end
35
36
  end
36
37
 
@@ -142,10 +142,17 @@ module Twilio
142
142
  # @param [String] call_reason The Reason for the outgoing call. Use it to specify
143
143
  # the purpose of the call that is presented on the called party's phone. (Branded
144
144
  # Calls Beta)
145
+ # @param [String] call_token A token string needed to invoke a forwarded call. A
146
+ # call_token is generated when an incoming call is received on a Twilio number.
147
+ # this field should be populated by the incoming call's call_token to make this
148
+ # outgoing call as a forwarded call of incoming call. A forwarded call should bear
149
+ # the same caller-id of incoming call.
145
150
  # @param [String] recording_track The audio track to record for the call. Can be:
146
151
  # `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the
147
152
  # audio that is received by Twilio. `outbound` records the audio that is generated
148
153
  # from Twilio. `both` records the audio that is received and generated by Twilio.
154
+ # @param [String] time_limit The maximum duration of the call in seconds.
155
+ # Constraints depend on account and configuration.
149
156
  # @param [String] url The absolute URL that returns the TwiML instructions for the
150
157
  # call. We will call this URL using the `method` when the call connects. For more
151
158
  # information, see the {Url
@@ -157,7 +164,7 @@ module Twilio
157
164
  # @param [String] application_sid The SID of the Application resource that will
158
165
  # handle the call, if the call will be handled by an application.
159
166
  # @return [CallInstance] Created CallInstance
160
- def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, recording_track: :unset, url: :unset, twiml: :unset, application_sid: :unset)
167
+ def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, call_token: :unset, recording_track: :unset, time_limit: :unset, url: :unset, twiml: :unset, application_sid: :unset)
161
168
  data = Twilio::Values.of({
162
169
  'To' => to,
163
170
  'From' => from,
@@ -191,7 +198,9 @@ module Twilio
191
198
  'AsyncAmdStatusCallbackMethod' => async_amd_status_callback_method,
192
199
  'Byoc' => byoc,
193
200
  'CallReason' => call_reason,
201
+ 'CallToken' => call_token,
194
202
  'RecordingTrack' => recording_track,
203
+ 'TimeLimit' => time_limit,
195
204
  })
196
205
 
197
206
  payload = @version.create('POST', @uri, data: data)
@@ -19,8 +19,8 @@ module Twilio
19
19
  # @param [String] account_sid The SID of the
20
20
  # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Call
21
21
  # resource.
22
- # @param [String] call_sid The unique string that that we created to identify this
23
- # Call resource.
22
+ # @param [String] call_sid The unique string that we created to identify this Call
23
+ # resource.
24
24
  # @return [EventList] EventList
25
25
  def initialize(version, account_sid: nil, call_sid: nil)
26
26
  super(version)
@@ -159,8 +159,8 @@ module Twilio
159
159
  # @param [String] account_sid The SID of the
160
160
  # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Call
161
161
  # resource.
162
- # @param [String] call_sid The unique string that that we created to identify this
163
- # Call resource.
162
+ # @param [String] call_sid The unique string that we created to identify this Call
163
+ # resource.
164
164
  # @return [EventInstance] EventInstance
165
165
  def initialize(version, payload, account_sid: nil, call_sid: nil)
166
166
  super(version)
@@ -19,8 +19,8 @@ module Twilio
19
19
  # @param [String] account_sid The unique id of the
20
20
  # {Account}[https://www.twilio.com/docs/iam/api/account] responsible for this
21
21
  # resource.
22
- # @param [String] call_sid The unique string that that we created to identify this
23
- # Call resource.
22
+ # @param [String] call_sid The unique string that we created to identify this Call
23
+ # resource.
24
24
  # @return [FeedbackList] FeedbackList
25
25
  def initialize(version, account_sid: nil, call_sid: nil)
26
26
  super(version)
@@ -176,8 +176,8 @@ module Twilio
176
176
  # @param [String] account_sid The unique id of the
177
177
  # {Account}[https://www.twilio.com/docs/iam/api/account] responsible for this
178
178
  # resource.
179
- # @param [String] call_sid The unique string that that we created to identify this
180
- # Call resource.
179
+ # @param [String] call_sid The unique string that we created to identify this Call
180
+ # resource.
181
181
  # @return [FeedbackInstance] FeedbackInstance
182
182
  def initialize(version, payload, account_sid: nil, call_sid: nil)
183
183
  super(version)
@@ -26,11 +26,12 @@ module Twilio
26
26
  # @return [Twilio::REST::Autopilot::V1::AssistantList]
27
27
  def assistants(sid=:unset)
28
28
  if sid.nil?
29
- raise ArgumentError, 'sid cannot be nil'
30
- elsif sid == :unset
31
- @assistants ||= AssistantList.new self
29
+ raise ArgumentError, 'sid cannot be nil'
30
+ end
31
+ if sid == :unset
32
+ @assistants ||= AssistantList.new self
32
33
  else
33
- AssistantContext.new(self, sid)
34
+ AssistantContext.new(self, sid)
34
35
  end
35
36
  end
36
37
 
@@ -26,11 +26,12 @@ module Twilio
26
26
  # @return [Twilio::REST::Bulkexports::V1::ExportList]
27
27
  def exports(resource_type=:unset)
28
28
  if resource_type.nil?
29
- raise ArgumentError, 'resource_type cannot be nil'
30
- elsif resource_type == :unset
31
- @exports ||= ExportList.new self
29
+ raise ArgumentError, 'resource_type cannot be nil'
30
+ end
31
+ if resource_type == :unset
32
+ @exports ||= ExportList.new self
32
33
  else
33
- ExportContext.new(self, resource_type)
34
+ ExportContext.new(self, resource_type)
34
35
  end
35
36
  end
36
37
 
@@ -41,11 +42,12 @@ module Twilio
41
42
  # @return [Twilio::REST::Bulkexports::V1::ExportConfigurationList]
42
43
  def export_configuration(resource_type=:unset)
43
44
  if resource_type.nil?
44
- raise ArgumentError, 'resource_type cannot be nil'
45
- elsif resource_type == :unset
46
- @export_configuration ||= ExportConfigurationList.new self
45
+ raise ArgumentError, 'resource_type cannot be nil'
46
+ end
47
+ if resource_type == :unset
48
+ @export_configuration ||= ExportConfigurationList.new self
47
49
  else
48
- ExportConfigurationContext.new(self, resource_type)
50
+ ExportConfigurationContext.new(self, resource_type)
49
51
  end
50
52
  end
51
53
 
@@ -202,6 +202,8 @@ module Twilio
202
202
  'email' => payload['email'],
203
203
  'job_sid' => payload['job_sid'],
204
204
  'details' => payload['details'],
205
+ 'job_queue_position' => payload['job_queue_position'],
206
+ 'estimated_completion_time' => payload['estimated_completion_time'],
205
207
  }
206
208
  end
207
209
 
@@ -259,6 +261,18 @@ module Twilio
259
261
  @properties['details']
260
262
  end
261
263
 
264
+ ##
265
+ # @return [String] This is the job position from the 1st in line. Your queue position will never increase. As jobs ahead of yours in the queue are processed, the queue position number will decrease
266
+ def job_queue_position
267
+ @properties['job_queue_position']
268
+ end
269
+
270
+ ##
271
+ # @return [String] this is the time estimated until your job is complete. This is calculated each time you request the job list. The time is calculated based on the current rate of job completion (which may vary) and your job queue position
272
+ def estimated_completion_time
273
+ @properties['estimated_completion_time']
274
+ end
275
+
262
276
  ##
263
277
  # Provide a user friendly representation
264
278
  def to_s
@@ -136,6 +136,8 @@ module Twilio
136
136
  'webhook_method' => payload['webhook_method'],
137
137
  'email' => payload['email'],
138
138
  'url' => payload['url'],
139
+ 'job_queue_position' => payload['job_queue_position'],
140
+ 'estimated_completion_time' => payload['estimated_completion_time'],
139
141
  }
140
142
 
141
143
  # Context
@@ -214,6 +216,18 @@ module Twilio
214
216
  @properties['url']
215
217
  end
216
218
 
219
+ ##
220
+ # @return [String] This is the job position from the 1st in line. Your queue position will never increase. As jobs ahead of yours in the queue are processed, the queue position number will decrease
221
+ def job_queue_position
222
+ @properties['job_queue_position']
223
+ end
224
+
225
+ ##
226
+ # @return [String] this is the time estimated until your job is complete. This is calculated each time you request the job list. The time is calculated based on the current rate of job completion (which may vary) and your job queue position
227
+ def estimated_completion_time
228
+ @properties['estimated_completion_time']
229
+ end
230
+
217
231
  ##
218
232
  # Fetch the JobInstance
219
233
  # @return [JobInstance] Fetched JobInstance
@@ -26,11 +26,12 @@ module Twilio
26
26
  # @return [Twilio::REST::Chat::V1::CredentialList]
27
27
  def credentials(sid=:unset)
28
28
  if sid.nil?
29
- raise ArgumentError, 'sid cannot be nil'
30
- elsif sid == :unset
31
- @credentials ||= CredentialList.new self
29
+ raise ArgumentError, 'sid cannot be nil'
30
+ end
31
+ if sid == :unset
32
+ @credentials ||= CredentialList.new self
32
33
  else
33
- CredentialContext.new(self, sid)
34
+ CredentialContext.new(self, sid)
34
35
  end
35
36
  end
36
37
 
@@ -41,11 +42,12 @@ module Twilio
41
42
  # @return [Twilio::REST::Chat::V1::ServiceList]
42
43
  def services(sid=:unset)
43
44
  if sid.nil?
44
- raise ArgumentError, 'sid cannot be nil'
45
- elsif sid == :unset
46
- @services ||= ServiceList.new self
45
+ raise ArgumentError, 'sid cannot be nil'
46
+ end
47
+ if sid == :unset
48
+ @services ||= ServiceList.new self
47
49
  else
48
- ServiceContext.new(self, sid)
50
+ ServiceContext.new(self, sid)
49
51
  end
50
52
  end
51
53