telnyx 5.116.0 → 5.118.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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/call_dial_params.rb +27 -3
  5. data/lib/telnyx/models/calls/action_transfer_params.rb +20 -2
  6. data/lib/telnyx/models/whatsapp/user_data_retrieve_params.rb +16 -0
  7. data/lib/telnyx/models/whatsapp/user_data_retrieve_response.rb +59 -0
  8. data/lib/telnyx/models/whatsapp/user_data_update_params.rb +32 -0
  9. data/lib/telnyx/models/whatsapp/user_data_update_response.rb +59 -0
  10. data/lib/telnyx/resources/calls/actions.rb +3 -1
  11. data/lib/telnyx/resources/calls.rb +3 -1
  12. data/lib/telnyx/resources/whatsapp/user_data.rb +59 -0
  13. data/lib/telnyx/resources/whatsapp.rb +5 -0
  14. data/lib/telnyx/version.rb +1 -1
  15. data/lib/telnyx.rb +5 -0
  16. data/rbi/telnyx/models/call_dial_params.rbi +41 -3
  17. data/rbi/telnyx/models/calls/action_transfer_params.rbi +33 -2
  18. data/rbi/telnyx/models/whatsapp/user_data_retrieve_params.rbi +32 -0
  19. data/rbi/telnyx/models/whatsapp/user_data_retrieve_response.rbi +125 -0
  20. data/rbi/telnyx/models/whatsapp/user_data_update_params.rbi +62 -0
  21. data/rbi/telnyx/models/whatsapp/user_data_update_response.rbi +123 -0
  22. data/rbi/telnyx/resources/calls/actions.rbi +14 -1
  23. data/rbi/telnyx/resources/calls.rbi +15 -1
  24. data/rbi/telnyx/resources/whatsapp/user_data.rbi +41 -0
  25. data/rbi/telnyx/resources/whatsapp.rbi +4 -0
  26. data/sig/telnyx/models/call_dial_params.rbs +7 -0
  27. data/sig/telnyx/models/calls/action_transfer_params.rbs +7 -0
  28. data/sig/telnyx/models/whatsapp/user_data_retrieve_params.rbs +17 -0
  29. data/sig/telnyx/models/whatsapp/user_data_retrieve_response.rbs +71 -0
  30. data/sig/telnyx/models/whatsapp/user_data_update_params.rbs +34 -0
  31. data/sig/telnyx/models/whatsapp/user_data_update_response.rbs +71 -0
  32. data/sig/telnyx/resources/calls/actions.rbs +1 -0
  33. data/sig/telnyx/resources/calls.rbs +1 -0
  34. data/sig/telnyx/resources/whatsapp/user_data.rbs +19 -0
  35. data/sig/telnyx/resources/whatsapp.rbs +2 -0
  36. metadata +17 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67eff50691848f3bf67019c6782403c21090b185de56560afe7c55138cd744cf
4
- data.tar.gz: be82ebdb72a02de4e5ccd30604e8d061fb8500bc0406a216484f0ccc010a8f92
3
+ metadata.gz: 6f714336df7942dbd4bc8eea5ddeb82d990b9301b707f0cf2bd4d1722fe7bc62
4
+ data.tar.gz: 98fbe10db719704fc24b6cc1bf8e87bab5587e92fa80b13435dd00197202520d
5
5
  SHA512:
6
- metadata.gz: ec5fcd8046103ce4dd0e0b16a1818007944f577ff0f00e82d9b8df67e4b64f075c8e6a97f769b5fb58bb11837fe8c6aaff31c63d1ce0a0fb633e4fada7afb923
7
- data.tar.gz: 6525b3273287d867b611abbdf3c07e736c3c7aa53c24b2c55ce28a6e7b9e89575f8aa353c0ad92ad5d4145920b4b3482f783d4406fb3a75fcfb348c95528210e
6
+ metadata.gz: ec89bc2ff72804269668cead90a7e9ae942478d94e86aec25773617091db165ea4b673feda8f39f2f79b0e558baaa23cceeca063d3f615c869149602b855d401
7
+ data.tar.gz: 9e372a81a5c437f0cde9306e2c32de19b4f605b6a350141cef28cb1e546eff81f07daf53af5ec1ea2181966a845486d01df63d23355611d18f08eacf5f88a6d7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.118.0 (2026-05-22)
4
+
5
+ Full Changelog: [v5.117.0...v5.118.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.117.0...v5.118.0)
6
+
7
+ ### Features
8
+
9
+ * MSG-919: documentation for Whatsapp user data ([3683252](https://github.com/team-telnyx/telnyx-ruby/commit/36832521020009060f02d05e0fcb48b9c01cebfb))
10
+
11
+ ## 5.117.0 (2026-05-22)
12
+
13
+ Full Changelog: [v5.116.0...v5.117.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.116.0...v5.117.0)
14
+
15
+ ### Features
16
+
17
+ * TELAPPS-72: document send_digits_on_answer on Dial + Transfer ([f7ae042](https://github.com/team-telnyx/telnyx-ruby/commit/f7ae042cef4897a4dfda4853817d81fe510675ee))
18
+
3
19
  ## 5.116.0 (2026-05-20)
4
20
 
5
21
  Full Changelog: [v5.115.0...v5.116.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.115.0...v5.116.0)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "telnyx", "~> 5.116.0"
27
+ gem "telnyx", "~> 5.118.0"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -27,7 +27,12 @@ module Telnyx
27
27
  # `;secure=srtp` to enable SRTP media encryption for that endpoint, or
28
28
  # `;secure=dtls` to enable DTLS media encryption for that endpoint. If
29
29
  # `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
30
- # per-endpoint `secure` URI parameter.
30
+ # per-endpoint `secure` URI parameter. For a single string destination, you may
31
+ # append a comma followed by DTMF digits (e.g. `+18004247767,200`) to play those
32
+ # digits as DTMF once the called party answers — equivalent to setting
33
+ # `send_digits_on_answer` separately. If both are present, the explicit
34
+ # `send_digits_on_answer` parameter takes precedence. This shorthand is not
35
+ # supported when `to` is an array.
31
36
  #
32
37
  # @return [String, Array<String>]
33
38
  required :to, union: -> { Telnyx::CallDialParams::To }
@@ -272,6 +277,18 @@ module Telnyx
272
277
  # @return [Symbol, Telnyx::Models::CallDialParams::RecordTrim, nil]
273
278
  optional :record_trim, enum: -> { Telnyx::CallDialParams::RecordTrim }
274
279
 
280
+ # @!attribute send_digits_on_answer
281
+ # DTMF digits to send automatically after the called party answers. Useful for
282
+ # reaching an extension behind an IVR (e.g. `"200"` to dial extension 200 once the
283
+ # called party picks up). Allowed characters: `0-9`, `A-D`, `w` (0.5s pause), `W`
284
+ # (1s pause), `*`, `#`. Maximum 64 characters. When omitted, no automatic DTMF is
285
+ # sent. May also be supplied inline by appending `,<digits>` to `to` (e.g.
286
+ # `to=+18004247767,200`); if both forms are present, this explicit field takes
287
+ # precedence.
288
+ #
289
+ # @return [String, nil]
290
+ optional :send_digits_on_answer, String
291
+
275
292
  # @!attribute send_silence_when_idle
276
293
  # Generate silence RTP packets when no transmission available.
277
294
  #
@@ -458,7 +475,7 @@ module Telnyx
458
475
  # @return [Symbol, Telnyx::Models::CallDialParams::WebhookURLsMethod, nil]
459
476
  optional :webhook_urls_method, enum: -> { Telnyx::CallDialParams::WebhookURLsMethod }
460
477
 
461
- # @!method initialize(connection_id:, from:, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, assistant: nil, audio_url: nil, billing_group_id: nil, bridge_intent: nil, bridge_on_answer: nil, client_state: nil, command_id: nil, conference_config: nil, custom_headers: nil, deepfake_detection: nil, dialogflow_config: nil, enable_dialogflow: nil, from_display_name: nil, link_to: nil, media_encryption: nil, media_name: nil, park_after_unbridge: nil, preferred_codecs: nil, prevent_double_bridge: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_silence_when_idle: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, stream_auth_token: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_sampling_rate: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_establish_before_call_originate: nil, stream_track: nil, stream_url: nil, supervise_call_control_id: nil, supervisor_role: nil, time_limit_secs: nil, timeout_secs: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
478
+ # @!method initialize(connection_id:, from:, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, assistant: nil, audio_url: nil, billing_group_id: nil, bridge_intent: nil, bridge_on_answer: nil, client_state: nil, command_id: nil, conference_config: nil, custom_headers: nil, deepfake_detection: nil, dialogflow_config: nil, enable_dialogflow: nil, from_display_name: nil, link_to: nil, media_encryption: nil, media_name: nil, park_after_unbridge: nil, preferred_codecs: nil, prevent_double_bridge: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_digits_on_answer: nil, send_silence_when_idle: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, stream_auth_token: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_sampling_rate: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_establish_before_call_originate: nil, stream_track: nil, stream_url: nil, supervise_call_control_id: nil, supervisor_role: nil, time_limit_secs: nil, timeout_secs: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
462
479
  # Some parameter documentations has been truncated, see
463
480
  # {Telnyx::Models::CallDialParams} for more details.
464
481
  #
@@ -528,6 +545,8 @@ module Telnyx
528
545
  #
529
546
  # @param record_trim [Symbol, Telnyx::Models::CallDialParams::RecordTrim] When set to `trim-silence`, silence will be removed from the beginning and end o
530
547
  #
548
+ # @param send_digits_on_answer [String] DTMF digits to send automatically after the called party answers. Useful for rea
549
+ #
531
550
  # @param send_silence_when_idle [Boolean] Generate silence RTP packets when no transmission available.
532
551
  #
533
552
  # @param sip_auth_password [String] SIP Authentication password used for SIP challenges.
@@ -590,7 +609,12 @@ module Telnyx
590
609
  # `;secure=srtp` to enable SRTP media encryption for that endpoint, or
591
610
  # `;secure=dtls` to enable DTLS media encryption for that endpoint. If
592
611
  # `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
593
- # per-endpoint `secure` URI parameter.
612
+ # per-endpoint `secure` URI parameter. For a single string destination, you may
613
+ # append a comma followed by DTMF digits (e.g. `+18004247767,200`) to play those
614
+ # digits as DTMF once the called party answers — equivalent to setting
615
+ # `send_digits_on_answer` separately. If both are present, the explicit
616
+ # `send_digits_on_answer` parameter takes precedence. This shorthand is not
617
+ # supported when `to` is an array.
594
618
  module To
595
619
  extend Telnyx::Internal::Type::Union
596
620
 
@@ -18,7 +18,11 @@ module Telnyx
18
18
  # `;secure=true` or `;secure=srtp` to enable SRTP media encryption for that
19
19
  # endpoint, or `;secure=dtls` to enable DTLS media encryption for that endpoint.
20
20
  # If `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
21
- # per-endpoint `secure` URI parameter.
21
+ # per-endpoint `secure` URI parameter. You may also append a comma followed by
22
+ # DTMF digits (e.g. `+18004247767,200`) to play those digits as DTMF once the
23
+ # transfer destination answers — equivalent to setting `send_digits_on_answer`
24
+ # separately. If both are present, the explicit `send_digits_on_answer` parameter
25
+ # takes precedence.
22
26
  #
23
27
  # @return [String]
24
28
  required :to, String
@@ -207,6 +211,18 @@ module Telnyx
207
211
  # @return [Symbol, Telnyx::Models::Calls::ActionTransferParams::RecordTrim, nil]
208
212
  optional :record_trim, enum: -> { Telnyx::Calls::ActionTransferParams::RecordTrim }
209
213
 
214
+ # @!attribute send_digits_on_answer
215
+ # DTMF digits to send automatically after the transfer destination answers. Useful
216
+ # for reaching an extension behind an IVR (e.g. `"200"` to dial extension 200 once
217
+ # the called party picks up). Allowed characters: `0-9`, `A-D`, `w` (0.5s pause),
218
+ # `W` (1s pause), `*`, `#`. Maximum 64 characters. When omitted, no automatic DTMF
219
+ # is sent. May also be supplied inline by appending `,<digits>` to `to` (e.g.
220
+ # `to=+18004247767,200`); if both forms are present, this explicit field takes
221
+ # precedence.
222
+ #
223
+ # @return [String, nil]
224
+ optional :send_digits_on_answer, String
225
+
210
226
  # @!attribute sip_auth_password
211
227
  # SIP Authentication password used for SIP challenges.
212
228
  #
@@ -308,7 +324,7 @@ module Telnyx
308
324
  # @return [Symbol, Telnyx::Models::Calls::ActionTransferParams::WebhookURLsMethod, nil]
309
325
  optional :webhook_urls_method, enum: -> { Telnyx::Calls::ActionTransferParams::WebhookURLsMethod }
310
326
 
311
- # @!method initialize(call_control_id:, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, audio_url: nil, client_state: nil, command_id: nil, custom_headers: nil, early_media: nil, from: nil, from_display_name: nil, media_encryption: nil, media_name: nil, mute_dtmf: nil, park_after_unbridge: nil, preferred_codecs: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, target_leg_client_state: nil, time_limit_secs: nil, timeout_secs: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
327
+ # @!method initialize(call_control_id:, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, audio_url: nil, client_state: nil, command_id: nil, custom_headers: nil, early_media: nil, from: nil, from_display_name: nil, media_encryption: nil, media_name: nil, mute_dtmf: nil, park_after_unbridge: nil, preferred_codecs: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_digits_on_answer: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, target_leg_client_state: nil, time_limit_secs: nil, timeout_secs: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
312
328
  # Some parameter documentations has been truncated, see
313
329
  # {Telnyx::Models::Calls::ActionTransferParams} for more details.
314
330
  #
@@ -362,6 +378,8 @@ module Telnyx
362
378
  #
363
379
  # @param record_trim [Symbol, Telnyx::Models::Calls::ActionTransferParams::RecordTrim] When set to `trim-silence`, silence will be removed from the beginning and end o
364
380
  #
381
+ # @param send_digits_on_answer [String] DTMF digits to send automatically after the transfer destination answers. Useful
382
+ #
365
383
  # @param sip_auth_password [String] SIP Authentication password used for SIP challenges.
366
384
  #
367
385
  # @param sip_auth_username [String] SIP Authentication username used for SIP challenges.
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module Whatsapp
6
+ # @see Telnyx::Resources::Whatsapp::UserData#retrieve
7
+ class UserDataRetrieveParams < Telnyx::Internal::Type::BaseModel
8
+ extend Telnyx::Internal::Type::RequestParameters::Converter
9
+ include Telnyx::Internal::Type::RequestParameters
10
+
11
+ # @!method initialize(request_options: {})
12
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module Whatsapp
6
+ # @see Telnyx::Resources::Whatsapp::UserData#retrieve
7
+ class UserDataRetrieveResponse < Telnyx::Internal::Type::BaseModel
8
+ # @!attribute data
9
+ #
10
+ # @return [Telnyx::Models::Whatsapp::UserDataRetrieveResponse::Data, nil]
11
+ optional :data, -> { Telnyx::Models::Whatsapp::UserDataRetrieveResponse::Data }
12
+
13
+ # @!method initialize(data: nil)
14
+ # @param data [Telnyx::Models::Whatsapp::UserDataRetrieveResponse::Data]
15
+
16
+ # @see Telnyx::Models::Whatsapp::UserDataRetrieveResponse#data
17
+ class Data < Telnyx::Internal::Type::BaseModel
18
+ # @!attribute created_at
19
+ #
20
+ # @return [Time, nil]
21
+ optional :created_at, Time
22
+
23
+ # @!attribute record_type
24
+ #
25
+ # @return [String, nil]
26
+ optional :record_type, String
27
+
28
+ # @!attribute updated_at
29
+ #
30
+ # @return [Time, nil]
31
+ optional :updated_at, Time
32
+
33
+ # @!attribute webhook_failover_url
34
+ # Failover URL to receive Whatsapp signup events
35
+ #
36
+ # @return [String, nil]
37
+ optional :webhook_failover_url, String
38
+
39
+ # @!attribute webhook_url
40
+ # URL to receive Whatsapp signup events
41
+ #
42
+ # @return [String, nil]
43
+ optional :webhook_url, String
44
+
45
+ # @!method initialize(created_at: nil, record_type: nil, updated_at: nil, webhook_failover_url: nil, webhook_url: nil)
46
+ # @param created_at [Time]
47
+ #
48
+ # @param record_type [String]
49
+ #
50
+ # @param updated_at [Time]
51
+ #
52
+ # @param webhook_failover_url [String] Failover URL to receive Whatsapp signup events
53
+ #
54
+ # @param webhook_url [String] URL to receive Whatsapp signup events
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module Whatsapp
6
+ # @see Telnyx::Resources::Whatsapp::UserData#update
7
+ class UserDataUpdateParams < Telnyx::Internal::Type::BaseModel
8
+ extend Telnyx::Internal::Type::RequestParameters::Converter
9
+ include Telnyx::Internal::Type::RequestParameters
10
+
11
+ # @!attribute webhook_failover_url
12
+ # Failover URL to send Whatsapp signup events
13
+ #
14
+ # @return [String, nil]
15
+ optional :webhook_failover_url, String
16
+
17
+ # @!attribute webhook_url
18
+ # URL to send Whatsapp signup events
19
+ #
20
+ # @return [String, nil]
21
+ optional :webhook_url, String
22
+
23
+ # @!method initialize(webhook_failover_url: nil, webhook_url: nil, request_options: {})
24
+ # @param webhook_failover_url [String] Failover URL to send Whatsapp signup events
25
+ #
26
+ # @param webhook_url [String] URL to send Whatsapp signup events
27
+ #
28
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module Whatsapp
6
+ # @see Telnyx::Resources::Whatsapp::UserData#update
7
+ class UserDataUpdateResponse < Telnyx::Internal::Type::BaseModel
8
+ # @!attribute data
9
+ #
10
+ # @return [Telnyx::Models::Whatsapp::UserDataUpdateResponse::Data, nil]
11
+ optional :data, -> { Telnyx::Models::Whatsapp::UserDataUpdateResponse::Data }
12
+
13
+ # @!method initialize(data: nil)
14
+ # @param data [Telnyx::Models::Whatsapp::UserDataUpdateResponse::Data]
15
+
16
+ # @see Telnyx::Models::Whatsapp::UserDataUpdateResponse#data
17
+ class Data < Telnyx::Internal::Type::BaseModel
18
+ # @!attribute created_at
19
+ #
20
+ # @return [Time, nil]
21
+ optional :created_at, Time
22
+
23
+ # @!attribute record_type
24
+ #
25
+ # @return [String, nil]
26
+ optional :record_type, String
27
+
28
+ # @!attribute updated_at
29
+ #
30
+ # @return [Time, nil]
31
+ optional :updated_at, Time
32
+
33
+ # @!attribute webhook_failover_url
34
+ # Failover URL to receive Whatsapp signup events
35
+ #
36
+ # @return [String, nil]
37
+ optional :webhook_failover_url, String
38
+
39
+ # @!attribute webhook_url
40
+ # URL to receive Whatsapp signup events
41
+ #
42
+ # @return [String, nil]
43
+ optional :webhook_url, String
44
+
45
+ # @!method initialize(created_at: nil, record_type: nil, updated_at: nil, webhook_failover_url: nil, webhook_url: nil)
46
+ # @param created_at [Time]
47
+ #
48
+ # @param record_type [String]
49
+ #
50
+ # @param updated_at [Time]
51
+ #
52
+ # @param webhook_failover_url [String] Failover URL to receive Whatsapp signup events
53
+ #
54
+ # @param webhook_url [String] URL to receive Whatsapp signup events
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -1715,7 +1715,7 @@ module Telnyx
1715
1715
  # - `call.machine.premium.greeting.ended` if `answering_machine_detection=premium`
1716
1716
  # was requested and a beep was detected
1717
1717
  #
1718
- # @overload transfer(call_control_id, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, audio_url: nil, client_state: nil, command_id: nil, custom_headers: nil, early_media: nil, from: nil, from_display_name: nil, media_encryption: nil, media_name: nil, mute_dtmf: nil, park_after_unbridge: nil, preferred_codecs: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, target_leg_client_state: nil, time_limit_secs: nil, timeout_secs: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
1718
+ # @overload transfer(call_control_id, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, audio_url: nil, client_state: nil, command_id: nil, custom_headers: nil, early_media: nil, from: nil, from_display_name: nil, media_encryption: nil, media_name: nil, mute_dtmf: nil, park_after_unbridge: nil, preferred_codecs: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_digits_on_answer: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, target_leg_client_state: nil, time_limit_secs: nil, timeout_secs: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
1719
1719
  #
1720
1720
  # @param call_control_id [String] Unique identifier and token for controlling the call
1721
1721
  #
@@ -1767,6 +1767,8 @@ module Telnyx
1767
1767
  #
1768
1768
  # @param record_trim [Symbol, Telnyx::Models::Calls::ActionTransferParams::RecordTrim] When set to `trim-silence`, silence will be removed from the beginning and end o
1769
1769
  #
1770
+ # @param send_digits_on_answer [String] DTMF digits to send automatically after the transfer destination answers. Useful
1771
+ #
1770
1772
  # @param sip_auth_password [String] SIP Authentication password used for SIP challenges.
1771
1773
  #
1772
1774
  # @param sip_auth_username [String] SIP Authentication username used for SIP challenges.
@@ -35,7 +35,7 @@ module Telnyx
35
35
  # When the `record` parameter is set to `record-from-answer`, the response will
36
36
  # include a `recording_id` field.
37
37
  #
38
- # @overload dial(connection_id:, from:, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, assistant: nil, audio_url: nil, billing_group_id: nil, bridge_intent: nil, bridge_on_answer: nil, client_state: nil, command_id: nil, conference_config: nil, custom_headers: nil, deepfake_detection: nil, dialogflow_config: nil, enable_dialogflow: nil, from_display_name: nil, link_to: nil, media_encryption: nil, media_name: nil, park_after_unbridge: nil, preferred_codecs: nil, prevent_double_bridge: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_silence_when_idle: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, stream_auth_token: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_sampling_rate: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_establish_before_call_originate: nil, stream_track: nil, stream_url: nil, supervise_call_control_id: nil, supervisor_role: nil, time_limit_secs: nil, timeout_secs: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
38
+ # @overload dial(connection_id:, from:, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, assistant: nil, audio_url: nil, billing_group_id: nil, bridge_intent: nil, bridge_on_answer: nil, client_state: nil, command_id: nil, conference_config: nil, custom_headers: nil, deepfake_detection: nil, dialogflow_config: nil, enable_dialogflow: nil, from_display_name: nil, link_to: nil, media_encryption: nil, media_name: nil, park_after_unbridge: nil, preferred_codecs: nil, prevent_double_bridge: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_digits_on_answer: nil, send_silence_when_idle: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, stream_auth_token: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_sampling_rate: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_establish_before_call_originate: nil, stream_track: nil, stream_url: nil, supervise_call_control_id: nil, supervisor_role: nil, time_limit_secs: nil, timeout_secs: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
39
39
  #
40
40
  # @param connection_id [String] The ID of the Call Control App (formerly ID of the connection) to be used when d
41
41
  #
@@ -103,6 +103,8 @@ module Telnyx
103
103
  #
104
104
  # @param record_trim [Symbol, Telnyx::Models::CallDialParams::RecordTrim] When set to `trim-silence`, silence will be removed from the beginning and end o
105
105
  #
106
+ # @param send_digits_on_answer [String] DTMF digits to send automatically after the called party answers. Useful for rea
107
+ #
106
108
  # @param send_silence_when_idle [Boolean] Generate silence RTP packets when no transmission available.
107
109
  #
108
110
  # @param sip_auth_password [String] SIP Authentication password used for SIP challenges.
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Resources
5
+ class Whatsapp
6
+ # Manage Whatsapp business accounts
7
+ class UserData
8
+ # Fetch Whatsapp user data
9
+ #
10
+ # @overload retrieve(request_options: {})
11
+ #
12
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
13
+ #
14
+ # @return [Telnyx::Models::Whatsapp::UserDataRetrieveResponse]
15
+ #
16
+ # @see Telnyx::Models::Whatsapp::UserDataRetrieveParams
17
+ def retrieve(params = {})
18
+ @client.request(
19
+ method: :get,
20
+ path: "v2/whatsapp/user_data",
21
+ model: Telnyx::Models::Whatsapp::UserDataRetrieveResponse,
22
+ options: params[:request_options]
23
+ )
24
+ end
25
+
26
+ # Update Whatsapp user data
27
+ #
28
+ # @overload update(webhook_failover_url: nil, webhook_url: nil, request_options: {})
29
+ #
30
+ # @param webhook_failover_url [String] Failover URL to send Whatsapp signup events
31
+ #
32
+ # @param webhook_url [String] URL to send Whatsapp signup events
33
+ #
34
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
35
+ #
36
+ # @return [Telnyx::Models::Whatsapp::UserDataUpdateResponse]
37
+ #
38
+ # @see Telnyx::Models::Whatsapp::UserDataUpdateParams
39
+ def update(params = {})
40
+ parsed, options = Telnyx::Whatsapp::UserDataUpdateParams.dump_request(params)
41
+ @client.request(
42
+ method: :patch,
43
+ path: "v2/whatsapp/user_data",
44
+ body: parsed,
45
+ model: Telnyx::Models::Whatsapp::UserDataUpdateResponse,
46
+ options: options
47
+ )
48
+ end
49
+
50
+ # @api private
51
+ #
52
+ # @param client [Telnyx::Client]
53
+ def initialize(client:)
54
+ @client = client
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -15,6 +15,10 @@ module Telnyx
15
15
  # @return [Telnyx::Resources::Whatsapp::PhoneNumbers]
16
16
  attr_reader :phone_numbers
17
17
 
18
+ # Manage Whatsapp business accounts
19
+ # @return [Telnyx::Resources::Whatsapp::UserData]
20
+ attr_reader :user_data
21
+
18
22
  # @api private
19
23
  #
20
24
  # @param client [Telnyx::Client]
@@ -23,6 +27,7 @@ module Telnyx
23
27
  @business_accounts = Telnyx::Resources::Whatsapp::BusinessAccounts.new(client: client)
24
28
  @templates = Telnyx::Resources::Whatsapp::Templates.new(client: client)
25
29
  @phone_numbers = Telnyx::Resources::Whatsapp::PhoneNumbers.new(client: client)
30
+ @user_data = Telnyx::Resources::Whatsapp::UserData.new(client: client)
26
31
  end
27
32
  end
28
33
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telnyx
4
- VERSION = "5.116.0"
4
+ VERSION = "5.118.0"
5
5
  end
data/lib/telnyx.rb CHANGED
@@ -2374,6 +2374,10 @@ require_relative "telnyx/models/whatsapp/phone_number_verify_params"
2374
2374
  require_relative "telnyx/models/whatsapp/template_create_params"
2375
2375
  require_relative "telnyx/models/whatsapp/template_create_response"
2376
2376
  require_relative "telnyx/models/whatsapp/template_list_params"
2377
+ require_relative "telnyx/models/whatsapp/user_data_retrieve_params"
2378
+ require_relative "telnyx/models/whatsapp/user_data_retrieve_response"
2379
+ require_relative "telnyx/models/whatsapp/user_data_update_params"
2380
+ require_relative "telnyx/models/whatsapp/user_data_update_response"
2377
2381
  require_relative "telnyx/models/whatsapp_contact"
2378
2382
  require_relative "telnyx/models/whatsapp_interactive"
2379
2383
  require_relative "telnyx/models/whatsapp_location"
@@ -2749,6 +2753,7 @@ require_relative "telnyx/resources/whatsapp/phone_numbers/calling_settings"
2749
2753
  require_relative "telnyx/resources/whatsapp/phone_numbers/profile"
2750
2754
  require_relative "telnyx/resources/whatsapp/phone_numbers/profile/photo"
2751
2755
  require_relative "telnyx/resources/whatsapp/templates"
2756
+ require_relative "telnyx/resources/whatsapp/user_data"
2752
2757
  require_relative "telnyx/resources/whatsapp_message_templates"
2753
2758
  require_relative "telnyx/resources/wireguard_interfaces"
2754
2759
  require_relative "telnyx/resources/wireguard_peers"
@@ -26,7 +26,12 @@ module Telnyx
26
26
  # `;secure=srtp` to enable SRTP media encryption for that endpoint, or
27
27
  # `;secure=dtls` to enable DTLS media encryption for that endpoint. If
28
28
  # `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
29
- # per-endpoint `secure` URI parameter.
29
+ # per-endpoint `secure` URI parameter. For a single string destination, you may
30
+ # append a comma followed by DTMF digits (e.g. `+18004247767,200`) to play those
31
+ # digits as DTMF once the called party answers — equivalent to setting
32
+ # `send_digits_on_answer` separately. If both are present, the explicit
33
+ # `send_digits_on_answer` parameter takes precedence. This shorthand is not
34
+ # supported when `to` is an array.
30
35
  sig { returns(Telnyx::CallDialParams::To::Variants) }
31
36
  attr_accessor :to
32
37
 
@@ -347,6 +352,19 @@ module Telnyx
347
352
  end
348
353
  attr_writer :record_trim
349
354
 
355
+ # DTMF digits to send automatically after the called party answers. Useful for
356
+ # reaching an extension behind an IVR (e.g. `"200"` to dial extension 200 once the
357
+ # called party picks up). Allowed characters: `0-9`, `A-D`, `w` (0.5s pause), `W`
358
+ # (1s pause), `*`, `#`. Maximum 64 characters. When omitted, no automatic DTMF is
359
+ # sent. May also be supplied inline by appending `,<digits>` to `to` (e.g.
360
+ # `to=+18004247767,200`); if both forms are present, this explicit field takes
361
+ # precedence.
362
+ sig { returns(T.nilable(String)) }
363
+ attr_reader :send_digits_on_answer
364
+
365
+ sig { params(send_digits_on_answer: String).void }
366
+ attr_writer :send_digits_on_answer
367
+
350
368
  # Generate silence RTP packets when no transmission available.
351
369
  sig { returns(T.nilable(T::Boolean)) }
352
370
  attr_reader :send_silence_when_idle
@@ -670,6 +688,7 @@ module Telnyx
670
688
  record_timeout_secs: Integer,
671
689
  record_track: Telnyx::CallDialParams::RecordTrack::OrSymbol,
672
690
  record_trim: Telnyx::CallDialParams::RecordTrim::OrSymbol,
691
+ send_digits_on_answer: String,
673
692
  send_silence_when_idle: T::Boolean,
674
693
  sip_auth_password: String,
675
694
  sip_auth_username: String,
@@ -723,7 +742,12 @@ module Telnyx
723
742
  # `;secure=srtp` to enable SRTP media encryption for that endpoint, or
724
743
  # `;secure=dtls` to enable DTLS media encryption for that endpoint. If
725
744
  # `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
726
- # per-endpoint `secure` URI parameter.
745
+ # per-endpoint `secure` URI parameter. For a single string destination, you may
746
+ # append a comma followed by DTMF digits (e.g. `+18004247767,200`) to play those
747
+ # digits as DTMF once the called party answers — equivalent to setting
748
+ # `send_digits_on_answer` separately. If both are present, the explicit
749
+ # `send_digits_on_answer` parameter takes precedence. This shorthand is not
750
+ # supported when `to` is an array.
727
751
  to:,
728
752
  # Enables Answering Machine Detection. Telnyx offers Premium and Standard
729
753
  # detections. With Premium detection, when a call is answered, Telnyx runs
@@ -844,6 +868,14 @@ module Telnyx
844
868
  # When set to `trim-silence`, silence will be removed from the beginning and end
845
869
  # of the recording.
846
870
  record_trim: nil,
871
+ # DTMF digits to send automatically after the called party answers. Useful for
872
+ # reaching an extension behind an IVR (e.g. `"200"` to dial extension 200 once the
873
+ # called party picks up). Allowed characters: `0-9`, `A-D`, `w` (0.5s pause), `W`
874
+ # (1s pause), `*`, `#`. Maximum 64 characters. When omitted, no automatic DTMF is
875
+ # sent. May also be supplied inline by appending `,<digits>` to `to` (e.g.
876
+ # `to=+18004247767,200`); if both forms are present, this explicit field takes
877
+ # precedence.
878
+ send_digits_on_answer: nil,
847
879
  # Generate silence RTP packets when no transmission available.
848
880
  send_silence_when_idle: nil,
849
881
  # SIP Authentication password used for SIP challenges.
@@ -963,6 +995,7 @@ module Telnyx
963
995
  record_timeout_secs: Integer,
964
996
  record_track: Telnyx::CallDialParams::RecordTrack::OrSymbol,
965
997
  record_trim: Telnyx::CallDialParams::RecordTrim::OrSymbol,
998
+ send_digits_on_answer: String,
966
999
  send_silence_when_idle: T::Boolean,
967
1000
  sip_auth_password: String,
968
1001
  sip_auth_username: String,
@@ -1010,7 +1043,12 @@ module Telnyx
1010
1043
  # `;secure=srtp` to enable SRTP media encryption for that endpoint, or
1011
1044
  # `;secure=dtls` to enable DTLS media encryption for that endpoint. If
1012
1045
  # `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
1013
- # per-endpoint `secure` URI parameter.
1046
+ # per-endpoint `secure` URI parameter. For a single string destination, you may
1047
+ # append a comma followed by DTMF digits (e.g. `+18004247767,200`) to play those
1048
+ # digits as DTMF once the called party answers — equivalent to setting
1049
+ # `send_digits_on_answer` separately. If both are present, the explicit
1050
+ # `send_digits_on_answer` parameter takes precedence. This shorthand is not
1051
+ # supported when `to` is an array.
1014
1052
  module To
1015
1053
  extend Telnyx::Internal::Type::Union
1016
1054
 
@@ -22,7 +22,11 @@ module Telnyx
22
22
  # `;secure=true` or `;secure=srtp` to enable SRTP media encryption for that
23
23
  # endpoint, or `;secure=dtls` to enable DTLS media encryption for that endpoint.
24
24
  # If `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
25
- # per-endpoint `secure` URI parameter.
25
+ # per-endpoint `secure` URI parameter. You may also append a comma followed by
26
+ # DTMF digits (e.g. `+18004247767,200`) to play those digits as DTMF once the
27
+ # transfer destination answers — equivalent to setting `send_digits_on_answer`
28
+ # separately. If both are present, the explicit `send_digits_on_answer` parameter
29
+ # takes precedence.
26
30
  sig { returns(String) }
27
31
  attr_accessor :to
28
32
 
@@ -332,6 +336,19 @@ module Telnyx
332
336
  end
333
337
  attr_writer :record_trim
334
338
 
339
+ # DTMF digits to send automatically after the transfer destination answers. Useful
340
+ # for reaching an extension behind an IVR (e.g. `"200"` to dial extension 200 once
341
+ # the called party picks up). Allowed characters: `0-9`, `A-D`, `w` (0.5s pause),
342
+ # `W` (1s pause), `*`, `#`. Maximum 64 characters. When omitted, no automatic DTMF
343
+ # is sent. May also be supplied inline by appending `,<digits>` to `to` (e.g.
344
+ # `to=+18004247767,200`); if both forms are present, this explicit field takes
345
+ # precedence.
346
+ sig { returns(T.nilable(String)) }
347
+ attr_reader :send_digits_on_answer
348
+
349
+ sig { params(send_digits_on_answer: String).void }
350
+ attr_writer :send_digits_on_answer
351
+
335
352
  # SIP Authentication password used for SIP challenges.
336
353
  sig { returns(T.nilable(String)) }
337
354
  attr_reader :sip_auth_password
@@ -540,6 +557,7 @@ module Telnyx
540
557
  Telnyx::Calls::ActionTransferParams::RecordTrack::OrSymbol,
541
558
  record_trim:
542
559
  Telnyx::Calls::ActionTransferParams::RecordTrim::OrSymbol,
560
+ send_digits_on_answer: String,
543
561
  sip_auth_password: String,
544
562
  sip_auth_username: String,
545
563
  sip_headers: T::Array[Telnyx::SipHeader::OrHash],
@@ -571,7 +589,11 @@ module Telnyx
571
589
  # `;secure=true` or `;secure=srtp` to enable SRTP media encryption for that
572
590
  # endpoint, or `;secure=dtls` to enable DTLS media encryption for that endpoint.
573
591
  # If `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
574
- # per-endpoint `secure` URI parameter.
592
+ # per-endpoint `secure` URI parameter. You may also append a comma followed by
593
+ # DTMF digits (e.g. `+18004247767,200`) to play those digits as DTMF once the
594
+ # transfer destination answers — equivalent to setting `send_digits_on_answer`
595
+ # separately. If both are present, the explicit `send_digits_on_answer` parameter
596
+ # takes precedence.
575
597
  to:,
576
598
  # Enables Answering Machine Detection. When a call is answered, Telnyx runs
577
599
  # real-time detection to determine if it was picked up by a human or a machine and
@@ -663,6 +685,14 @@ module Telnyx
663
685
  # When set to `trim-silence`, silence will be removed from the beginning and end
664
686
  # of the recording.
665
687
  record_trim: nil,
688
+ # DTMF digits to send automatically after the transfer destination answers. Useful
689
+ # for reaching an extension behind an IVR (e.g. `"200"` to dial extension 200 once
690
+ # the called party picks up). Allowed characters: `0-9`, `A-D`, `w` (0.5s pause),
691
+ # `W` (1s pause), `*`, `#`. Maximum 64 characters. When omitted, no automatic DTMF
692
+ # is sent. May also be supplied inline by appending `,<digits>` to `to` (e.g.
693
+ # `to=+18004247767,200`); if both forms are present, this explicit field takes
694
+ # precedence.
695
+ send_digits_on_answer: nil,
666
696
  # SIP Authentication password used for SIP challenges.
667
697
  sip_auth_password: nil,
668
698
  # SIP Authentication username used for SIP challenges.
@@ -747,6 +777,7 @@ module Telnyx
747
777
  Telnyx::Calls::ActionTransferParams::RecordTrack::OrSymbol,
748
778
  record_trim:
749
779
  Telnyx::Calls::ActionTransferParams::RecordTrim::OrSymbol,
780
+ send_digits_on_answer: String,
750
781
  sip_auth_password: String,
751
782
  sip_auth_username: String,
752
783
  sip_headers: T::Array[Telnyx::SipHeader],