twilio-ruby 7.4.5 → 7.6.2

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 (59) hide show
  1. checksums.yaml +4 -4
  2. data/.dockerignore +1 -1
  3. data/.github/workflows/test-and-deploy.yml +2 -2
  4. data/CHANGES.md +88 -0
  5. data/Dockerfile +2 -1
  6. data/README.md +2 -2
  7. data/lib/twilio-ruby/http/client_token_manager.rb +2 -2
  8. data/lib/twilio-ruby/http/org_token_manager.rb +2 -2
  9. data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +1 -1
  10. data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +4 -4
  11. data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +5 -5
  12. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +9 -3
  13. data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +1 -1
  14. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +1 -1
  15. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +4 -4
  16. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +1 -1
  17. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +3 -0
  18. data/lib/twilio-ruby/rest/client.rb +5 -0
  19. data/lib/twilio-ruby/rest/content/v1/content.rb +11 -2
  20. data/lib/twilio-ruby/rest/events/v1/subscription.rb +3 -19
  21. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +50 -1
  22. data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +0 -39
  23. data/lib/twilio-ruby/rest/iam/v1/{key.rb → new_api_key.rb} +20 -20
  24. data/lib/twilio-ruby/rest/iam/v1/token.rb +186 -0
  25. data/lib/twilio-ruby/rest/iam/v1.rb +10 -4
  26. data/lib/twilio-ruby/rest/knowledge/v1/knowledge/chunk.rb +232 -0
  27. data/lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb +213 -0
  28. data/lib/twilio-ruby/rest/knowledge/v1/knowledge.rb +617 -0
  29. data/lib/twilio-ruby/rest/knowledge/v1.rb +49 -0
  30. data/lib/twilio-ruby/rest/knowledge.rb +6 -0
  31. data/lib/twilio-ruby/rest/knowledge_base.rb +38 -0
  32. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +2 -2
  33. data/lib/twilio-ruby/rest/{preview/sync/service.rb → messaging/v2/channels_sender.rb} +189 -226
  34. data/lib/twilio-ruby/rest/{preview/sync.rb → messaging/v2.rb} +13 -13
  35. data/lib/twilio-ruby/rest/messaging_base.rb +6 -1
  36. data/lib/twilio-ruby/rest/monitor/v1/event.rb +1 -1
  37. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +3 -3
  38. data/lib/twilio-ruby/rest/preview_base.rb +0 -5
  39. data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +7 -0
  40. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +7 -0
  41. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +7 -0
  42. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +2 -2
  43. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +2 -2
  44. data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
  45. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +1 -1
  46. data/lib/twilio-ruby/rest/video/v1/room.rb +6 -0
  47. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +4 -1
  48. data/lib/twilio-ruby/twiml/voice_response.rb +24 -14
  49. data/lib/twilio-ruby/version.rb +1 -1
  50. data/twilio-ruby.gemspec +0 -2
  51. metadata +12 -41
  52. data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -407
  53. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -472
  54. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -467
  55. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -407
  56. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -444
  57. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -470
  58. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -407
  59. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -444
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 619d3a6713b7b6f33c44d24de3dce37e52e4c698
4
- data.tar.gz: 993c12964af11fad24601bfeca3e281e5cb7ae1e
3
+ metadata.gz: 1f321f5183bb9ab541e4744c4a2a213cc0946181
4
+ data.tar.gz: e7985074741cbbf76e57097bad449f6414438285
5
5
  SHA512:
6
- metadata.gz: 0616330d6da95abbfb8b450beea2b3a81cc1b361c90b22225afd6dced81a1ccbc4ba83fac594517b8ce87e0e7fa52364014e15bcc876c17631279cd5565043b1
7
- data.tar.gz: 165d87b36bed7e7bd27a01b2d033553a6719ebb3c27220ea9e0f1b6dd6abc20cd12c23aba8130a854cb417c959a8fa81b95f6e25b0df91dbbe0d006c78717666
6
+ metadata.gz: e1d83e1a70972240293d5515935f372a84a7bdf226da8f5529707f331abd74024039105156a3288f17d78ed2bb2862fb0e06aa1dde66d283b86dd7e8e6c88997
7
+ data.tar.gz: 6bd6e7ca9ea2d99e9863f3859aaea80ea3e015988be4f39d4951a06233fc52665715ca8e54b01899a8f22f47dc156ed00435de5f5942a0e52499f5f996359746
data/.dockerignore CHANGED
@@ -1 +1 @@
1
- Gemfile.lock
1
+ Gemfile.lock
@@ -17,7 +17,7 @@ jobs:
17
17
  timeout-minutes: 20
18
18
  strategy:
19
19
  matrix:
20
- ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', 'ruby-head', 'jruby-9.3', 'jruby-9.4' ]
20
+ ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', 'jruby-9.3', 'jruby-9.4' ]
21
21
  steps:
22
22
  - name: Checkout twilio-ruby
23
23
  uses: actions/checkout@v3
@@ -40,7 +40,7 @@ jobs:
40
40
 
41
41
  - name: Run linter
42
42
  run: bundle exec rubocop -d --cache true --parallel
43
- if: ${{ matrix.ruby != '2.4' }}
43
+ if: ${{ matrix.ruby != '2.4'}}
44
44
 
45
45
  - name: Run Unit Tests
46
46
  run: make test
data/CHANGES.md CHANGED
@@ -1,6 +1,94 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2025-05-29] Version 7.6.2
5
+ --------------------------
6
+ **Library - Chore**
7
+ - [PR #749](https://github.com/twilio/twilio-ruby/pull/749): move from preview_iam to iam token endpoint. Thanks to [@manisha1997](https://github.com/manisha1997)!
8
+ - [PR #748](https://github.com/twilio/twilio-ruby/pull/748): removing ruby-head from CI. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
9
+
10
+ **Api**
11
+ - Added several usage category enums to `usage_record` API
12
+
13
+ **Numbers**
14
+ - Update the porting documentation
15
+
16
+ **Verify**
17
+ - Update `ienum` type for Channels in Verify Attempts API
18
+
19
+
20
+ [2025-05-13] Version 7.6.1
21
+ --------------------------
22
+ **Accounts**
23
+ - Changes to add date_of_consent param in Bulk Consent API
24
+
25
+ **Api**
26
+ - Change `friendly_name`, `date_created` and `date_updated` properties to type `string`.
27
+
28
+ **Twiml**
29
+ - Update twiml definition for `<ConversationRelay>` and `<Assistant>`
30
+
31
+
32
+ [2025-05-05] Version 7.6.0
33
+ --------------------------
34
+ **Library - Chore**
35
+ - [PR #742](https://github.com/twilio/twilio-ruby/pull/742): remove ostruct and benchmark from gemspec. Thanks to [@oehlschl](https://github.com/oehlschl)!
36
+
37
+ **Api**
38
+ - Add `response_key` for `Usage Triggers` fetch endpoint.
39
+
40
+ **Flex**
41
+ - Add Update Interaction API
42
+ - Adding `webhook_ttid` as optional parameter in Interactions API
43
+
44
+ **Serverless**
45
+ - Add node22 as a valid Build runtime
46
+ - Add node20 as a valid Build runtime
47
+
48
+ **Video**
49
+ - removed `transcribe_participants_on_connect` and `transcriptions_configuration` from the room resource **(breaking change)**
50
+ - Added `transcribe_participants_on_connect` and `transcriptions_configuration` to the room resource
51
+
52
+
53
+ [2025-04-07] Version 7.5.2
54
+ --------------------------
55
+ **Studio**
56
+ - Add documentation for parent_step_sid field in Step resource
57
+
58
+
59
+ [2025-03-20] Version 7.5.1
60
+ --------------------------
61
+ **Accounts**
62
+ - Update Safelist API docs as part of prefix supoort
63
+
64
+ **Flex**
65
+ - Removing `first_name`, `last_name`, and `friendly_name` from the Flex User API
66
+
67
+ **Messaging**
68
+ - Add missing tests under transaction/phone_numbers and transaction/short_code
69
+
70
+
71
+ [2025-03-11] Version 7.5.0
72
+ --------------------------
73
+ **Library - Feature**
74
+ - [PR #745](https://github.com/twilio/twilio-ruby/pull/745): MVR ready. Thanks to [@manisha1997](https://github.com/manisha1997)!
75
+
76
+ **Library - Chore**
77
+ - [PR #744](https://github.com/twilio/twilio-ruby/pull/744): create image with required files. Thanks to [@sbansla](https://github.com/sbansla)!
78
+
79
+ **Api**
80
+ - Add the missing `emergency_enabled` field for `Address Service` endpoints
81
+
82
+ **Messaging**
83
+ - Add missing enums for A2P and TF
84
+
85
+ **Numbers**
86
+ - add missing enum values to hosted_number_order_status
87
+
88
+ **Twiml**
89
+ - Convert Twiml Attribute `speechModel` of type enum to string **(breaking change)**
90
+
91
+
4
92
  [2025-02-20] Version 7.4.5
5
93
  --------------------------
6
94
  **Flex**
data/Dockerfile CHANGED
@@ -3,7 +3,8 @@ FROM ruby:2.4
3
3
  RUN mkdir /twilio
4
4
  WORKDIR /twilio
5
5
 
6
- COPY . .
6
+ COPY Rakefile Gemfile LICENSE README.md twilio-ruby.gemspec ./
7
+ COPY lib ./lib
7
8
 
8
9
  RUN bundle install
9
10
  RUN bundle exec rake install
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', '~> 7.4.5'
42
+ gem 'twilio-ruby', '~> 7.6.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 7.4.5
48
+ gem install twilio-ruby -v 7.6.2
49
49
  ```
50
50
 
51
51
  To build and install the development branch yourself from the latest source:
@@ -19,8 +19,8 @@ module Twilio
19
19
 
20
20
  def fetch_access_token
21
21
  client = Twilio::REST::Client.new
22
- token_instance = client.preview_iam.v1.token.create(grant_type: @grant_type,
23
- client_id: @client_id, client_secret: @client_secret)
22
+ token_instance = client.iam.v1.token.create(grant_type: @grant_type,
23
+ client_id: @client_id, client_secret: @client_secret)
24
24
  token_instance.access_token
25
25
  end
26
26
  end
@@ -19,8 +19,8 @@ module Twilio
19
19
 
20
20
  def fetch_access_token
21
21
  client = Twilio::REST::Client.new
22
- token_instance = client.preview_iam.v1.token.create(grant_type: @grant_type,
23
- client_id: @client_id, client_secret: @client_secret)
22
+ token_instance = client.iam.v1.token.create(grant_type: @grant_type,
23
+ client_id: @client_id, client_secret: @client_secret)
24
24
  token_instance.access_token
25
25
  end
26
26
  end
@@ -32,7 +32,7 @@ module Twilio
32
32
  end
33
33
  ##
34
34
  # Create the BulkConsentsInstance
35
- # @param [Array[Hash]] items This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; and `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`].
35
+ # @param [Array[Hash]] items This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`]; `date_of_consent`, an optional datetime string field in ISO-8601 format that captures the exact date and time when the user gave or revoked consent. If not provided, it will be empty.
36
36
  # @return [BulkConsentsInstance] Created BulkConsentsInstance
37
37
  def create(
38
38
  items: nil
@@ -32,7 +32,7 @@ module Twilio
32
32
  end
33
33
  ##
34
34
  # Create the SafelistInstance
35
- # @param [String] phone_number The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
35
+ # @param [String] phone_number The phone number or phone number 1k prefix to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
36
36
  # @return [SafelistInstance] Created SafelistInstance
37
37
  def create(
38
38
  phone_number: nil
@@ -57,7 +57,7 @@ module Twilio
57
57
 
58
58
  ##
59
59
  # Delete the SafelistInstance
60
- # @param [String] phone_number The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
60
+ # @param [String] phone_number The phone number or phone number 1k prefix to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
61
61
  # @return [Boolean] True if delete succeeds, false otherwise
62
62
  def delete(
63
63
  phone_number: :unset
@@ -75,7 +75,7 @@ module Twilio
75
75
 
76
76
  ##
77
77
  # Fetch the SafelistInstance
78
- # @param [String] phone_number The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
78
+ # @param [String] phone_number The phone number or phone number 1k prefix to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
79
79
  # @return [SafelistInstance] Fetched SafelistInstance
80
80
  def fetch(
81
81
  phone_number: :unset
@@ -162,7 +162,7 @@ module Twilio
162
162
  end
163
163
 
164
164
  ##
165
- # @return [String] The phone number in SafeList.
165
+ # @return [String] The phone number or phone number 1k prefix in SafeList.
166
166
  def phone_number
167
167
  @properties['phone_number']
168
168
  end
@@ -181,8 +181,8 @@ module Twilio
181
181
  'voice_fallback_method' => payload['voice_fallback_method'],
182
182
  'voice_fallback_url' => payload['voice_fallback_url'],
183
183
  'voice_caller_id_lookup' => payload['voice_caller_id_lookup'],
184
- 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
185
- 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
184
+ 'date_created' => payload['date_created'],
185
+ 'date_updated' => payload['date_updated'],
186
186
  'sms_fallback_method' => payload['sms_fallback_method'],
187
187
  'sms_fallback_url' => payload['sms_fallback_url'],
188
188
  'sms_method' => payload['sms_method'],
@@ -257,13 +257,13 @@ module Twilio
257
257
  end
258
258
 
259
259
  ##
260
- # @return [Time] The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
260
+ # @return [String] The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
261
261
  def date_created
262
262
  @properties['date_created']
263
263
  end
264
264
 
265
265
  ##
266
- # @return [Time] The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
266
+ # @return [String] The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
267
267
  def date_updated
268
268
  @properties['date_updated']
269
269
  end
@@ -299,7 +299,7 @@ module Twilio
299
299
  end
300
300
 
301
301
  ##
302
- # @return [Hash] The set of Boolean properties that indicates whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`.
302
+ # @return [ApiV2010AccountAddressDependentPhoneNumberCapabilities]
303
303
  def capabilities
304
304
  @properties['capabilities']
305
305
  end
@@ -92,6 +92,7 @@ module Twilio
92
92
  # memory before returning.
93
93
  # @param [String] customer_name The `customer_name` of the Address resources to read.
94
94
  # @param [String] friendly_name The string that identifies the Address resources to read.
95
+ # @param [Boolean] emergency_enabled Whether the address can be associated to a number for emergency calling.
95
96
  # @param [String] iso_country The ISO country code of the Address resources to read.
96
97
  # @param [Integer] limit Upper limit for the number of records to return. stream()
97
98
  # guarantees to never return more than limit. Default is no limit
@@ -100,10 +101,11 @@ module Twilio
100
101
  # but a limit is defined, stream() will attempt to read the limit with the most
101
102
  # efficient page size, i.e. min(limit, 1000)
102
103
  # @return [Array] Array of up to limit results
103
- def list(customer_name: :unset, friendly_name: :unset, iso_country: :unset, limit: nil, page_size: nil)
104
+ def list(customer_name: :unset, friendly_name: :unset, emergency_enabled: :unset, iso_country: :unset, limit: nil, page_size: nil)
104
105
  self.stream(
105
106
  customer_name: customer_name,
106
107
  friendly_name: friendly_name,
108
+ emergency_enabled: emergency_enabled,
107
109
  iso_country: iso_country,
108
110
  limit: limit,
109
111
  page_size: page_size
@@ -116,6 +118,7 @@ module Twilio
116
118
  # is reached.
117
119
  # @param [String] customer_name The `customer_name` of the Address resources to read.
118
120
  # @param [String] friendly_name The string that identifies the Address resources to read.
121
+ # @param [Boolean] emergency_enabled Whether the address can be associated to a number for emergency calling.
119
122
  # @param [String] iso_country The ISO country code of the Address resources to read.
120
123
  # @param [Integer] limit Upper limit for the number of records to return. stream()
121
124
  # guarantees to never return more than limit. Default is no limit
@@ -124,12 +127,13 @@ module Twilio
124
127
  # but a limit is defined, stream() will attempt to read the limit with the most
125
128
  # efficient page size, i.e. min(limit, 1000)
126
129
  # @return [Enumerable] Enumerable that will yield up to limit results
127
- def stream(customer_name: :unset, friendly_name: :unset, iso_country: :unset, limit: nil, page_size: nil)
130
+ def stream(customer_name: :unset, friendly_name: :unset, emergency_enabled: :unset, iso_country: :unset, limit: nil, page_size: nil)
128
131
  limits = @version.read_limits(limit, page_size)
129
132
 
130
133
  page = self.page(
131
134
  customer_name: customer_name,
132
135
  friendly_name: friendly_name,
136
+ emergency_enabled: emergency_enabled,
133
137
  iso_country: iso_country,
134
138
  page_size: limits[:page_size], )
135
139
 
@@ -155,15 +159,17 @@ module Twilio
155
159
  # Request is executed immediately.
156
160
  # @param [String] customer_name The `customer_name` of the Address resources to read.
157
161
  # @param [String] friendly_name The string that identifies the Address resources to read.
162
+ # @param [Boolean] emergency_enabled Whether the address can be associated to a number for emergency calling.
158
163
  # @param [String] iso_country The ISO country code of the Address resources to read.
159
164
  # @param [String] page_token PageToken provided by the API
160
165
  # @param [Integer] page_number Page Number, this value is simply for client state
161
166
  # @param [Integer] page_size Number of records to return, defaults to 50
162
167
  # @return [Page] Page of AddressInstance
163
- def page(customer_name: :unset, friendly_name: :unset, iso_country: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
168
+ def page(customer_name: :unset, friendly_name: :unset, emergency_enabled: :unset, iso_country: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
164
169
  params = Twilio::Values.of({
165
170
  'CustomerName' => customer_name,
166
171
  'FriendlyName' => friendly_name,
172
+ 'EmergencyEnabled' => emergency_enabled,
167
173
  'IsoCountry' => iso_country,
168
174
  'PageToken' => page_token,
169
175
  'Page' => page_number,
@@ -48,7 +48,7 @@ module Twilio
48
48
  # @param [String] speech_model Recognition model used by the transcription engine, among those supported by the provider
49
49
  # @param [String] hints A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them.
50
50
  # @param [Boolean] enable_automatic_punctuation The provider will add punctuation to recognition result
51
- # @param [String] intelligence_service The SID or unique name of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
51
+ # @param [String] intelligence_service The SID or unique name of the [Intelligence Service](https://www.twilio.com/docs/conversational-intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
52
52
  # @return [TranscriptionInstance] Created TranscriptionInstance
53
53
  def create(
54
54
  name: :unset,
@@ -42,7 +42,7 @@ module Twilio
42
42
  # @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted).
43
43
  # @param [Array[String]] status_callback_event The call progress events that we will send to the `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, and `completed`. If no event is specified, we send the `completed` status. If you want to receive multiple events, specify each one in a separate `status_callback_event` parameter. See the code sample for [monitoring call progress](https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json). If an `application_sid` is present, this parameter is ignored.
44
44
  # @param [String] status_callback_method The HTTP method we should use when calling the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
45
- # @param [String] send_digits A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example, if you connected to a company phone number and wanted to pause for one second, and then dial extension 1234 followed by the pound key, the value of this parameter would be `ww1234#`. Remember to URL-encode this string, since the '`#`' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored.
45
+ # @param [String] send_digits The string of keys to dial after connecting to the number, with a maximum length of 32 digits. Valid digits in the string include any digit (`0`-`9`), '`A`', '`B`', '`C`', '`D`', '`#`', and '`*`'. You can also use '`w`' to insert a half-second pause and '`W`' to insert a one-second pause. For example, to pause for one second after connecting and then dial extension 1234 followed by the # key, set this parameter to `W1234#`. Be sure to URL-encode this string because the '`#`' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored.
46
46
  # @param [String] timeout The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail.
47
47
  # @param [Boolean] record Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`. The `recording_url` is sent to the `status_callback` URL.
48
48
  # @param [String] recording_channels The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call.
@@ -47,7 +47,7 @@ module Twilio
47
47
  # @param [String] beep Whether to play a notification beep to the conference when the participant joins. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`.
48
48
  # @param [Boolean] start_conference_on_enter Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference.
49
49
  # @param [Boolean] end_conference_on_exit Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`.
50
- # @param [String] wait_url The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
50
+ # @param [String] wait_url The URL that Twilio calls using the `wait_method` before the conference has started. The URL may return an MP3 file, a WAV file, or a TwiML document. The default value is the URL of our standard hold music. If you do not want anything to play while waiting for the conference to start, specify an empty string by setting `wait_url` to `''`. For more details on the allowable verbs within the `waitUrl`, see the `waitUrl` attribute in the [<Conference> TwiML instruction](https://www.twilio.com/docs/voice/twiml/conference#attributes-waiturl).
51
51
  # @param [String] wait_method The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
52
52
  # @param [Boolean] early_media Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`.
53
53
  # @param [String] max_participants The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
@@ -61,7 +61,7 @@ module Twilio
61
61
  # @param [String] recording_status_callback_method The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
62
62
  # @param [String] sip_auth_username The SIP username used for authentication.
63
63
  # @param [String] sip_auth_password The SIP password for authentication.
64
- # @param [String] region The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
64
+ # @param [String] region The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `us2`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
65
65
  # @param [String] conference_recording_status_callback The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available.
66
66
  # @param [String] conference_recording_status_callback_method The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
67
67
  # @param [Array[String]] recording_status_callback_event The recording state changes that should generate a call to `recording_status_callback`. Can be: `started`, `in-progress`, `paused`, `resumed`, `stopped`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'`.
@@ -374,7 +374,7 @@ module Twilio
374
374
  # @param [String] hold_method The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`.
375
375
  # @param [String] announce_url The URL we call using the `announce_method` for an announcement to the participant. The URL may return an MP3 file, a WAV file, or a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>` verbs.
376
376
  # @param [String] announce_method The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
377
- # @param [String] wait_url The URL we call using the `wait_method` for the music to play while participants are waiting for the conference to start. The URL may return an MP3 file, a WAV file, or a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>` verbs. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
377
+ # @param [String] wait_url The URL that Twilio calls using the `wait_method` before the conference has started. The URL may return an MP3 file, a WAV file, or a TwiML document. The default value is the URL of our standard hold music. If you do not want anything to play while waiting for the conference to start, specify an empty string by setting `wait_url` to `''`. For more details on the allowable verbs within the `waitUrl`, see the `waitUrl` attribute in the [<Conference> TwiML instruction](https://www.twilio.com/docs/voice/twiml/conference#attributes-waiturl).
378
378
  # @param [String] wait_method The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
379
379
  # @param [Boolean] beep_on_exit Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`.
380
380
  # @param [Boolean] end_conference_on_exit Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`.
@@ -633,7 +633,7 @@ module Twilio
633
633
  # @param [String] hold_method The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`.
634
634
  # @param [String] announce_url The URL we call using the `announce_method` for an announcement to the participant. The URL may return an MP3 file, a WAV file, or a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>` verbs.
635
635
  # @param [String] announce_method The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
636
- # @param [String] wait_url The URL we call using the `wait_method` for the music to play while participants are waiting for the conference to start. The URL may return an MP3 file, a WAV file, or a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>` verbs. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
636
+ # @param [String] wait_url The URL that Twilio calls using the `wait_method` before the conference has started. The URL may return an MP3 file, a WAV file, or a TwiML document. The default value is the URL of our standard hold music. If you do not want anything to play while waiting for the conference to start, specify an empty string by setting `wait_url` to `''`. For more details on the allowable verbs within the `waitUrl`, see the `waitUrl` attribute in the [<Conference> TwiML instruction](https://www.twilio.com/docs/voice/twiml/conference#attributes-waiturl).
637
637
  # @param [String] wait_method The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
638
638
  # @param [Boolean] beep_on_exit Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`.
639
639
  # @param [Boolean] end_conference_on_exit Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`.
@@ -406,7 +406,7 @@ module Twilio
406
406
  end
407
407
 
408
408
  ##
409
- # @return [String] A string that represents the Twilio Region where the conference audio was mixed. May be `us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, and `jp1`. Basic conference audio will always be mixed in `us1`. Global Conference audio will be mixed nearest to the majority of participants.
409
+ # @return [String] A string that represents the Twilio Region where the conference audio was mixed. May be `us1`, `us2`, `ie1`, `de1`, `sg1`, `br1`, `au1`, and `jp1`. Basic conference audio will always be mixed in `us1`. Global Conference audio will be mixed nearest to the majority of participants.
410
410
  def region
411
411
  @properties['region']
412
412
  end
@@ -46,6 +46,7 @@ module Twilio
46
46
  # @param [AddressRetention] address_retention
47
47
  # @param [Boolean] smart_encoded Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`.
48
48
  # @param [Array[String]] persistent_action Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp).
49
+ # @param [TrafficType] traffic_type
49
50
  # @param [Boolean] shorten_urls For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided.
50
51
  # @param [ScheduleType] schedule_type
51
52
  # @param [Time] send_at The time that Twilio will send the message. Must be in ISO 8601 format.
@@ -71,6 +72,7 @@ module Twilio
71
72
  address_retention: :unset,
72
73
  smart_encoded: :unset,
73
74
  persistent_action: :unset,
75
+ traffic_type: :unset,
74
76
  shorten_urls: :unset,
75
77
  schedule_type: :unset,
76
78
  send_at: :unset,
@@ -97,6 +99,7 @@ module Twilio
97
99
  'AddressRetention' => address_retention,
98
100
  'SmartEncoded' => smart_encoded,
99
101
  'PersistentAction' => Twilio.serialize_list(persistent_action) { |e| e },
102
+ 'TrafficType' => traffic_type,
100
103
  'ShortenUrls' => shorten_urls,
101
104
  'ScheduleType' => schedule_type,
102
105
  'SendAt' => Twilio.serialize_iso8601_datetime(send_at),
@@ -92,6 +92,11 @@ module Twilio
92
92
  @ip_messaging ||= IpMessaging.new self
93
93
  end
94
94
  ##
95
+ # Access the Knowledge Twilio Domain
96
+ def knowledge
97
+ @knowledge ||= Knowledge.new self
98
+ end
99
+ ##
95
100
  # Access the Lookups Twilio Domain
96
101
  def lookups
97
102
  @lookups ||= Lookups.new self
@@ -41,13 +41,15 @@ module Twilio
41
41
  # @param [url]: [String]
42
42
  # @param [phone]: [String]
43
43
  # @param [code]: [String]
44
- attr_accessor :type, :title, :url, :phone, :code
44
+ # @param [id]: [String]
45
+ attr_accessor :type, :title, :url, :phone, :code, :id
45
46
  def initialize(payload)
46
47
  @type = payload["type"]
47
48
  @title = payload["title"]
48
49
  @url = payload["url"]
49
50
  @phone = payload["phone"]
50
51
  @code = payload["code"]
52
+ @id = payload["id"]
51
53
  end
52
54
  def to_json(options = {})
53
55
  {
@@ -56,6 +58,7 @@ module Twilio
56
58
  "url": @url,
57
59
  "phone": @phone,
58
60
  "code": @code,
61
+ "id": @id,
59
62
  }.to_json(options)
60
63
  end
61
64
  end
@@ -397,17 +400,23 @@ module Twilio
397
400
  # @param [latitude]: [Float]
398
401
  # @param [longitude]: [Float]
399
402
  # @param [label]: [String]
400
- attr_accessor :latitude, :longitude, :label
403
+ # @param [id]: [String]
404
+ # @param [address]: [String]
405
+ attr_accessor :latitude, :longitude, :label, :id, :address
401
406
  def initialize(payload)
402
407
  @latitude = payload["latitude"]
403
408
  @longitude = payload["longitude"]
404
409
  @label = payload["label"]
410
+ @id = payload["id"]
411
+ @address = payload["address"]
405
412
  end
406
413
  def to_json(options = {})
407
414
  {
408
415
  "latitude": @latitude,
409
416
  "longitude": @longitude,
410
417
  "label": @label,
418
+ "id": @id,
419
+ "address": @address,
411
420
  }.to_json(options)
412
421
  end
413
422
  end
@@ -35,20 +35,17 @@ module Twilio
35
35
  # @param [String] description A human readable description for the Subscription **This value should not contain PII.**
36
36
  # @param [String] sink_sid The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
37
37
  # @param [Array[Hash]] types An array of objects containing the subscribed Event Types
38
- # @param [Boolean] receive_events_from_subaccounts Receive events from all children accounts in the parent account subscription.
39
38
  # @return [SubscriptionInstance] Created SubscriptionInstance
40
39
  def create(
41
40
  description: nil,
42
41
  sink_sid: nil,
43
- types: nil,
44
- receive_events_from_subaccounts: :unset
42
+ types: nil
45
43
  )
46
44
 
47
45
  data = Twilio::Values.of({
48
46
  'Description' => description,
49
47
  'SinkSid' => sink_sid,
50
48
  'Types' => Twilio.serialize_list(types) { |e| Twilio.serialize_object(e) },
51
- 'ReceiveEventsFromSubaccounts' => receive_events_from_subaccounts,
52
49
  })
53
50
 
54
51
  headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
@@ -218,18 +215,15 @@ module Twilio
218
215
  # Update the SubscriptionInstance
219
216
  # @param [String] description A human readable description for the Subscription.
220
217
  # @param [String] sink_sid The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
221
- # @param [Boolean] receive_events_from_subaccounts Receive events from all children accounts in the parent account subscription.
222
218
  # @return [SubscriptionInstance] Updated SubscriptionInstance
223
219
  def update(
224
220
  description: :unset,
225
- sink_sid: :unset,
226
- receive_events_from_subaccounts: :unset
221
+ sink_sid: :unset
227
222
  )
228
223
 
229
224
  data = Twilio::Values.of({
230
225
  'Description' => description,
231
226
  'SinkSid' => sink_sid,
232
- 'ReceiveEventsFromSubaccounts' => receive_events_from_subaccounts,
233
227
  })
234
228
 
235
229
  headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
@@ -332,7 +326,6 @@ module Twilio
332
326
  'sink_sid' => payload['sink_sid'],
333
327
  'url' => payload['url'],
334
328
  'links' => payload['links'],
335
- 'receive_events_from_subaccounts' => payload['receive_events_from_subaccounts'],
336
329
  }
337
330
 
338
331
  # Context
@@ -399,12 +392,6 @@ module Twilio
399
392
  @properties['links']
400
393
  end
401
394
 
402
- ##
403
- # @return [Boolean] Receive events from all children accounts in the parent account subscription.
404
- def receive_events_from_subaccounts
405
- @properties['receive_events_from_subaccounts']
406
- end
407
-
408
395
  ##
409
396
  # Delete the SubscriptionInstance
410
397
  # @return [Boolean] True if delete succeeds, false otherwise
@@ -425,18 +412,15 @@ module Twilio
425
412
  # Update the SubscriptionInstance
426
413
  # @param [String] description A human readable description for the Subscription.
427
414
  # @param [String] sink_sid The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
428
- # @param [Boolean] receive_events_from_subaccounts Receive events from all children accounts in the parent account subscription.
429
415
  # @return [SubscriptionInstance] Updated SubscriptionInstance
430
416
  def update(
431
417
  description: :unset,
432
- sink_sid: :unset,
433
- receive_events_from_subaccounts: :unset
418
+ sink_sid: :unset
434
419
  )
435
420
 
436
421
  context.update(
437
422
  description: description,
438
423
  sink_sid: sink_sid,
439
- receive_events_from_subaccounts: receive_events_from_subaccounts,
440
424
  )
441
425
  end
442
426